Worked example
Example: Illustrative 5 V comparator. The inputs, in the units selected above:
| Input | Value |
|---|---|
| Resistor from the reference to the + input | 10.000 kΩ |
| Feedback resistor from the output to the + input | 100.00 kΩ |
| Reference voltage | 2.5000 V |
| Output high level | 5.0000 V |
| Output low level | 0 V |
Applying the formula below gives:
| Result | Value |
|---|---|
| Upper threshold (input rising, output goes low) | 2.7273 V |
| Lower threshold (input falling, output goes high) | 2.2727 V |
| Hysteresis | 454.55 mV |
| Centre of the hysteresis band | 2.5000 V |
Open this example in the calculator and change any input.
Formula
\(V_{TH} = \frac{V_{ref}R_2 + V_{OH}R_1}{R_1 + R_2}, \quad V_{TL} = \frac{V_{ref}R_2 + V_{OL}R_1}{R_1 + R_2}, \quad V_H = \frac{(V_{OH} - V_{OL})R_1}{R_1 + R_2}\)
Variables
| Symbol | Meaning | SI unit |
|---|---|---|
| \(R_1\) | Resistor from the reference to the + input | Ω |
| \(R_2\) | Feedback resistor from the output to the + input | Ω |
| \(V_{ref}\) | Reference voltage | V |
| \(V_{OH}\) | Output high level | V |
| \(V_{OL}\) | Output low level | V |
| \(V_{TH}\) | Upper threshold (input rising, output goes low) | V |
| \(V_{TL}\) | Lower threshold (input falling, output goes high) | V |
| \(V_H\) | Hysteresis | V |
| \(V_c\) | Centre of the hysteresis band | V |
Method and standards
Schmitt trigger.
Where it is used
- Level switches and thermostats.
- Cleaning slow or noisy digital signals.
Common mistakes
- Swapping R₁ and R₂.
- Ignoring a pull-up on open-collector outputs.
Assumptions and limits
- Ideal comparator; no input current.
References
- Comparator with positive feedback (Schmitt trigger)
Questions and answers
How much hysteresis do I need?
More than the peak-to-peak noise on the input, typically 50–200 mV in a 5 V circuit.
Why does the centre shift away from the reference?
The output levels pull the + input; with outputs at 0 and 5 V the band centres above a 2.5 V reference set through a small R₁.
What do the defaults represent?
An illustrative 5 V comparator with a 2.5 V reference through 10 kΩ and 100 kΩ feedback.
Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.
Sources
Horowitz and Hill, The Art of Electronics, 3rd ed. (Cambridge, 2015)