More Than You Ever Wanted to Know About Electrical Engineering: The Schmitt Trigger
The Schmitt trigger is a common circuit incorporating a comparator. It’s also one of very few circuits which (purposefully) incorporate positive feedback.
A regular comparator will work fine for many applications, but think about what happens to it if you give it a noisy input signal. Instead of getting a nice, clean switch from a high state to a low state, or vice versa, you could see the output of the comparator bounce around quite a bit before settling.
What we need is a comparator with hysteresis - that is, a comparator whose output depends not only on its current input, but also on its past history. A comparator with memory.
A Schmitt trigger is exactly that. It’s not as complicated as it sounds, though. Here’s what a basic one looks like:
We can do the same node analysis at V+ as we’ve done for op-amp circuits previously. We can see that the actual input voltage the comparator sees is the sum of the input voltage and the output voltage, each multiplied by a factor determined by the resistors. Because this is a comparator, the output voltage will always be either the positive supply voltage or the negative supply voltage.
Now let’s think about what happens when V+ crosses the threshold (0 V, in this case).
If V+ is 0 V, then the input voltage must be (-R1/R2)*Vo. And Vo must be either the positive or negative supply voltage. If Vo was the positive supply voltage, then Vin will have to reach (-R1/R2)*Vsupp before the output switches. If Vo was the negative supply voltage, then Vin will need to reach (R1/R2)*Vsupp before the switch occurs.
In effect, you get a window around the threshold voltage whose bounds are determined by the resistors you choose, during which the comparator output retains its last value.
- Schmitt trigger is like a comparator in that it has a reference voltage and input signal - the difference is that Schmitt trigger has a high and low reference, by having feedback as a reference voltage via a potential divider - the system triggers when the input goes over V high, and doesn't trigger again until it drops below V low - for inverting, V-=Vi, Vthresh=R2/(R2+R1) *Vo - the difference between high and low threshold is called hysteresis voltage - an offset voltage can be added by adding an offset voltage Vs on the far end of the potential divider of the feedback - if Vs were ground, the threshold would be about 0V - oscillators have a constant repeating output - they have positive feedback because it is in phase with the input signal - thus there is 0 deg phase shift - also gain must be 1 to keep signal constant - at startup an oscillator must first be brought up to the correct amplitude - a wien bridge can be used to bring the gain up to 1 and maintain it -