How to make a comparator out of an opamp

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
4 replies · 3K views
David lopez
Messages
257
Reaction score
3
I have an operational amplifier. I am
Trying to make a comparator out of
It. I built a voltage divider to provide
Different voltages. But I either get
The same voltage output regardless
Of input or the voltage is too high I think. How do you make a comparator out of an operational amplifier?
 
Engineering news on Phys.org
An op-amp is designed to operate with the both inputs at very similar voltages, with an output that rises and falls in a predictable way.

A comparator is designed to work with big input difference voltages, and to provide a small amount of hysteresis. The digital output of a comparator will switch quickly between high or low states.

To get hysteresis from an op-amp you will need to use an input resistor of 1k to the (+)input and a feedback resistor of 100k between the op-amp output and the (+)input. But that will only work if the voltage input has a low impedance.
https://en.wikipedia.org/wiki/Schmitt_trigger#Op-amp_implementations
 
Could you post a sketch showing all connections to your opamp?
 
search on opamp tutorial comparator

one of many returnshttps://www.electronics-tutorials.ws/opamp/op-amp-comparator.html

?hash=c8b8a6250136a6a166e562e4811e0c05.png
old jim
 
Attachments
  • 1553540611061.png
    1553540611061.png
    7 KB · Views: 391
  • Like
Likes   Reactions: dlgoff
David Lopez: Regarding Baluncore's
input resistor of 1k to the (+)input and a feedback resistor of 100k between the op-amp output and the (+)input
and jim hardy's schematic, what values are you using for R1 and R2, Vcc and -Vcc, and Vref? And what is/was the
The same voltage output
? I know opamps, but I need to know the above to help.