Principle of Operation
Figure 2 demonstrates a conventional design for a comparator without employing the hysteresis. This arrangement works by using a voltage divider (Rx and Ry) to establish the minimum threshold voltage.
The comparator would evaluate and compare the input signal or the voltage (Vln) to the set threshold voltage (Vth).
The comparator input feed voltage which is to be compared is connected to the inverting input, as a result the output is going to feature an inverted polarity.
Each time the Vin > Vth the output is supposed to get close to the negative supply (GND or logic low for the shown diagram). and when Vln < Vth the output would get close to the positive supply (Vcc = 5V or logic high in this example).
This easy solution enables you to decide whether or not a genuine signal for example temperature is above a given decisive threshold limit.
Even so, using this technique may possess a predicament. Interference on the input feed signal could potentially cause the input to changeovers above and below the set threshold triggering an inconsistent or fluctuating output results.
Figure 3 illustrates the output response of a comparator without hysteresis with a fluctuating input voltage pattern.
While the input signal voltage arrives the set limit (by the voltage divider network) (Vth = 2.5V), it adjusts above as well as below the minimum threshold a number of instances.
As a result, the output fluctuates too in accordance with the input. In actual circuits, this unstable output may easily cause unfavorable issues.
As an illustration, think about the input signal to be a temperature parameter and the output response to be a crucial temperature based application, which happens to be interpreted by a microcontroller.
The fluctuating output signal response may not contribute a faithful information to the microcontroller and could produce "confusing" results for the microcontroller at the crucial threshold levels.
Additionally, imagine that the comparator output is required to operate a motor or valve. This inconsistent switching during the threshold limits could force the valve or motor to be switched ON/OFF many times in the course of the crucial threshold situations..
But a "cool" solution through a modest alteration to the comparator circuit enables you to include hysteresis which in turn completely eliminates the jittery output during threshold changeovers.
Hysteresis takes advantage of a couple of distinct threshold voltage limits to stay clear from the fluctuating transitions as seen in the discussed circuit.
The input signal feed needs to go over the upper threshold (VH) to generate a changeover of a low output or below the lower set threshold limit (VL) to switch over to a high output.
Figure 4 indicates hysteresis on a comparator. The resistor Rh locks on the hysteresis threshold level.
Each time the output is at a logic high (5V), Rh remains in parallel with Rx. This pushes extra current into Ry, elevating the threshold limit voltage (VH) to 2.7V. The input signal will likely need to go above VH=2.7V to prompt the output response to move to a logic low (0V).
While the output is at logic low (0V), Rh is set parallel with Ry. This cuts-down on the current into Ry, bringing down the threshold voltage to 2.3V. The input signal will want to go below VL=2.3V to settle the output to a logic high (5V).
Figure 5 signifies the output of a comparator with hysteresis with a fluctuating input voltage. The input signal level is supposed to move over the higher threshold limit (VH = 2.7V) for the opamp output to slip down to logic low (0V).
Also, the input signal level needs to move under the Lower threshold for the opamp output to smoothly climb to logic high (5V).
The disturbance in this example may be negligible and therefore may be ignored, thanks to the hysteresis.
But having said this, in cases where the input signal levels were above the hysteresis calculated range (2.7V - 2.3V) could result in generating supplementary fluctuating output transition responses.
To remedy this, the hysteresis range setting is required to be extended sufficiently to dismiss the induced disturbance in the given specific circuit model.
Section 2.1 provides you with a solution for determining components to fix the thresholds in accordance with your selected application demands.
Design of Hysteresis Comparator
Equations (1) and (2) can be of help to decide upon the resistors wished to create the hysteresis threshold voltages VH and VL. A single value (RX) is required to be arbitrarily picked out.
Within this illustration, RX was determined to 100k to help reduce current draw. Rh was computed to be 575k, accordingly the immediate standard value 576k was implemented. The confirmation for Equations (1) and (2) is presented in Appendix A.