Quote of the Day
No. I would either have to embarrass too many people, or I would have to lie. I refuse to do either.
— General George C. Marshall's response when offered $1M to write his memoir on WW2.
I have a home project that requires me to design a Schmitt trigger circuit. There are numerous places on the web where you can find design equations for the Schmitt trigger constructed using an open-drain comparator. Unfortunately, these design equations do not model the output low-level saturation voltage of the comparator and in my application I need to be concerned about this voltage. My objective is to determine formulas for the resistors in the circuit as a function of the various threshold and output voltage levels I require.
As I have mentioned before, I met Otto Schmitt (Figure 1) when I was an undergraduate. As one of so many clueless undergraduates, I had no idea who I was talking to when I met him. He just seemed like another kindly old professor at the time. His office was in a decrepit structure called the Temporary Engineering Annex, which were WW2-era buildings that eventually were torn down. As I came to know more about him, I realized what a major league engineer he was. The University of Minnesota is starting to put together a web memorial to him at this location. I did find a pretty good discussion of his life and accomplishments at this web site.
I have been fortunate to meet and be influenced by people like him throughout my life. Hopefully my sons will be able to say similar things about their upbringing and education.
Schmitt Trigger Description
The Wikipedia defines the Schmitt trigger circuit as
A comparator circuit with hysteresis, implemented by applying positive feedback to the non-inverting input of a comparator or differential amplifier.
Comparators are circuits that make decisions − they decide a one voltage is larger or smaller than another voltage called the reference or VRef. In a noise-free environment, these decisions would be unambiguous. However, the real-world is full of noise and this noise can make the comparator output toggle wildly when input voltage is near VRef. This noise-stimulated toggling is usually a problem for the circuits monitoring the comparator output. The Schmitt trigger is designed to alter its reference level after the output switches so that noise will not cause further switching.
Figure 2 shows the output versus input characteristic of an inverting Schmitt trigger circuit. Notice how positive-going signals will have their threshold level lowered and negative-going signals will their threshold level raised.
Here are the variable definitions used in my analysis.
- Comparator threshold voltage for positive-going signals.
- Comparator threshold voltage for negative-going signals.
- Output high-voltage from the comparator. Since I am using an open-drain comparator, the output high-level voltage is determined by the external resistor network.
- Output low-voltage from the comparator, which is often referred to as the negative saturation voltage or just saturation voltage.
- Supply voltage for the circuit. This will be a single-supply Schmitt trigger.
My calculation objective is create formulas for each of the resistors in the circuit as a function of the my critical voltage specifications, which are , , , , and .
Because there are so many variables (5), I have chosen to normalize my calculations. In this case, I will express all the voltages relative to VCC and all resistors relative to R1. This reduces the number variables down to three, which is more manageable. My graduate school adviser, Aram Budak, would always chastise me when I carried around unnormalized variables in my calculations. He said the extra work was simply not worth it, and he was right. For those who want to see a more conventional derivation, see my response to a question at the bottom of the post.
I begin my calculations by expressing R4 in terms of my voltage specifications (see Figure 4).
In Figure 5, I now setup a system of equations that will give me the equations that I need to compute my normalized resistor values.
Figure 6 shows a worked example. Notice how I normalize all the voltages before I insert them into my formulas and then I need to unnormalize the results.
Before I build a circuit, I always like to simulate it. Here are my LTSpice results for this circuit.
Figure 7 shows the circuit I simulated.
Figure 8 shows my simulation results. My critical voltages are exactly what I wanted because my equations allowed me to model the finite output voltage of the comparator when in the "low" state (~0.152 V).
In this blog post I designed a simple Schmitt trigger circuit for use in a home project. As part of this effort, I was able to derive equations for the associated resistor values in terms of the normalized transition and output voltages. My equations allow me to account for the non-zero output voltage of the comparator when it is in the "low" state. I simulated the circuit using LTSpice and I showed that it worked as I expected.