Electrical & Electronics
Comparator & Schmitt Trigger Calculator
Calculate switching thresholds and hysteresis, or choose standard feedback resistors.
Your inputs
Your results
- Lower threshold · VT−
- —
- Upper threshold · VT+
- —
- Hysteresis width
- —
- Threshold midpoint
- —
—Set switching thresholds with positive feedback
Compare inverting and non-inverting Schmitt circuits using ideal output levels. Positive feedback creates separate rising and falling thresholds. The calculation shows static hysteresis, not propagation delay, noise immunity or a particular comparator's operating range.
Step by step
- Choose the topology and analyse or design mode. Match the resistor connections to the displayed diagram.
- Enter reference and output voltages and resistor values using the displayed units. In design mode, enter the desired lower and upper thresholds.
- Inspect both thresholds and the hysteresis width. After applying a preferred resistor, review the achieved values and errors.
Settings and limits
- Output levels
- Use realistic VOL and VOH, not automatically the supply rails. An open-collector output's high level depends on its pull-up and load.
- Resistor ratio
- R1 and Rf determine feedback strength differently in each topology. Changing their ratio changes hysteresis; scaling both preserves ideal thresholds.
- Preferred values
- Design mode rounds feedback resistance to the selected series and recalculates reference. The achieved thresholds can differ from the targets.
Worked example
Enter the inverting example below in analyse mode. Sweep the input upward: output switches low at the upper threshold. Sweep downward: it switches high at the lower threshold.
Example input
Vref = 2.5 V; VOL = 0 V; VOH = 5 V
R1 = 10 kΩ; Rf = 100 kΩ| − / + | V↓ | V↑ | ΔV |
|---|---|---|---|
| − | 2.272727 V | 2.727273 V | 0.454545 V |
| + | 2.25 V | 2.75 V | 0.5 V |
The non-inverting circuit switches in the opposite direction. Its thresholds differ even with the same resistors, reference and output levels.
Questions and troubleshooting
What happens between thresholds?
Output retains its previous state. The static model cannot determine an initial state inside the band; the hysteresis plot shows both paths.
Why is a design rejected?
Check threshold ordering, output-level ordering and topology. Inverting hysteresis must be narrower than the output span; invalid combinations cannot produce positive resistor values.
Will a real comparator switch exactly here?
Offset, resistor tolerances, input-range limits, output loading and delay shift behaviour. Verify the selected device and pull-up against its datasheet.