








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Op Amp and Comparator Circuits
Typology: Schemes and Mind Maps
1 / 14
This page cannot be seen from the preview
Don't miss anything!
Comparator circuit The Op-amp comparator circuit compares one analogue voltage level with another analogue voltage level, or reference voltage, VREF and produces an output signal based on this voltage comparison. In other words, the op-amp voltage comparator compares the magnitudes of two voltage inputs and determines which is the largest of the two. Comparator circuit uses the open-loop gain of the O amp to switch its output between two saturated states Then due to this high open loop gain, the output from the comparator swings either fully to its positive supply rail, +Vcc or fully to its negative supply rail, - Vcc..
With reference to the op-amp comparator circuit above, lets first assume that VIN is less than the DC voltage level at VREF, ( VIN < VREF ). As the non- inverting (positive) input of the comparator is less than the inverting (negative) input, the output will be LOW and at the negative supply voltage, - Vcc resulting in a negative saturation of the output. If we now increase the input voltage, VIN so that its value is greater than the reference voltage VREF on the inverting input, the output voltage rapidly switches HIGH towards the positive supply voltage, +Vsat resulting in a positive saturation of the output. If we reduce again the input voltage VIN, so that it is slightly less than the reference voltage, the op-amp’s output switches back to its negative saturation voltage acting as a threshold detector. Then we can see that the op-amp voltage comparator is a device whose output is dependant on the value of the input voltage, VIN with respect to some DC voltage level as the output is HIGH when the voltage on the non-inverting
input is greater than the voltage on the inverting input, and LOW when the non-inverting input is less than the inverting input voltage. This condition is true regardless of whether the input signal is connected to the inverting or the non-inverting input of the comparator. We can also see that the value of the output voltage is completely dependent on the op-amps power supply voltage. In theory due to the op-amps high open-loop gain the magnitude of its output voltage could be infinite in both
the op-amps supply rails giving VOUT = +Vsat or VOUT = - Vsat. We said before that the basic op-amp comparator produces a positive or negative voltage output by comparing its input voltage against some preset DC reference voltage. Generally, a resistive voltage divider is used to set the input reference voltage of a comparator, but a battery source, zener diode or potentiometer for a variable reference voltage can all be used as shown.
In theory the comparators reference voltage can be set to be anywhere between 0v and the supply voltage but there are practical limitations on the actual voltage range depending on the op-amp comparator being device used.
In the inverting configuration, which is the opposite of the positive configuration above, the reference voltage is connected to the non-inverting input of the operational amplifier while the input signal is connected to the inverting input. Then when VIN is less than VREF the op-amp comparators output will saturate towards the positive supply rail, Vcc. Likewise the reverse is true, when VIN is greater than VREF, the op-amp comparators output will change state and saturate towards the negative supply rail, 0v. Then depending upon which op-amp inputs we use for the signal and the reference voltage, we can produce an inverting or non-inverting output. We can take this idea of detecting either a negative or positive going signal one step further by combining the two op-amp comparator circuits above to produce a window comparator circuit.
A Window Comparator is basically the inverting and the non-inverting comparators above combined into a single comparator stage. The window comparator detects input voltage levels that are within a specific band or window of voltages, instead of indicating whether a voltage is greater or less than some preset or fixed voltage reference point. This time, instead of having just one reference voltage value, a window comparator will have two reference voltages implemented by a pair of voltage comparators. One which triggers an op-amp comparator on detection of some upper voltage threshold, VREF(UPPER) and one which triggers an op-amp comparator on detection of a lower voltage threshold level, VREF(LOWER). Then the
voltage levels between these two upper and lower reference voltages is called the “window”, hence its name. Using our idea above of a voltage divider network, if we now use three equal value resistors so that R1 = R2 = R3 = R we can create a very simple window comparator circuit as shown. Also as the resistive values are all equal, the voltage drops across each resistor will also be equal at one-third the supply voltage, 1/3Vcc. So for ease in this simple window comparator example, we can set the upper reference voltage to 2/3Vcc and the lower reference voltage to 1/3Vcc. Consider the window comparator circuit below.
The inital switching condition of the circuit is the open-collector output of op- amp A 1 “OFF” with the open-collector output of op-amp A 2 , “ON” (sinking current) so VOUT is equal to 0V. When VIN is below the lower voltage level, VREF(LOWER) which equates to 1/3Vcc, VOUT will be LOW. When VIN exceeds this 1/3Vcc lower voltage level, the first op-amp comparator detects this and switches its open-collector output HIGH. This means that both op-amps have their outputs HIGH at the same time. No current flows through the pull-up resistor RL so VOUT is equal to Vcc. As VIN continues to increase it passes the upper voltage level, VREF(UPPER) at 2/3Vcc. At this point the second op-amp comparator detects this and switches its output LOW and VOUT becomes equal to 0V.
As above, the voltage divider network provides a set of reference voltages for the individual op-amp comparator circuits. To produce the four reference voltages will require five resistors. The junction at the bottom pair of resistors will produce a reference voltage that is one-fifth the supply voltage, 1/5Vcc using equal value resistors. The second pair 2/5Vcc, a third pair 3/5Vcc and so on, with these reference voltages increasing by a fixed amount of one-fifth (1/5) towards 5/5Vcc which is actually Vcc. As the common input voltage increases, the output of each op-amp comparator circuit switches in turn thereby turning OFF the connected LED starting with the lower comparator, A 4 and upwards towards A 1 as the input voltage increases. So by setting the values of the resistors in the voltage divider network, the comparators can be configured to detect any voltage level. One good example of the use of voltage level detection and indication would be for a battery condition monitor by reversing the LED’s and connecting them to 0V (ground) instead of VCC. Also by increasing the number of op-amp comparators in the set, more trigger points can be created. So for example, if we had eight op-amp comparators in the chain and fed the output of each comparator to an 8-to-3 line Digital Encoder, we could make a very simple analogue-to-digital converter, (ADC) that would convert the analogue input signal into a 3-bit binary code (0-to-7).
We have seen here that operational amplifiers can be configured to operate as comparators in their open-loop mode, and this is fine if the input signal varies rapidly or is not too noisy. However if the input signal, VIN is slow to change or electrical noise is present, then the op-amp comparator may oscillate switching its output back and forth between the two saturation states, +Vcc and - Vcc as the input signal hovers around the reference voltage, VREF level. One way to overcome this problem and to avoid the op- amp from oscillating is to provide positive feedback around the comparator. As its name implies, positive feedback is a technique for feeding back a part or fraction of the output signal that is in phase to the non-inverting input of the op-amp via a potential divider set up by two resistors with the amount of feedback being proportional to their ratio. The use of positive feedback around an op-amp comparator means that once the output is triggered into saturation at either level, there must be a significant change to the input signal VIN before the output switches back to the original saturation point. This difference between the two switching points is called hysteresis producing what is commonly called a Schmitt trigger circuit. Consider the inverting comparator circuit below.
For the inverting comparator circuit above, VIN is applied to the inverting input of the op-amp. Resistors R 1 and R 2 form a voltage divider network across the comparator providing the positive feedback with part of the output voltage appearing at the non-inverting input. The amount of feedback to the non- inverting input is determined by the resistive ratio of the two resistors used and which is given as:
We can also produce a non-inverting op-amp comparator circuit with built in hysteresis by changing the input and reference terminals as shown:
Note that the arrows on the hysteresis graph indicate the direction of switching at the upper and lower trip points.
An operational amplifier is to be used with positive feedback to produce a Schmitt trigger circuit. If resistor, R 1 = 10kΩ and resistor, R 2 = 90kΩ, what will be the values of the upper and lower switching points of the reference voltage and the width of the hysteresis if the op-amp is connected to a dual ±10v power supply. Given: R 1 = 10kΩ, R 2 = 90kΩ. Power supply +Vcc = 10v and - Vcc = 10v.
Upper Voltage Trip Point, VUTP
Lower Voltage Trip Point, VLTP Hysteresis width: Then the reference voltage VREF, switches between +1V and - 1V as the output saturates from one level to the other. Hopefully we can see from this simple example that the width of this hysteresis, 2 volts in total, can be made larger or smaller simply by adjusting the voltage divider ratio of the feedback resistors R 1 and R 2.
Although we can use operational amplifiers such as the 741 as a basic comparator circuit, the problem with this is that op-amps are only optimised for linear operation. That is where the input terminals are at virtually the same voltage level and its output stage is designed to produce a linear output voltage that is not saturated for long periods of time. Also standard operational amplifiers are designed to be used in closed-loop applications with negative feedback from its output to its inverting input.
When the comparator changes state and the output switch is LOW, it creates a low impedance path to ground and current flows through the pull-up resistor (and LED) causing a voltage drop across itself with the output being pulled to the lower supply level, ground in this case. Then we can see that there is very little difference between the schematic symbol of an op-amp comparator and a voltage comparator or their internal circuits. The main difference is in the output stage with the open collector or drain configuration is useful for driving relays, lamps, etc. By driving a transistor from the output allows for a greater switching current capacity than that of the comparators output alone.
In this tutorial about the Op-amp Comparator we have seen that a comparator circuit is basically an operational amplifier without feedback, that is, the op- amp is used in its open-loop configuration, and when the input voltage, VIN exceeds a preset reference voltage, VREF, the output changes state. Due to the very high open-loop gain of the operational amplifier, using it with positive feedback or even with no feedback at all causes the output to saturate to its supply rail producing one of two distinct output voltages depending on the relative values of its two inputs. This bistable behaviour is non-linear and forms the basis of op-amp comparator and Schmitt trigger circuits. The output stages of dedicated comparators, such as the single LM311, the dual LM393 or the quad LM339 are designed to operate in their saturation regions allowing these voltage comparator circuits to be widely used in analogue-to-digital converter applications and for various types of voltage level detection circuits. The erratic switching behaviour of an open-loop comparator can be easily overcome by adding positive feedback between the output and input of the comparator. With positive feedback, the circuit has hysteresis with the output switching occurring between two different switching points, UTP and LTP. Op-amp window comparators are a type of voltage comparator circuit which uses two op-amp comparators to produce a two-state output that indicates whether or not the input voltage is within a particular range or window of values by using two reference voltages. An upper reference voltage and a lower reference voltage.
While operational amplifiers and comparators may look similar, they are very different and designed to be used in different applications as an op-amp may be used as a comparator, a voltage comparator can not be used as an op- amp due to its non-linear output stage. We know from previous tutorials that an operational amplifier is an analogue device with a differential analogue input and an analogue output and if operated in its open-loop configuration its output acts like a comparator output. But dedicated voltage comparators (LM311, LM393, LM339) are widely available which will perform much better than a standard op-amp comparator.