There are many instances in measurement and automation when it is necessary to use a comparator that has a certain hysteresis, i.e., a window comparator. A well-known window comparator circuit uses a single op amp and has a hysteresis window that depends on R3 and the reference voltage’s input resistance, RIn (Fig. 1). The value of RIn is:

The hysteresis arises because the voltage seen at the op amp’s positive input varies with the op amp’s output voltage VOut. When VOut is at logic high (near the supply voltage) the positive input sees:

When VOut is at logic low (near ground if the supply is unipolar or near the negative supply voltage), the op amp’s positive input sees:

Adding together these two voltages gives the hysteresis window width ?V as:

One problem with this circuit, however, is uncertainty in ?V that arises because the interaction between VOut and VRef depends on the voltage divider’s input impedance.

To avoid this uncertainty, use a second op amp as a voltage follower to buffer the voltage divider from the comparator output and use two diodes to set the hysteresis window width (Fig. 2). The voltage drop across the diodes will remain the same regardless of the output voltage, making the hysteresis independent of both VOut and RIn. The value of VRef sets the center of the hysteresis window, and the window width will be:

A modification of this circuit adds an opportunity to adjust the window width within the range the diodes provide (Fig. 3). You can also replace diodes Q1 and Q2 with a Zener diode to further stabilize the hysteresis window.

\\[Editor’s note: Using a single Zener will yield an asymmetric window because the reverse breakdown voltage is typically much larger than the forward voltage. Using two Zeners back to back will again yield a symmetric hysteresis window, with a much larger difference between the voltage trip points than simple diodes provide.\\]

One major restriction to keep in mind: the maximum hysteresis voltage obtainable using these methods will always be less than VOut.