Comparator to Hysteresis

Electron Avatar

Achieving HYSTERESIS,
Description and discussion

The ultimate beginner’s guide to turning noisy inputs into clean, reliable outputs

This is the famous Hysteresis schematic diagram. Forget about it now. You’ll MASTER this in just 10 minutes.

The logical sequence for anyone new to hysteresis is: What, Why, and then How. And that’s exactly what we are going to do here.

What is Hysteresis?
A comparator IC chip has two inputs. It compares them and produces one output that shows which input is higher. We apply the input voltage (V1) to the inverting input (IN-) and a reference voltage (Vref) to the non-inverting input (IN+). The comparator compares them. Then:

  • If (Vref) is higher than (V1), the output Vout goes to Vs+ (high).
  • If (V1) is higher than (Vref), the output Vout goes to Vs- (low).

In this simple case, (Vref) is a single, constant threshold. It makes the output give an ON signal while (V1) is still below the threshold, and it makes the output give an OFF signal the moment (V1) reaches the threshold.
If we can make two thresholds at (Vref) instead of one, this is Hysteresis.

Why do we need two thresholds instead of one (hysteresis)?
Let’s understand this with a simple example. Suppose you need to design a circuit to control the charging of a 12V battery. You have a DC charging source and these requirements:

  • The battery must stay connected to the charger until its voltage rises to 14V.
  • When it reaches 14V, the charging must be disconnected to avoid damage.
  • As soon as the charging is disconnected, the battery voltage immediately drops to 13.5V.

This creates a problem if you use a standard comparator with only one threshold.
If you set the reference voltage at the non-inverting input (IN+) to 14V, the comparator stays ON and keeps charging until the battery reaches 14V. At 14V, it switches OFF and stops the charging. The battery voltage then instantly drops to 13.5V. Now the input voltage is again below the 14V reference, so the comparator switches back ON. It charges again, reaches 14V instantly because the battery is already fully charged, switches OFF, drops to 13.5V, switches ON again — and it keeps switching ON and OFF continuously.
This rapid, repeated switching can damage both the battery and the circuit. To solve this, we need two thresholds at the reference input (IN+).
First threshold (on the way up): 14V. When the rising battery voltage reaches 14V, the comparator switches OFF.
Second threshold (on the way down): A lower voltage, for example 12V. The comparator will not switch back ON until the falling battery voltage drops below this lower threshold (e.g., below 12V), not just below 13.5V.
This gap between the two thresholds stops the fast ON-OFF cycling and makes the charging stable. That was the answer to “why” we need hysteresis.

gkjhgkjhgj

Now that we understand what hysteresis is and recognize its importance, the remaining task is to determine how to configure a comparator chip—which typically has a single threshold—to provide two thresholds instead of one.

It is worth noting that the technical content and approach presented in this article and blog post are drawn from the *LM393 Hysteresis* handbook, by: Khalid Basyouni. I encourage you to explore the book’s contents, where you will find a wealth of additional practical engineering information. The book explains circuit design in general, with a specific focus on comparator circuits. It details design equations and their practical application, teaching you how to determine the individual impact of each component and resistor on circuit performance and output voltage levels. This way, you can fine tune the performance of the circuit. You will also learn how to verify your design results before physically implementing the circuit. Furthermore, the book offers extensive practical guidance on circuit implementation. You will not regret studying this book and keeping it as a reference for your work, studies, and electronic circuit projects.


Electron Avatar

Written by

Leave a Reply

Your email address will not be published. Required fields are marked *