In short: A Schmitt trigger feeds a fraction β of its output back to the non-inverting input, creating two switching thresholds, ±β·Vsat, so noise smaller than the 2β·Vsat hysteresis window can never cause false toggling.
Why a plain comparator chatters
An ordinary comparator flips whenever its two inputs cross. Feed it a slow sensor signal with 50 mV of ripple riding on it, and as the signal creeps through the reference the output can toggle dozens of times in a few microseconds. Each toggle is a false edge for a counter, an interrupt line or a motor driver. The same thing happens to a mechanical switch that bounces for a millisecond or two.
The cure is not a filter, which adds delay and still leaves a single threshold. The cure is to give the circuit memory: the threshold it uses next depends on what it did last. That is hysteresis, and positive feedback is the way to build it. If you first want the sibling topology, our non-inverting Schmitt trigger article covers the version where the signal drives the + terminal.
The inverting Schmitt trigger circuit
The input drives the inverting terminal. The output returns through R2 to the non-inverting terminal, which is also tied to ground through R1. Because the op-amp has huge open-loop gain and the feedback is positive, the output has only two stable states, +Vsat and −Vsat. The voltage on the + pin is a divider of the output:
V+ = β·Vout, with β = R1/(R1+R2). The comparison point itself moves when the output moves.
Deriving the two thresholds
Start with the output at +Vsat. This happens when Vin is below V+. Then V+ = +β·Vsat. The output will stay high until Vin rises past that value. So the upper trip point is
VUT = +β·Vsat
The instant Vin exceeds VUT, the differential input goes negative and the output slams to −Vsat. Now the divider delivers V+ = −β·Vsat. For the output to flip back, Vin must fall below this new, lower value, the lower trip point:
VLT = −β·Vsat, so the hysteresis width is VH = VUT − VLT = 2β·Vsat.
With the nodes referenced to a voltage Vref instead of ground (R1 returned to Vref), both thresholds shift: VUT,LT = Vref(1−β) ± β·Vsat when Vsat is symmetric about zero. Hysteresis width does not change; only the centre does. Real parts only reach Vsat within a volt or so of the rails, so use the datasheet output swing, not the supply, in your numbers.
A worked design example
Suppose a ±13 V supply gives Vsat ≈ ±12 V. Choose R1 = 10 kΩ and R2 = 20 kΩ, so β = 1/3. Then VUT = +4 V, VLT = −4 V and the window is 8 V wide. For a single 5 V supply with a rail-to-rail part, tie R1 to a 2.5 V reference and let the output swing 0 to 5 V. Taking R1 = 10 kΩ and R2 = 40 kΩ gives β = 0.2, and the thresholds sit at 2.5 ± 0.2×2.5 = 2.0 V and 3.0 V, a 1 V window centred on mid-supply.
| R1 | R2 | β | Thresholds (±12 V output) | Hysteresis |
|---|---|---|---|---|
| 10 kΩ | 90 kΩ | 0.10 | ±1.2 V | 2.4 V |
| 10 kΩ | 20 kΩ | 0.33 | ±4.0 V | 8.0 V |
| 10 kΩ | 10 kΩ | 0.50 | ±6.0 V | 12.0 V |
Watch the extremes: as β approaches 1 the thresholds approach the output swing, and an input that cannot reach them will never switch the circuit.
The transfer characteristic and noise immunity
Noise immunity follows directly. If the noise riding on your signal has a peak-to-peak amplitude Vn, then choosing VH comfortably larger than Vn guarantees that after the output flips, noise alone can never carry the input back across the opposite threshold. In the 5 V example with a 1 V window, 600 mV p-p of ripple is tolerated with 400 mV to spare. Rules of thumb: size VH at 1.5 to 2 times the worst measured noise, but keep it well under the useful signal swing or you throw away sensitivity and add timing error equal to VH/slew rate.
Hysteresis rejects noise by amplitude, not by frequency. A filter attenuates fast noise but still has one threshold; a Schmitt trigger ignores any disturbance smaller than VH, whatever its spectrum.
Watch it switch
Where Schmitt triggers are used
- Switch debouncing and slow-edge cleanup: a 74HC14 or the 1-gate SN74LVC1G17 turns a lazy RC-filtered edge into a crisp digital one. Many CMOS I/O pads add 100 to 300 mV of input hysteresis for exactly this reason.
- Thermostat and level control: a float or temperature sensor switches a relay on at one level and off at a lower one, so the relay is not chattering around the setpoint.
- Relaxation oscillator: add an RC from the output to the inverting input. The capacitor charges toward the output until it reaches a threshold, the output flips, and it discharges toward the other threshold. The period is T = 2RC·ln((1+β)/(1−β)). With β = 1/3 that is about 1.386RC; R = 10 kΩ and C = 100 nF give roughly 1.39 ms, near 720 Hz.
- Zero-crossing and line detect: turn a noisy sine from a transformer into a clean square wave for a phase-locked loop or a mains-sync microcontroller input.
Our comparator with hysteresis article treats the open-collector LM393-style variant, where the pull-up resistor also enters the divider and makes the two thresholds slightly asymmetric.
Practical pitfalls and verification
Use a real comparator for the job where you can. A general-purpose op-amp driven into saturation recovers slowly, and many have clamping diodes between the inputs that conflict with large differential swings. Add a small capacitor across R2 (a few pF) as a speed-up and to suppress oscillation at the transition.
Simulate before you build. In Cadence Spectre via Virtuoso ADE, or Synopsys HSPICE, drive the circuit with a slow ramp plus a piecewise-linear or random noise source, run a transient analysis, and plot Vout against Vin using the XY view to see the loop. Then sweep resistor tolerance and temperature with Monte Carlo runs: with 1% resistors β varies by about ±1%, and Vsat itself drifts with load and supply, so corner-simulate the window width against your worst-case noise. The same hysteresis concept appears in IC input buffers, where it is verified in the pad cell characterisation. If you want a team to design or review the analog front end, Avecas design services covers analog and mixed-signal work, and structured training is available from ChipXpert.
Interview shortcut: VH = 2β·Vsat for the symmetric inverting case. Larger R2 relative to R1 means smaller β and a narrower window.
Build, simulate and debug circuits like this step by step in the CourseTron analog design courses.
FAQ
What is the difference between inverting and non-inverting Schmitt triggers?
In the inverting version the input goes to the minus pin, and a rising input drives the output low. In the non-inverting version the input is applied through a resistor to the plus pin and the output follows the input; its thresholds also depend on both resistors and are ±Vsat·R1/R2.
How do I choose the hysteresis width?
Measure the worst-case peak-to-peak noise at the comparator input, then set VH to roughly 1.5 to 2 times that, while keeping it well below the signal swing. Then pick β = VH/(2Vsat) and solve for R1 and R2.
Is a Schmitt trigger the same as a comparator?
No. A comparator has one threshold. A Schmitt trigger is a comparator with positive feedback that gives two thresholds and memory of its previous state.
Why does my Schmitt trigger never switch?
Usually the input does not swing past the threshold, because β is too large or Vsat was assumed to equal the supply when the output actually saturates one to two volts short of the rails.