Comparator Hysteresis Calculator Formula

Understand the math behind the comparator hysteresis calculator. Each variable explained with a worked example.

Formulas Used

Upper Trip Point

v_upper = v_ref + (v_supply - v_ref) * r2_kohm / (r1_kohm + r2_kohm)

Lower Trip Point

v_lower = v_ref - v_ref * r2_kohm / (r1_kohm + r2_kohm)

Hysteresis Band

hysteresis = v_supply * r2_kohm / (r1_kohm + r2_kohm)

Variables

VariableDescriptionDefault
v_refReference Voltage(V)2.5
v_supplyOutput High Voltage(V)5
r1_kohmR1 (to output)()100
r2_kohmR2 (to reference)()10

How It Works

Comparator Hysteresis

Positive feedback adds hysteresis to prevent output chatter on noisy signals.

Formulas

V_upper = V_ref + (V_out_high - V_ref) x R2 / (R1 + R2)

V_lower = V_ref - V_ref x R2 / (R1 + R2)

Hysteresis = V_out_high x R2 / (R1 + R2)

Worked Example

Vref = 2.5 V, output swings to 5 V, R1 = 100k, R2 = 10k.

v_ref = 2.5v_supply = 5r1_kohm = 100r2_kohm = 10
  1. 01Upper = 2.5 + (5 - 2.5) x 10/110 = 2.5 + 0.227 = 2.727 V
  2. 02Lower = 2.5 - 2.5 x 10/110 = 2.5 - 0.227 = 2.273 V
  3. 03Hysteresis = 5 x 10/110 = 0.455 V

Ready to run the numbers?

Open Comparator Hysteresis Calculator