Many times you make simple op-amp comparator circuit, but output starts jumping up and down like anything near the triggering point just because of small electrical noise. Relay and microcontroller will get totally confused with this nonsense.
Only proper solution is adding positive feedback to make it a Schmitt trigger. But doing paper maths for upper and lower threshold voltages every single time you change a resistor value is too much headache and waste of time.
Why you want to break your head doing formulas manually? Just use this ready-made Op-Amp Hysteresis Calculator tool. Select your circuit type, put your resistor and saturation values, and it will give you exact switching limits straight away without any confusion.

Op-Amp Hysteresis Calculator
VIN is applied to the inverting (−) input. The non-inverting (+) input receives positive feedback through Rf and is connected to VREF through R1.
How to Use the Op-Amp Hysteresis Calculator
This calculator is used for finding the upper threshold voltage, lower threshold voltage and hysteresis voltage of an op-amp comparator circuit using positive feedback.
Hysteresis is useful in comparator circuits because it prevents the output from switching ON and OFF repeatedly when the input voltage is close to the switching point.
In a normal comparator there is usually one main switching level. But in a Schmitt trigger there are two switching levels. The upper threshold is the voltage at which the output changes its state when the input voltage is going upwards. The lower threshold is the voltage at which the output changes its state when the input voltage is coming down.
The difference between these two voltages is called the hysteresis voltage or hysteresis width.
How to use the calculator
First select the circuit type from the Configuration Type box.
There are two options available:
- Inverting Schmitt Trigger
- Non-Inverting Schmitt Trigger
For the Inverting Schmitt Trigger, the input signal is connected to the inverting or minus input of the op-amp.
The positive or plus input gets the feedback from the output through the feedback resistor Rf. It is also connected to the reference voltage through resistor R1.
For this circuit, enter the required VREF voltage, Rf value, R1 value, positive saturation voltage and negative saturation voltage.
After entering the values, click the Calculate Thresholds button. Then calculator will show the upper threshold, lower threshold and hysteresis width.
For the Non-Inverting Schmitt Trigger, the input signal is applied to the non-inverting or plus input through Rin.
The output is also fed back to this same input through Rf. The inverting or minus input is kept at the reference voltage VREF.
In this mode, enter the values of VREF, Rf, Rin, positive saturation voltage and negative saturation voltage. Then click the Calculate Thresholds button to get the results.
Understanding the results
The Upper Threshold Voltage, or VUT, is the input voltage at which the output changes its state when the input voltage is increasing.
The Lower Threshold Voltage, or VLT, is the input voltage at which the output changes back to the other state when the input voltage is decreasing.
The Hysteresis Width is simply the difference between the upper and lower threshold voltages. For example, suppose the calculator gives an upper threshold of 3 V and a lower threshold of 2 V. When the input voltage is increasing, the output will not change state until the input reaches 3 V.
After the output changes state, the input voltage must come down below 2 V before the output changes back again. So in this example the hysteresis width is 1 V.
This difference between the two switching levels is what gives the Schmitt trigger its noise immunity.
Why hysteresis is useful
Suppose the input signal has some small amount of noise around the switching point. Without hysteresis, this noise can make the comparator output switch ON and OFF many times very quickly. With hysteresis, the input has to cross one threshold to change the output, and then cross the other threshold to change it back.
Because of this, small noise signals around the switching point normally cannot make the output change state continuously.
Selecting the resistor values
The feedback resistor Rf and the other resistor used in the feedback or reference network decide how much positive feedback is applied to the circuit.
Changing the resistor ratio will change the amount of hysteresis. More positive feedback generally gives a larger difference between the upper and lower thresholds.
Less positive feedback gives a smaller difference between the two thresholds. The VREF voltage is mainly used for shifting the threshold levels to the required voltage range. So by changing VREF, the complete hysteresis window can be moved upward or downward.
About the saturation voltage
The positive and negative saturation voltages entered in the calculator should be close to the actual output voltage limits of the op-amp or comparator.
For example, if an op-amp is powered from +12 V and -12 V, its output may not actually reach exactly +12 V and -12 V.
Many ordinary op-amps cannot swing completely up to their supply rails. The actual output saturation voltage can therefore be somewhat lower than the supply voltage.
For better accuracy... use the output saturation voltage given in the op-amp datasheet. You can also measure the actual output voltage in the circuit and use those values.
Important note
This calculator is based on the specific Schmitt trigger circuit arrangements described above.
There are many different ways of building Schmitt trigger and comparator circuits. If the resistor connections in your circuit are different, the calculation formula can also be different.
So before using the calculated values for an actual circuit, make sure that your circuit connection is the same as the configuration used by this calculator.
This calculator can be useful for designing many circuits such as noise-resistant switching circuits, zero-crossing detectors, battery voltage monitors, temperature controllers, light activated switches, window comparator circuits, waveform shaping circuits and other op-amp or comparator based circuits.




Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic!