Scmitt Trigger Hysteresis Calculations with Op Amps

Discussion in 'General Electronics Chat' started by Wendy, Dec 23, 2012.

  1. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    It comes up pretty regularly, so I am going to show how hysteresis is calculated. This is not an exact science, mostly due to the fact almost all op amps simply do not go rail to rail, if you get within a volt or so you are lucky. The output voltages a op amp can reach matters a lot. Knowledge of the basic operation of op amps is assumed through out.

    If by chance you do have a circuit that goes rail to rail things get much simpler, so I will show both assumptions, starting with the simpler cases first.

    OK, so we are dealing with a classic perfect op amp, input impedance is consider negligible in all cases (because even the worst op amp is pretty good on this spec). It is assumed the reader knows how to connect the power supply and filter/bypass caps.

    Dual power supplies

    So we start off with the two most common Schmitt Triggers, inverting and non-inverting schematics. The concepts are pretty simple.

    .....Inverting Schmitt Trigger ..... Non-Inverting Schmitt Trigger
    ................................... Figure 1

    Even though this is a analog device, the output will be digital. In many cases a Schmitt trigger is also known as a single bit A/D convertor. The key is the positive feedback, once the output starts changing, even a little, this is fed back to the inputs and the output swings all the way over until it maxes out on the other power supply rail.

    Something I have found helpful in understanding this circuit is to do a slight redraw, to help look at it another way.

    ....Inverting Schmitt Trigger ....... Non-Inverting Schmitt Trigger
    ................................... Figure 2

    This is to show the feed back resistors are simply voltage dividers. The op amp is the power source, and it compares the input voltage with the voltage divider feedback. Calculations on the two switch points are fundamentally based on simple voltage divider equations, which are just another variation of Ohm's Law.

    With a dual power supply the reference is usually ground. This is not a requirement, just convention. I will cover other scenarios using single power supplies later in this article.

    For those beginners who have not studied voltage dividers, or are weak on them, the current is set by the total resistance. This current is then used to calculate the amount of voltage drop across a single resistor. Figure 3 shows the schematic and math of the two cases of voltage dividers used.

    ...................................................Figure 3

    Example 1 is what the inverting Schmitt Trigger uses, the Vo is compared to the input voltage of the Schmitt Trigger. Vcc is the output of the op amp. What makes a Schmitt Trigger digital is if the inputs are close enough (say within a µV or so) the output changes. The smallest of changes will cause Vo to change, which is fed back into the input, causing a run-away reaction leading to the output swing the full range to the other rail of the power supply.

    Using the math shown, you calculate the hysteresis by going through both examples (a high and a low output) of the op amp. The two answers will give you the total voltage spread of the setpoints, which is also a function of the power supply voltage.

    Math Example #1, Figure 1, Inverting Schmitt Trigger: Vcc is ±12V DC, R1 = 33KΩ, R2 = 10KΩ
    ...If the output of the op amp is a high (12V DC) then the setpoint to switch low is 9.21V.
    ...If the output of the op amp is a low (-12V DC) then the setpoint to switch high is -9.21V.

    Example 2 shows how the non-inverting feedback works, and how the math changes. Again, Vcc is the output of the op amp. In every other way it works pretty much like the inverting version of a Schmitt Trigger.

    It is important to note that a non-inverting Schmitt Trigger does not isolate very well, there is a tendency to have current feed in or out of the input from the op amp output. The way to fight this is to use larger value resistors. This is probably a good idea on its own merits, larger resistors mean less current used overall.

    Math Example #2, Figure 1, Non-Inverting Schmitt Trigger: Vcc = ±12V DC, R1 = 33KΩ, R2 = 10KΩ
    ...If the output of the op amp is high (12V DC) then the setpoint to switch low is

    The Non-ideal Op Amp

    The only difference between real world op amps and what I have shown is the fact (as has been mentioned) you don't really know what the output voltage of the op amp will be until it is measured. I don't think it is mentioned in most data sheets, so some experimentation may be needed to establish the correct values.

    Single Power Supplies

    Many cases op amps are assumed to have dual power supplies. This is actually a bad assumption. I have written an article showing how you might create a virtual power supply ground, but the truth is you don't need anything very complicated. A simple voltage divider with a filter cap will usually suffice.

    The same principle can be used to adjust where the center point of the hysteresis is. As I said, using ground for a dual power supply is only convention. Generally you want it mid-range of the power supply range though.

    Shown below is the usual schematics for a single power supply Schmitt Trigger.

    ....Inverting Schmitt Trigger...........Non-Inverting Schmitt Trigger
    ......................................Figure 4

    This basic variation can also be used to vary the center of the hysteresis of a dual power supply Schmitt Trigger too.
    Last edited: Jan 1, 2013
  2. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    Picture Cluster #1
    Last edited: Jan 1, 2013