In the fantasy world of schematic diagrams, wires have no resistance and square waves have infinitely sharp rise times. The real world, of course, is much crueler. There are many things you can use to help tame the wild analog world into the digital realm. Switches need debouncing, signals need limiting, and you might even need a filter. One of the basic elements you might use is a Schmitt trigger. In

In this installment of Circuit VR, I’m looking inside practical circuits by building Schmitt triggers in the Falstad circuit simulator. You can click the links and get to a live simulation of the circuit so you can do your own experiments and virtual measurements.

Why Schmitt Triggers?

You usually use a Schmitt trigger to convert a noisy signal into a clean square digital logic level. Any sort of logic gate has a threshold. For a 5V part, the threshold might be that anything under 2.5V is a zero and at 2.5V or above, the signal counts as a one. Some logic families define other thresholds and may have areas where the signal is undefined, possibly causing unpredictable outputs.

There are myriad problems with the threshold, of course. Two parts might not have exactly the same threshold. The threshold might vary a bit for temperature or other factors. For parts with no forbidden zone, what happens if the voltage is right at the edge of the threshold?

A Schmitt trigger input is a bit different. It has two thresholds. One threshold is how much voltage it takes to trip the input from a zero to a one. The other threshold is how much it takes to trip a one to a zero. For example, if an input starts at 0.3V and starts rising a Schmitt Trigger inverter will see that as a zero and output a one. As the input passes, say 2.5V, the output will shift to a zero because the input is now a 1. So far, this is just like a normal gate. The difference is when the input begins to fall. When the input is at 2.4V, a normal gate would have already flipped the input to the opposite state. The Schmitt trigger, though, will maintain a one until the input crosses the second threshold. Perhaps that’s 2V.

This is very similar to a home thermostat. If your heater is set to warm the house to, say, 70 degrees, it won’t turn on at 69.9 degrees. The temperature will have to fall a bit before the heater will kick on and return the temperature to 70. This is known as hysteresis. Technically, the term refers to the dependence of the state of a system on its history. In order to predict the output of the Schmitt trigger, you need to know both the input voltage and the previous input state. In a way, it is an analog version of a simple state machine.

Here’s a graph showing a signal slowing going up to 5V and then back down to zero. The square trace …read more

Source:: Hackaday