Comparators with Hysteresis (Schmitt Trigger)

Noise in real-world systems can cause fluctuations in signal levels, hence the need for implementing hysteresis. Figure 1 shows a possible scenario that the changes in input levels cause the false trigger of the comparator outputs.

change-in-voltage-level.jpg
Figure 1

Hysteresis is simply a positive feedback technique used in, for example, op-amp configurations to provide pre-determined comparator thresholds. Hysteresis can also be called a Schmitt Trigger. The figure below shows an op-amp hysteresis circuit. This op-amp is an inverting comparator with Vin connecting to the V– (inverting input) while the positive terminal (V+) connects to the midpoint of the voltage divider (R2 and R3) forming a positive feedback network. V+ is now the upper and lower thresholds of the comparator set by the R2, and R3.

hysteresis.jpg
Figure 2

Assuming VDD and VSS of the op-amp are +5 V, and -5 V, and R2 = R3. When Vin starts to rise from 0 V, Vout goes to the positive rail 5 V due to its high gain. The upper threshold is now at 2.5 V set by the voltage divider. While Vin continues to rise from 0 V (before 2.5 V), Vout stays at 5 V due to the high gain of the comparator. Once Vin rises slightly above 2.5 V, Vout flips to the – 5 V rail (V– > V+). The comparator’s threshold V+ now is set at – 2.5 V, again by the voltage divider. Vin continues to increase above 2.5 V while Vout remains at – 5 V (V– > V+). As Vin (V–) starts to fall from its peak just below 2.5 V, it continues to stay low -5 V. V– remains less than V+. Once Vin (V–) falls below – 2.5 V (V– < V+), Vout flips to the positive rail, +5 V. The same mechanism repeats to the next cycle. We now successfully set a hysteresis zone between +2.5 V and -2.5 V. To change the zone threshold values, you can simply adjust the size of R2, and R3.

hysteresis_waveform.jpg
Figure 3
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.