In electronics, a comparator is an electronic component that compares two input voltages or currents and outputs a digital signal indicating which is larger. It has two analog input terminals V+ and V− and one binary digital output Vo. The output should be bistable and is ideally
Vout={VS+if V+>V−,VS−if V+<V−,0if V1=V2, where VS+ and VS− are nominally the positive and negative supply voltages. A comparator consists of a specialized high-gain differential amplifier. They are commonly used in devices that measure and digitize analog signals, such as analog-to-digital converters (ADCs), as well as relaxation oscillators. Comparators are closely related to operational amplifiers, but a comparator is designed to operate with positive feedback and with its output saturated at one power rail or the other. If necessary, an op-amp can be pressed into service as a poorly performing comparator, but its slew rate will be impaired.
Differential voltage
The differential voltages must stay within the limits specified by the manufacturer. Early integrated comparators, like the LM111 family, and certain high-speed comparators like the LM119 family, require differential voltage ranges substantially lower than the power-supply voltages (±15 V vs. 36 V). Rail-to-rail comparators allow any differential voltages within the power-supply range. When powered from a bipolar (dual rail) supply,
VS−≤V+,V−≤VS+, or when powered from an unipolar TTL/CMOS power supply,
0≤V+,V−≤Vcc. Specific rail-to-rail comparators with p–n–p input transistors, like the LM139 family, allow the input potential to drop 0.3 volts below the negative supply rail, but do not allow it to rise above the positive rail. Specific ultra-fast comparators, like the LMH7322, allow the input signal to swing below the negative rail and above the positive rail, although by a narrow margin of only 0.2 V. Differential input voltage (the voltage between two inputs) of a modern rail-to-rail comparator is usually limited only by the full swing of power supply.
Op-amp voltage comparator
An operational amplifier (op-amp) has a well balanced difference input and a very high gain. This parallels the characteristics of comparators and can be substituted in applications with low-performance requirements. A comparator circuit compares two voltages and outputs either a 1 (the voltage at the plus side) or a 0 (the voltage at the negative side) to indicate which is larger. Comparators are often used, for example, to check whether an input has reached some predetermined value. In most cases a comparator is implemented using a dedicated comparator IC, but op-amps may be used as an alternative. Comparator diagrams and op-amp diagrams use the same symbols. A simple comparator circuit made using an op-amp without feedback simply heavily amplifies the voltage difference between Vin and VREF and outputs the result as Vout. If Vin is greater than VREF, then voltage at Vout will rise to its positive saturation level; that is, to the voltage at the positive side. If Vin is lower than VREF, then Vout will fall to its negative saturation level, equal to the voltage at the negative side. In practice, this circuit can be improved by incorporating a hysteresis voltage range to reduce its sensitivity to noise. Because of the difference in characteristics of an operational amplifier and comparator, using an operational amplifier as a comparator presents several disadvantages as compared to using a dedicated comparator.
Op-amps are designed to operate in the linear mode with negative feedback. Hence, an op-amp typically has a lengthy recovery time from saturation. Almost all op-amps have an internal compensation capacitor which imposes slew rate limitations for high frequency signals. Consequently, an op-amp makes a sloppy comparator with propagation delays that can be as long as tens of microseconds. Since op-amps do not have any internal hysteresis, an external hysteresis network is always necessary for slow moving input signals. The quiescent current specification of an op-amp is valid only when the feedback is active. Some op-amps show an increased quiescent current when the inputs are not equal. A comparator is designed to produce well-limited output voltages that easily interface with digital logic. Compatibility with digital logic must be verified while using an op-amp as a comparator. Some multiple-section op-amps may exhibit extreme channel-channel interaction when used as comparators. Many op-amps have back to back diodes between their inputs. Op-amp inputs usually follow each other so this is fine. But comparator inputs are not usually the same. The diodes can cause unexpected current through inputs.
Design
… excerpt ends here. Continue reading the full article.





