How to make a comparator out of an opamp

  • #1
257
3

Main Question or Discussion Point

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?
 

Answers and Replies

  • #2
Baluncore
Science Advisor
2019 Award
7,800
2,723
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
 
  • #3
50
9
Could you post a sketch showing all connections to your opamp?
 
  • #5
50
9
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.
 

Related Threads on How to make a comparator out of an opamp

Replies
5
Views
892
  • Last Post
Replies
5
Views
3K
Replies
5
Views
2K
  • Last Post
Replies
6
Views
4K
Replies
11
Views
642
  • Last Post
2
Replies
31
Views
2K
Replies
12
Views
824
  • Last Post
2
Replies
38
Views
2K
  • Last Post
Replies
4
Views
795
Replies
2
Views
547
Top