enter image description here

I was thrown off by a certain website while learning about a op amp Schmitt trigger design. The layout was the same inverting config as the above schematic but gave a confusing answer to calculating high threshold.

Vout=5v high Vout=0v low Vref=5v

For the Vout low hysteresis the calc was:


For Vout high hysteresis was


Vout low made sense, but if Vout high was 5v I would have thought it would be (R2)/(R2+R3||R1)*Vref.

When I checked online calculator apparently I was correct. Can anyone set the record straight? Thanks.


3 Answers 3


Low threshold value is indeed

\$V_{low} = (R2||R3)/(R1+R2||R3)*V_{ref}\$

If the comparator is active high then the hysteresis offset is

\$V_{hys} =(R1||R2)/(R3+R1||R2)*V_{OutHigh}\$


\$V_{high} = V_{low} + V_{hys}\$

Assuming \$V_{ref}\$ is low resistance and \$V_{OutLow} = 0V\$

If the comparator is open collector then

\$V_{high} = V_{ref} * R2/(R1+R2)\$

  • \$\begingroup\$ Try multiplying the final formula by Vref (or just see my answer LOL). \$\endgroup\$
    – Andy aka
    Commented May 30, 2017 at 17:56
  • \$\begingroup\$ @Andyaka yup, I know, but you didn't add the formula for active high which where I was originally headed.... \$\endgroup\$
    – Trevor_G
    Commented May 30, 2017 at 17:59
  • \$\begingroup\$ Thank you both. I suppose what I had in mind which was neglected on the schematic I found (my fault) is a pull up resistor at output to 5v rail. Does that bring R3 into the equation like I had? \$\endgroup\$
    – Archaeus
    Commented May 30, 2017 at 18:21
  • \$\begingroup\$ @Archaeus with a pullup R4 add it to R3 in the Vhys equation \$\endgroup\$
    – Trevor_G
    Commented May 30, 2017 at 18:29
  • 1
    \$\begingroup\$ @Trevor Assuming the active high comparator, the calculator I checked and my formula matches your Vlow+Vhys for Vhigh. Works for me. I'll give you the bump for the different configs in your answer. Cheers. \$\endgroup\$
    – Archaeus
    Commented May 30, 2017 at 19:16

You are correct in that the formula given is wrong.

For a proper comparator (with open collector output), the upper limit is: -

\$\dfrac{V_{REF} \cdot R2}{R1+R2}\$

If the device is in fact an op-amp then the upper limit will involve the positive supply rail.


I disagree with the other answers.

  • use Vref, R1,R2 to get Veq & Req equivalent series source.

  • if Veq is set to output midpoint = input midpoint

    • e.g. 2.5V=Veq and Req=1/2*R1
  • then Vin(+)= Req/(Req+R3)* |(Vout-Veq)|

  • entering your output state for Vout then defines your upper and lower limits, such as 1% and 33%, two common thresholds for different applications.

  • also CMOS schmitt gates are high input impedance with 1/3 to 2/3 Vdd thresholds, nom.

  • but here with a rail to rail comparator to use 1/3 and 2/3 Vdd for thresholds.(nominal) you set R3=R1=R
    • then Vin(+)will have a Vpp hysteresis of 1/3 Vdd centered at Vdd/2

but I could be wrong .. I"m having coffee and carrot cake at an outdoor cafe. But Vin+ is a result of R1,2,3 and Vout and Vref=Vout max

  • \$\begingroup\$ Lol thanks Tony. The last part made made me chuckle. Enjoy the cake \$\endgroup\$
    – Archaeus
    Commented May 30, 2017 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.