How to make a comparator out of an opamp

In summary, the conversation is about using an operational amplifier to create a comparator. The speaker is trying to use a voltage divider to provide different voltages, but is having issues with the output. The solution involves creating hysteresis using specific resistor values and following a schematic. The speaker also asks for clarification on the values being used in the schematic.
  • #1
David lopez
257
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
  • #2
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
Could you post a sketch showing all connections to your opamp?
 
  • #4
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: 277
  • Like
Likes dlgoff
  • #5
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.
 

1. How does an opamp work as a comparator?

An opamp works as a comparator by comparing two input voltages and producing an output that is either high or low, depending on which input is larger. When the non-inverting input is greater than the inverting input, the output will be high, and when the inverting input is greater, the output will be low.

2. What components do I need to make a comparator out of an opamp?

To make a comparator out of an opamp, you will need the opamp itself, two resistors, a power supply, and a voltage source for the inputs. The resistors are used to set the reference voltage at the inverting input, and the voltage source provides the input signals to be compared.

3. How do I set the reference voltage for the comparator?

The reference voltage for the comparator is set by the ratio of the two resistors connected to the inverting input. The formula for calculating the reference voltage is Vref = Vin x (R2 / R1), where Vin is the voltage source and R1 and R2 are the two resistors. By adjusting the values of the resistors, you can set the reference voltage to the desired level.

4. Can I use any opamp to make a comparator?

While most opamps can be used as comparators, there are some that are specifically designed for this purpose. These opamps have faster response times and can handle higher input voltages, making them more suitable for use as comparators. It is important to check the datasheet of the opamp to ensure it is suitable for use as a comparator.

5. What are some common applications of opamp comparators?

Opamp comparators are commonly used in electronic circuits to compare analog signals and produce a digital output. They are often used in voltage monitoring, level detection, and signal conditioning applications. Opamp comparators are also used in analog-to-digital converters and in control systems to compare a reference signal to a feedback signal and make adjustments accordingly.

Similar threads

  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
1
Views
824
  • Electrical Engineering
3
Replies
78
Views
3K
Replies
47
Views
3K
Replies
5
Views
2K
Replies
55
Views
3K
  • Electrical Engineering
Replies
8
Views
1K
Replies
2
Views
421
  • Electrical Engineering
Replies
20
Views
4K
Replies
62
Views
3K
Back
Top