Comparator Hysteresis Calculator

Non-inverting R1/R2 = 1/10, VREF 2.5 V, 0–5 V is VTH 2.73 V and VTL 2.25 V.

Calculator

PASS0.48 V windowVTH 2.73 V · VTL 2.25 V

VTH/VTL from the feedback divider. Open-collector VOH is the pull-up node (LM393-class). An LM358 used as a linear amplifier belongs on the op-amp pages. Threshold algebra only — not a circuit sign-off.

Topology
Output type
VTH
2.73 V
VTL
2.25 V
Δ (window)
0.48 V
VOH
5 V
VOL
0.2 V
R1/R2
0.1000
Rpull
4.7 kΩ
  • Pass Hysteresis window: VTH = 2.73000 V, VTL = 2.25000 V, Δ = 0.480000 V. Threshold algebra only — not a circuit sign-off.
  • Pass Output type: Open-collector (LM393-class): VOH is the pull-up node, not a totem-pole rail. An LM358 used as a linear amplifier belongs on the op-amp pages.
  • Pass Open-collector pull-up: Unloaded VOH = Vpull = 5.00000 V. A DC load current was not entered, so IR drop is unknown.
non-inverting open-collector comparator, VTH 2.73 V, VTL 2.25 V State-trajectory hysteresis loop and feedback network. Open-collector pull-up is drawn only for that output type. LM358 linear amplifier is a different tool. Not a circuit sign-off. Non-inverting · open-collector Vin R1 OC R2 Rpull → Vpull 5 V VREF 2.5 V VTH 2.73 V · VTL 2.25 V · Δ 0.48 V LM393 open-collector ≠ LM358 linear amp Loop: low until Vin rises to VTH, high until Vin falls to VTL Vin → · ↑ Vout VTH VTL

Formula

Non-inverting upper threshold

VTH=VREF(1+R1/R2)-VOL(R1/R2) VTH = VREF (1 + R1/R2) − VOL (R1/R2)

Non-inverting lower threshold

VTL=VREF(1+R1/R2)-VOH(R1/R2) VTL = VREF (1 + R1/R2) − VOH (R1/R2)

Window

Δ=VTH-VTL Δ = VTH − VTL = (VOH − VOL) (R1/R2) non-inverting

Variables

Symbol Meaning Unit Typical range Precision Default
top Topology — — 1 sig non-inverting
out Output type — — 1 sig open-collector
VREF Reference V — 4 sig 2.5 V
R1 R1 Ω ≥ 0 mΩ 4 sig 1 kΩ
R2 Feedback R2 Ω ≥ 0 mΩ 4 sig 10 kΩ
Vpull Pull-up rail V — 4 sig 5 V
Rpull Pull-up Ω ≥ 0 mΩ 4 sig 4.7 kΩ
VOH High output V — 4 sig 5 V
VOL Low output V — 4 sig 0.2 V
Iol Load current (optional) A — 4 sig
Cload Load C (optional) F — 4 sig
VTH Upper threshold V — 4 sig —
VTL Lower threshold V — 4 sig —
Vhys Hysteresis window V — 4 sig —
ratio R1/R2 — — 4 sig —

Worked example

Non-inverting open-collector, 2.5 V, 1 kΩ/10 kΩ

Unloaded VOH = Vpull. Threshold algebra, not a circuit sign-off.

Input Value
top · Topology non-inverting
out · Output type open-collector
VREF · Reference 2.5 V
R1 · R1 1 kΩ
R2 · Feedback R2 10 kΩ
Vpull · Pull-up rail 5 V
Rpull · Pull-up 4.7 kΩ
VOL · Low output 0.2 V
Output Value
VTH · Upper threshold 2.73 V
VTL · Lower threshold 2.25 V
Vhys · Hysteresis window 0.48 V

How it works

A comparator with a little positive feedback remembers the last state between two thresholds. This page solves that hysteresis window for the two common resistor placements, and it treats open-collector pull-up as a real output type: VOH is the pull-up node unless you enter a load current.

It will not sign off a circuit. An LM358 used as a linear amplifier is a different tool from an LM393-class open-collector comparator. The state-trajectory sketch is the loop — low until Vin reaches VTH, high until Vin falls to VTL.

Pitfalls

  • Treating an LM358 linear amplifier as an LM393 open-collector comparator. VOH is the pull-up node, not a totem-pole rail.
  • Forgetting Rpull on an open-collector output. This page will not invent one.
  • Reading the hysteresis window as a “safe/correct circuit” result. It is threshold algebra.
  • Putting R1 and R2 on the wrong input. Non-inverting and inverting formulas are not interchangeable.

FAQ

What are VTH and VTL for 2.5 V, 1 kΩ/10 kΩ, 5 V open-collector, VOL = 0.2 V?

Non-inverting VTH = 2.73 V, VTL = 2.25 V. Unloaded VOH = Vpull.

Where do the resistors go?

Non-inverting — signal through R1 into +, VREF on −, R2 from output to +. Inverting — signal on −, R1 from VREF to +, R2 from output to +.

Is this an LM358 page?

No. LM358 as a linear amplifier is the op-amp tools. LM393-class open-collector is the pull-up path here.

Does a green check mean the circuit is correct?

No. Checks label the numbers you typed. There is no overall safe/correct-circuit pass.

Related

Sources