Schmitt Trigger Calculator results give the feedback resistor R3 and the ground resistor R2 for the upper and lower thresholds. It also works back from resistors to the thresholds.
The signal goes through R1 to the + input. R3 feeds the output back to it, R2 ties it to ground, and Vref sits on the - input.
Reference, Output Levels and Tolerance
Output levels are what the comparator really swings to, which is often short of the supply rails.
Input Signal and Noise
The signal must swing past both thresholds, and the hysteresis must be wider than the noise riding on it.
Oscillator Timing
For an RC oscillator, Rt runs from the output to the - input and Ct from the - input to ground.
Thresholds With Other Feedback Resistors
| R3 | Upper | Lower | Hysteresis |
|---|---|---|---|
| 5.000 kΩ | 6.600 V | -3.400 V | 10.00 V |
| 11.00 kΩ | 4.418 V | -127.3 mV | 4.545 V |
| 23.50 kΩ | 3.451 V | 1.323 V | 2.128 V |
| 50.00 kΩ | 3.000 V | 2.000 V | 1.000 V |
| 110.0 kΩ | 2.782 V | 2.327 V | 454.5 mV |
| 235.0 kΩ | 2.685 V | 2.472 V | 212.8 mV |
| 500.0 kΩ | 2.640 V | 2.540 V | 100.0 mV |
What the Schmitt Trigger Calculator Solves
A Schmitt trigger is a comparator with positive feedback. The feedback gives it two switching points instead of one. The output changes at the upper threshold when the input is rising and at the lower threshold when it is falling. The gap between the two is the hysteresis.
Another name for the circuit is a comparator with hysteresis. The upper threshold VTH is also called the upper trip point, UTP or VT+. The lower threshold VTL is the lower trip point, LTP or VT-. A signal that wanders between the two leaves the output where it is.
That is the point of a Schmitt trigger. TI's brief on understanding Schmitt triggers lists the main uses as cleaning up noisy signals, turning slow edges into fast ones and changing a sine wave into a square wave. Switch debouncing and simple oscillators use the same idea.
The Schmitt Trigger Calculator covers the two types built around a comparator or an op-amp, non-inverting and inverting, so it doubles as a comparator hysteresis calculator. Each type runs in two directions. Resistors From Thresholds designs the Schmitt trigger circuit, and Thresholds From Resistors checks one that already exists.
Non-Inverting Schmitt Trigger Calculator
In a non-inverting Schmitt trigger the signal reaches the + input through R1. R3 feeds the output back to the same pin, R2 ties it to ground, and Vref sits on the - input. The output goes high when the input rises past VTH. The equations for the two thresholds differ only in the output level.
Subtracting one from the other leaves the hysteresis. It depends only on the output swing and the ratio of R1 to R3, which is why the design mode finds R3 first. A wider output swing or a smaller R3 gives more hysteresis.
Take thresholds of 3 V and 2 V, R1 at 10 kΩ, a 2 V reference and an output that swings 0 V to 5 V. The Schmitt Trigger Calculator returns R3 = 50.00 kΩ and R2 = 33.33 kΩ. The nearest E96 parts are 49.9 kΩ and 33.2 kΩ, which put the thresholds at 3.003 V and 2.001 V.
R2 is there to make a fixed reference fit. Setting Reference to Calculate Vref drops R2 and returns the one reference that works without it, 2.500 V in this example. TI's non-inverting comparator design for 1.7 V and 1.3 V on a 3 V supply arrives at 1.4958 V. The calculator gives 1.500 V, and the small gap is TI's pull-up resistor.
The signal source has to push current through R1 in this circuit. The third card shows 100.3 µA at the upper threshold and a resistance seen by the source of 29.94 kΩ. A source with a high resistance of its own adds to R1 and shifts both thresholds.
Inverting Schmitt Trigger Calculator
In the inverting comparator with hysteresis, the signal goes straight to the - input, so the source is barely loaded. Three resistors meet at the + input. R1 comes from a supply or reference, R2 goes to ground and R3 comes from the output. The output goes low when the input rises past VTH.
When the output swings from 0 V to the same voltage VS that feeds R1, the design equations are short. They match the ones in TI's comparator with and without hysteresis circuit.
TI's comparator with hysteresis reference design by Art Kay and Timothy Claycomb gives a check. It wants 2.7 V and 2.3 V from a 5 V supply with a 100 kΩ resistor to the supply, and it calculates 575 kΩ for the feedback resistor. The Schmitt Trigger Calculator returns R3 = 575.0 kΩ and R2 = 100.0 kΩ, then picks 576 kΩ from E96 as TI did.
The Schmitt Trigger Calculator also takes output levels that differ from the divider source. Enter them as Output High Level and Output Low Level, and the general form of the equations is used in place of the short one.
Hysteresis, Noise and Signal Swing
To design a Schmitt trigger circuit, start from the signal and its noise. The hysteresis has to be wider than the noise riding on the signal, measured peak to peak. Both thresholds also have to sit inside the signal's swing, or the output never switches.
The fourth card in the Schmitt Trigger Calculator checks both. It judges the worst case, with every resistor at its tolerance limit. With 200 mV of noise on the default example it reads Clean Switching on This Signal. The narrowest hysteresis less noise is 782.2 mV and the worst-case overdrive is 1.977 V.
Raise the noise past the hysteresis and the alert reads The Output Can Chatter. A signal that peaks below VTH gives Signal Never Reaches VTH. The red alerts quote the worst-case threshold, such as an upper threshold that can sit as high as 3.023 V at ±1%.
A smaller R3 widens the hysteresis and a larger one narrows it. The Thresholds With Other Feedback Resistors table shows the effect. These rows are for R1 = 10 kΩ, R2 = 33.33 kΩ, a 2 V reference and a 0 V to 5 V output.
| R3 | Upper | Lower | Hysteresis |
|---|---|---|---|
| 23.50 kΩ | 3.451 V | 1.323 V | 2.128 V |
| 50.00 kΩ | 3.000 V | 2.000 V | 1.000 V |
| 110.0 kΩ | 2.782 V | 2.327 V | 454.5 mV |
| 235.0 kΩ | 2.685 V | 2.472 V | 212.8 mV |
| 500.0 kΩ | 2.640 V | 2.540 V | 100.0 mV |
A signal too small to cross both thresholds can be amplified first. The Non-Inverting Op-Amp Resistor Calculator sizes a stage that adds gain and an offset, which moves a small sensor signal into the window.
Output Levels, Tolerance and Pull-Ups
The thresholds depend on what the output really swings to, not on the supply. An op-amp can be used as a Schmitt trigger, but many stop short of the rails. With the E96 parts above and an output that only reaches 3 V, the lower threshold moves from 2.001 V to 2.402 V and the hysteresis shrinks to 601.2 mV.
The same op-amp with its feedback returned to the - input is an amplifier, which is the case covered by the Op Amp Gain Calculator. A comparator switches faster than an op-amp and is the better part for a Schmitt trigger comparator stage.
Resistor tolerance moves the thresholds as well. With ±1% parts the second card in the Schmitt Trigger Calculator shows the upper threshold between 2.983 V and 3.023 V and the lower between 1.989 V and 2.013 V. The hysteresis can be anywhere from 982.2 mV to 1.022 V. The fourth card subtracts the noise from the narrowest figure, so a design that passes there still passes with parts at their limits.
TI's reference design assumes a push-pull output. An open-collector comparator needs a pull-up resistor, and that resistor adds to R3 while the output is high. TI's TLV1702 data sheet says the error stays small when R3 is more than 100 times the pull-up.
Schmitt Trigger Oscillator Timing
An inverting Schmitt trigger becomes an oscillator with two more parts. Rt runs from the output to the - input and Ct from the - input to ground. The capacitor charges toward the output until it reaches VTH, the output flips, and it discharges to VTL.
The frequency is 1 divided by the sum of the two times. TI's relaxation oscillator circuit uses three equal resistors, which set the trip points at one-third and two-thirds of the supply. Three 10 kΩ resistors on 5 V give 3.333 V and 1.667 V in the Schmitt Trigger Calculator.
With Rt = 15 kΩ and Ct = 100 nF, that circuit runs at 480.9 Hz with the output high 50.0% of the time. The Oscillator Timing section opens only in the inverting mode. Other thresholds change both the frequency and the high share.
Schmitt Trigger IC, Comparator and 555
What is the difference between a Schmitt trigger and a comparator?
A plain comparator has one threshold. It switches every time the input crosses that voltage, so noise near the threshold makes the output chatter. A Schmitt trigger adds positive feedback, which splits the threshold in two and holds the output steady between them.
The cost is a small shift in the switching point. Each threshold sits about half the hysteresis away from the center, so the output changes a little later than a plain comparator would. Keep the hysteresis only as wide as the noise requires.
What is a Schmitt trigger IC or buffer?
It is a logic gate with the hysteresis built in. TI notes that most logic families offer the '14 as an inverting Schmitt trigger and the '17 as a non-inverting one, which is the Schmitt trigger buffer. The thresholds are fixed inside the chip and scale with the supply.
In TI's example at 1.65 V the hysteresis is between 0.36 V and 0.64 V. No resistors are needed, and none can change it. The Schmitt Trigger Calculator is for the comparator and op-amp circuits where R1, R2 and R3 set the thresholds.
Can a 555 timer be used as a Schmitt trigger?
Yes. Tie the trigger and threshold pins together and use them as the input. The TI NE555 data sheet sets the two internal trip points at one-third and two-thirds of the supply, so the chip acts as an inverting Schmitt trigger.
On 5 V the thresholds are 1.667 V and 3.333 V, a hysteresis of 1.667 V that cannot be adjusted. Add a resistor and a capacitor and the same chip oscillates, which is the circuit in the 555 Timer Astable Oscillator Circuit.
What are the limitations of a Schmitt trigger?
The thresholds are only as good as the parts around the comparator. They move with resistor tolerance, with the real output levels and with any source resistance in the non-inverting circuit. The comparator's own offset voltage adds a little more.
A Schmitt trigger also cannot fix noise that is larger than its hysteresis, and it reports a crossing slightly late. For a tight window, use ±0.1% resistors and a comparator with a push-pull output, then check the spread on the second card.