![]() |
|||
![]() |
![]() |
![]() |
![]() |
|
Volume 34, Number 7, November-December, 2000
Curing Comparator Instability with Hysteresis
ABOUT COMPARATORS Operational amplifiers (op-amps) can beand frequently areused as comparators, either open-loop or in a high-gain mode, but a better way is to use the special integrated circuits that are optimized for this purpose. The output stage of a comparator is wired to be more flexible than that of an op-amp. Op-amps use push-pull outputs that ordinarily swing as close to the power-supply rails as feasible, while some comparators may have an open collector output with grounded emitter. This permits the pull-up voltage source for the output stage to vary over a wide range, allowing comparators to interface to a variety of logic families or load circuits. A reduced value for the pull-up resistor, providing increased current, will yield improved switching speed and noise immunity, but at the expense of increased power dissipation. Comparators often have a latch that permits strobing the input at the right time and a shutdown function that conserves power when the comparator is not needed. Built to compare two levels as quickly as possible by running essentially "open-loop", comparators usually lack internal Miller compensation capacitors or integration circuitry and therefore have very wide bandwidth. Because of this, comparators are usually configured with no negative feedback (or with very small amounts if a controlled high gain is desired). This absence of negative feedback means that, unlike that of op-amp circuits, the input impedance is not multiplied by the loop gain. As a result, the input current varies as the comparator switches. Therefore the driving impedance, along with parasitic feedbacks, can play a key role in affecting circuit stability. While negative feedback tends to keep amplifiers within their linear region, positive feedback forces them into saturation.
What's the role of hysteresis? But it is not always possible to prevent instability by these measures. An often-effective solution is to use positive feedback to introduce a small amount of hysteresis. This has the effect of separating the up-going and down-going switching points so that, once a transition has started, the input must undergo a significant reversal before the reverse transition can occur. When processing slowly varying signals with even small amounts of superimposed noise, comparators tend to produce multiple output transitions, or bounces, as the input crosses and re-crosses the threshold region (Figure 1). Noisy signals can occur in any application, and especially in industrial environments. As the signal crosses the threshold region, the noise is amplified by the open loop gain, causing the output to briefly bounce back and forth. This is unacceptable in most applications, but it can generally be cured by introducing hysteresis.
Figure 1. Noise causes multiple transitions.
Where to use hysteresis
Figure 2. Temperature-control circuit with REF-02 reference/sensor and AD8561 comparator. Hysteresis is introduced as needed via positive-feedback resistor, R4.
Designing comparator circuits with hysteresis With a chosen comparator, the designer must determine whether to use it in an inverting or non-inverting configuration, i.e., whether a positive overdrive will switch the output to a negative or positive limit. Some comparators have positive and negative outputs, imparting a great deal of flexibility to their use in a system. Hysteresis can be applied by connecting the positive input terminal to the tap of a two-resistor voltage divider between the positive output and the reference source; the amount of output voltage fed back depends on the resistance ratio. This frees the inverting input for direct connection of the input signal, as in Figure 2. If the signal is applied to the non-inverting input, its source impedance should be low enough to have an insignificant effect on either the input scaling or the hysteresis ratio. To get the maximum performance out of a device, the hysteresis should be large enough to overcome the VOS (over the entire operating temperature) plus the required overdrive, as determined from the manufacturer's datasheet. Increasing the overdrive reduces the propagation delay of the part. The level of overdrive required increases with ambient temperature. Figures 3 and 4 show the use of hysteresis with dual supplies. In Figure 3, the signal is applied to the inverting input. The output vs. input plot shows the vicinity of the switching point. R2 is usually much higher in resistance than R1. If R2 were infinite, there would be no hysteresis, and the device would switch at Vref. The hysteresis is determined by the output levels and the resistance ratio R1/(R1+R2), and the switching-point voltage is offset slightly from Vref by the attenuation ratio R2/(R1+R2).
Figure 3. Comparator using inverting input, dual supplies. In Figure 4, the signal is applied to the non-inverting input via R1. Because the input signal is slightly attenuated, the hysteresis will be slightly larger than in the inverting case.
Figure 4. Comparator using non-inverting input, dual supplies. If the reference voltage is midway between the comparator's high and low output voltages (as is the case with a symmetrical power supply and ground reference), the introduction of the hysteresis will move the high and low thresholds equal distances from the reference. If the reference is nearer to one output than the other, the thresholds will be asymmetrically placed around the reference voltage. In single-supply comparator operations, the need arises to offset the reference, so that the circuit operates entirely within the first quadrant. Figure 5 shows how this can be achieved. The resistor divider (R2 and R1) creates a positive reference voltage that is compared with the input. The equations for designing the dc thresholds are shown in the figure.
Figure 5. Comparators in single-supply operation.
Placing a capacitor across the feedback resistor in the above configurations will introduce a pole into the feedback network. This has the "triggering" effect of increasing the amount of hysteresis at high frequencies. This can be very useful when the input is a relatively slowly varying signal in the presence of high frequency noise. At frequencies greater than f(p) = 1/(2
For comparators having complementary (Q and
Figure 6 Complementary-output comparators. a. Unloaded reference. b. Unloaded input. Figure 7 shows a circuit for comparing a bipolar signal against ground, using a single-supply part.
Figure 7. Single-supply comparator with bipolar input.
Variables affecting hysteresis The trip-point accuracies (with hysteresis) are also affected by the device-to-device variation of Voh (and Vol. One possible remedy is to use a programmable reference , but this process can become costly and time consuming. A better way, though still somewhat cumbersome, is to use precision clamp circuitry to keep the output at a fixed value when it goes high (Figure 8).
Figure 8. Precision clamp circuit.
Conclusion
|