Model comparator switching with programmable hysteresis thresholds. Enter rails, reference, and feedback resistors instantly values. Export results to share, document, and verify designs quickly.
The switching node is a two-source resistive divider between the output and the reference. With R1 from the output to the threshold node and R2 from Vref to the same node:
| Voh (V) | Vol (V) | Vref (V) | R1 | R2 | VTH+ (V) | VTH- (V) | ΔV (V) |
|---|---|---|---|---|---|---|---|
| 5.0 | 0.0 | 2.5 | 10 kΩ | 100 kΩ | ≈ 2.727 | ≈ 2.273 | ≈ 0.455 |
| 3.3 | 0.1 | 1.65 | 22 kΩ | 220 kΩ | ≈ 1.792 | ≈ 1.508 | ≈ 0.284 |
Comparator hysteresis adds intentional positive feedback to create two switching thresholds. The output changes state at one level, then requires a different level to switch back. This behavior is also called Schmitt triggering and is widely used in digital conditioning.
Without hysteresis, small noise around the threshold can cause rapid toggling. A controlled hysteresis width sets a noise band that must be exceeded. For example, a 0.30 V band rejects ripple smaller than 0.30 V peak-to-peak.
This calculator models the threshold node as a divider between the output and Vref. When the output is high, the upper threshold is computed using Voh. When the output is low, the lower threshold is computed using Vol. The hysteresis width depends on the output swing Voh − Vol.
Many designs use resistor values from 10 kΩ to 1 MΩ to balance loading and noise. With Voh = 5 V, Vol = 0 V, Vref = 2.5 V, R1 = 10 kΩ, and R2 = 100 kΩ, the thresholds are about 2.727 V and 2.273 V, giving ΔV ≈ 0.455 V. Doubling both resistors keeps thresholds nearly unchanged but reduces current.
A mid-supply reference such as Vref = VCC/2 is common for centered switching. Ground reference is common for pulse shaping and zero-crossing style detection. If the input is biased, set Vref near the desired center level to maximize margin.
The threshold network should not overload the reference source or input stage. A low resistor pair increases current and can shift Vref if it is weak. A very high pair increases sensitivity to input bias currents and leakage. A practical check is keeping divider current at least ten times bias current.
Propagation delay and output saturation can slightly shift effective switching points. Fast comparators may switch in tens of nanoseconds, while slower parts can be microseconds. Output rise and fall levels also depend on load, pull-ups, and supply headroom. Use realistic Voh and Vol values when precision matters.
After computing thresholds, verify the input waveform crosses both levels cleanly. Record Voh, Vol, Vref, and resistor choices for repeatable builds. The CSV export is useful for design reviews and version tracking. The PDF export supports lab notes and project documentation today.
It means the comparator uses two thresholds instead of one. The input must rise above VTH+ to switch one way, and fall below VTH− to switch back, improving stability.
The width is ΔV = (Voh − Vol)·R1/(R1 + R2). Larger R1 increases hysteresis, while larger R2 reduces it. The ratio matters more than the absolute values.
The divider math is the same for the threshold node. What changes is which input pin sees the signal, so the direction of switching versus rising input differs.
Many outputs do not reach the supply rails under load. If Voh is lower or Vol is higher than ideal, the thresholds and hysteresis width change accordingly.
Yes. Use the design mode to enter desired thresholds. The calculator derives the resistor ratio and a required Vref. Fix one resistor value to obtain practical R1 and R2.
A common starting range is 10 kΩ to 220 kΩ. It limits current while keeping the node less sensitive to leakage. Increase values when power is critical and references are strong.
If Vref is outside the expected window, or the output swing is limited, the divider can place thresholds above Voh or below Vol. Recheck Vref, Voh, Vol, and the resistor ratio.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.