Schmitt Trigger Calculator
Electronics
- The Schmitt trigger switches when its divider node crosses the output: thresholds sit at +/-Vsat x Rg/(Rf + Rg).
- Form the divider ratio: 10,000/(10,000 + 10,000) = 0.5000.
- Scale the saturation voltage: 12 V x 0.5000 = 6.00 V, so the upper threshold is +6.00 V and the lower is -6.00 V.
- The hysteresis width is twice the threshold magnitude: 12.00 V of noise immunity between switch points.
A plain comparator has one trip point, and that is its weakness: when a slow or noisy input hovers near the threshold, the output chatters, firing dozens of edges for what should have been a single switch. The Schmitt trigger fixes this by having two thresholds instead of one - a higher voltage that switches the output on the way up, and a lower voltage that switches it back on the way down. The gap between them, the hysteresis, is what the noise has to beat before it can cause a false edge, and in a resistor-divider design you choose that gap exactly.
This calculator works out the upper and lower thresholds and the hysteresis width for the classic divider-based Schmitt trigger, where the output feeds a resistor divider whose tap sets the reference node. Enter the feedback resistor from output to node, the ground resistor from node to ground, and the saturation voltage - how far the output actually swings, which for a single-supply comparator is the rail and for a split-supply op-amp is close to it. The result tells you where the circuit will switch in each direction and how much noise immunity you have bought.
Schmitt triggers hide inside sensor interfaces, debounced switch inputs, waveform shapers, relaxation oscillators and the digital inputs of most microcontrollers. Getting the thresholds right on paper first saves the classic bench surprise of a circuit that works with a clean function generator and falls apart on a real sensor.
Worked examples
Equal divider on 12 V rails
(10000 ohm · 10000 ohm · 12 V)
| Upper threshold | +6.00 V |
| Lower threshold | -6.00 V |
| Hysteresis width | 12.00 V |
| Divider ratio Rg/(Rf+Rg) | 0.5000 |
47k over 10k on 15 V rails
(47000 ohm · 10000 ohm · 15 V)
| Upper threshold | +2.63 V |
| Lower threshold | -2.63 V |
| Hysteresis width | 5.26 V |
| Divider ratio Rg/(Rf+Rg) | 0.1754 |
Loose divider on 5 V rails
(1000 ohm · 47000 ohm · 5 V)
| Upper threshold | +4.90 V |
| Lower threshold | -4.90 V |
| Hysteresis width | 9.79 V |
| Divider ratio Rg/(Rf+Rg) | 0.9792 |
How a Schmitt trigger switches
The trick is positive feedback. The output voltage is divided down and applied to the reference side of the comparison, so the threshold itself moves depending on which state the output is in. When the output sits high, the threshold sits high with it, and the input must climb past that upper threshold to flip the output low. Once flipped, the threshold drops to its lower value, and the input must now fall all the way back down before anything changes again. Between the two thresholds the circuit simply remembers its last state.
Because the threshold moves away from the input after every switch, noise riding on the signal cannot immediately undo the transition. A noise spike has to be larger than the full hysteresis width to cause a spurious edge, and even then it has to arrive while the input is loitering between the thresholds. That is why Schmitt inputs are the standard cure for slow edges from RC sensors, mechanical contacts and long cables.
- Upper threshold: the input level that flips the output on a rising signal
- Lower threshold: the (different) level that flips it back on a falling signal
- Hysteresis width: the difference between the two - your noise immunity budget
- The thresholds are symmetric about zero in a split-supply design, or about the divider's bias point in single-supply variants
The divider formula for the thresholds
In the divider design the node voltage is a fixed fraction of the output voltage: Rg/(Rf + Rg), where Rf runs from the output to the node and Rg from the node to ground. The input switches when it crosses that node voltage, so the thresholds are simply plus and minus Vsat multiplied by the divider ratio. Equal resistors give a ratio of 0.5000 and thresholds at half the saturation voltage; making Rg smaller pulls both thresholds toward zero and narrows the hysteresis.
Two design consequences follow. First, the thresholds can never exceed the rails, because the ratio is always below one. Second, threshold and hysteresis are locked together in this topology: the width is always twice the threshold magnitude, so you cannot independently choose a wide dead band centred somewhere unusual without adding a bias source. For most debouncing and squaring jobs the locked pair is exactly what is wanted.
| Example | Divider | Rails | Upper threshold | Hysteresis |
|---|---|---|---|---|
| Equal divider | 10 kohm / 10 kohm | +/-12 V | +6.00 V | 12.00 V |
| Stiff divider | 47 kohm / 10 kohm | +/-15 V | +2.63 V | 5.26 V |
| Loose divider | 1 kohm / 47 kohm | +/-5 V | +4.90 V | 9.79 V |
Worked example: equal resistors on 12 V rails
Take Rf = Rg = 10 kohm and an op-amp saturating at +/-12 V. The divider ratio is 10000/(10000 + 10000) = 0.5000, so the upper threshold is +6.00 V and the lower is -6.00 V. A rising input does nothing until it passes +6.00 V; after switching, it must fall below -6.00 V to switch back. The hysteresis width is 12.00 V - an enormous noise budget, appropriate for a very dirty signal but useless if your sensor only swings a few volts, which is why real designs usually pick a stiffer divider.
The second example shows that: 47 kohm over 10 kohm on +/-15 V rails gives a ratio of 0.1754 and thresholds of +/-2.63 V with 5.26 V of hysteresis. The third example goes the other way - 1 kohm over 47 kohm on +/-5 V rails gives a ratio of 0.9792, thresholds at +/-4.90 V and a 9.79 V width, near the maximum this topology can produce.
Choosing thresholds for noisy signals
Start from the signal, not the resistors. Note the highest level the input reaches when it means business and the noise amplitude riding on it. The upper threshold must sit below the genuine high level with margin, and the hysteresis width must exceed the peak-to-peak noise. If those two constraints fight - the noise is nearly as big as the signal - no threshold choice will save the design; filter the input first and let the Schmitt trigger clean up what remains.
Also check what saturation voltage to enter. Op-amps on split supplies swing to within a volt or two of the rails; comparators with open-collector outputs swing to the pull-up rail; logic-family Schmitt inputs have thresholds fixed by the datasheet as fractions of the supply. This calculator covers the divider design, where you set the fractions yourself - for fixed-threshold logic parts, read the thresholds straight from the datasheet instead.
Schmitt triggers versus plain comparators
A comparator answers the question 'is the input above this fixed line right now?' A Schmitt trigger answers 'has the input decisively crossed into the other region?' The first is the right tool for precise level detection in measurement circuits; the second is the right tool whenever the output drives a counter, an interrupt pin or anything else that would suffer from repeated edges. Many practical circuits use both: a comparator for the accurate measurement, a Schmitt stage to square up the result for the digital world.
The same positive-feedback network also makes a relaxation oscillator when you add an RC network at the input - the thresholds computed here set that oscillator's swing limits and, with the RC time constant, its frequency. If you are designing that oscillator, the hysteresis width from this page is the number that goes into the timing formula.
Design notes: resistor values and real outputs
Absolute resistor values do not enter the threshold formula - only the ratio does - but they still matter. Very large values make the node sensitive to leakage and input bias currents, which shift the thresholds; very small values waste supply current and load the output. The kilohm-to-tens-of-kilohms range in the examples is the practical sweet spot for op-amp and comparator circuits, and it keeps divider current well above typical bias currents.
Also remember that real outputs rarely swing perfectly rail to rail into a load. A comparator pulling a heavy load, or an op-amp on tired supplies, may saturate a few hundred millivolts short of the figure you entered, and the thresholds shrink in proportion. If the switching points matter precisely, measure the actual swing on the bench and re-run the numbers with the measured Vsat.
One last check: the divider current. It flows from the output through both resistors whenever the output is high or low, so confirm the output stage can supply it alongside the real load - a comparator that can barely drive its load will saturate early and drag the thresholds with it.
FAQs
What are the thresholds with equal 10 kohm resistors and 12 V rails?
The divider ratio is 0.5000, so the thresholds are +6.00 V and -6.00 V, with a 12.00 V hysteresis width.
How much noise can a Schmitt trigger reject?
Noise smaller than the hysteresis width cannot cause a false switch: the first example's width is 12.00 V, while the stiffer 47 kohm / 10 kohm example still rejects anything under 5.26 V.
What does a 47 kohm and 10 kohm divider give on 15 V rails?
The ratio is 0.1754 and the upper threshold is +2.63 V, the lower -2.63 V.
How do I make the thresholds smaller?
Shrink Rg relative to Rf: the threshold is Vsat multiplied by Rg/(Rf + Rg), so a smaller ground resistor pulls both thresholds toward zero.
Can the threshold exceed the supply rail?
No: the ratio Rg/(Rf + Rg) is always below 1, so thresholds stay inside the rails by construction.
What thresholds does a 1 kohm / 47 kohm divider give at 5 V?
The ratio is 0.9792, the thresholds are +/-4.90 V and the hysteresis width is 9.79 V.