Electrical & Electronics

Comparator & Schmitt Trigger Calculator

Calculate switching thresholds and hysteresis, or choose standard feedback resistors.

01

Your inputs

Design for target thresholds

R1 stays fixed; Rf uses the selected series. Vref is adjusted to preserve the threshold midpoint.

Ideal push-pull model with specified output voltages. Check comparator input range, offset and resistor tolerances; internal hysteresis is excluded.

02

Your results

Lower threshold · VT−
—
Upper threshold · VT+
—
Hysteresis width
—
Threshold midpoint
—
Hysteresis curve
Formula—

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

  1. Choose the topology and analyse or design mode. Match the resistor connections to the displayed diagram.
  2. Enter reference and output voltages and resistor values using the displayed units. In design mode, enter the desired lower and upper thresholds.
  3. 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Ω
Expected result
− / +V↓V↑ΔV
−2.272727 V2.727273 V0.454545 V
+2.25 V2.75 V0.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.