This demo illustrates how hysteresis is generated to apply the design of the last example for battery chatger.
Interactive demonstration
This interactive application shows the process very clearly. It first shows the action manually, and then automatically using the comparator instead of the switch.
How to use it:
First, Manual mode (with toggle switch):
- Click the “Manual switch” tab.
- Click any of the buttons 0, 1, or 2. They show the three states of R3: not connected, connected to V1, or connected to Ground.
- Notice how the voltage at “A” changes with each click. You will see the calculation details at the bottom of the demo window.
Second, Automatic mode (with comparator hysteresis):
- Click the “Automatic – comparator hysteresis” tab.
- Click the “Play sweep” button to see it in action. Vin now sweeps from 0V to 15V and then back to 0V in a continuous cycle.
- During the sweep, a slider moves with the change in Vin. You can move the slider manually or pause at any position to study it.
- The voltage at “A” (which is now the non-inverting input IN+) is always shown on the diagram and below the slider.
- Below the slider, there is also a HIGH / LOW output indicator and a live note that explains what is happening at that moment.
- At the bottom of the window, there is a live graph that shows Vin rising and falling and the corresponding HIGH / LOW switching of the comparator’s output.
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.
