Designing with comparators

-March 29, 2001

Comparators have an op-amp front end and a digital back end that operates like a gate. The comparator output stage may be an open collector transistor, so it often connects to the logic supply through a pullup resistor. Regardless of the input voltage, the output voltage is saturated at either power-supply rail because the analog front end amplifies input voltages with an almost infinite gain. If you leave the feedback resistor out of an op-amp circuit, it operates like a comparator, but you shouldn't use op amps to perform comparator functions except under limited conditions.

Manufacturers employ digital semiconductor techniques to make the output circuits in a comparator; thus, the comparator comes out of saturation very quickly. The response time of a comparator is so important that it is a data-sheet specification. Manufacturers employ analog semiconductor techniques to make the output circuit of an op amp. (Designers assume that the output never saturates.) Hence, the response time of an op amp driven into saturation is uncontrolled. It can take nanoseconds or milliseconds for an op amp to recover from saturation. The moral is: Never use an op amp as a comparator if response time is a required parameter.

Comparators require one to three power supplies. The oldest comparators, such as the µA710, contain an internal zener diode, and you must operate them from dual supplies. Some older comparators, such as the LM339/393, operate from a single supply, but they lack the low-voltage-operating capability, wide input-common-voltage range, and low bias current that the new LMV331/393/339 series has. Comparators requiring multiple power supplies use dual voltages to obtain maximum input dynamic range in a manner similar to that of an op-amp input stage. And these comparators use ground and a third voltage to level-shift the output voltage to a compatible logic voltage. Engineers often configure comparators with ±15V analog supplies and 5V and ground for the TTL interface.

When the VREF is 0 to 5V, the output equation for the comparator depends on the relationship between VIN and VREF; thus, when VIN>VREF, VOUT=VCC–ILR, and when VINREF, then VOUT=VCES

100 mV. The comparator converts any analog signal in its input common-mode-voltage range to a digital signal. Converting an analog signal to a digital signal is the definition of a 1-bit ADC, and the heart of a sigma-delta ADC is a comparator.

The comparator circuit in Figure 1 has no noise immunity when VIN

VREF, so, if the input signal passes slowly through this point, the output voltage may multiple-pulse a series of step functions before it settles to a final voltage. Adding positive feedback around the comparator prevents multiple pulsing. The comparator is a nonlinear device, so the positive feedback does not induce oscillation. You add positive feedback by inserting a resistor in the input lead and adding a resistor from output to the positive input. The positive feedback introduces hysteresis that prevents multiple pulsing, but it degrades the threshold accuracy. Look for my next column to show how to calculate hysteresis and the resulting threshold degradation.

Author info

Ron Mancini is a staff scientist at Texas Instruments. You can reach him at 1-352-568-1040,

Loading comments...

Write a Comment

To comment please Log In