Quote of the Day
If you were replaced, what would your successors do?
— Andy Grove, former CEO of Intel. This is a question he would ask himself in difficult management situations.
I previously wrote a blog post about how to select components for a Schmitt trigger circuit using a comparator with an open-collector output. An engineer stopped by my cube yesterday and asked if I could write-up the same analysis for a Schmitt trigger circuit using a comparator with a push-pull output. This post will provide that analysis. The only thing unusual about the circuit is the use of a Zener diode as a voltage reference instead of the more commonly seen resistor divider network.
This a very common electronic circuit. I think I have had some form of Schmitt trigger comparator circuit in every large analog design I have ever done.
The analysis is very similar to my previous presentation and I will let the mathematics speak for itself – this means a minimum of gloss.
Figure 1 is referred to as an inverting Schmitt-trigger circuit. For a rising input voltage, we want the output of the circuit to transition from a high voltage (VCC) to a low voltage (~0 V) when the input level reaches VTH↑. For a falling input voltage, we want the output of the circuit to transition from a low voltage (~0 V) to high voltage (~VCC) when the input level reaches VTH↓.
- Comparator threshold voltage for positive-going signals.
- Comparator threshold voltage for negative-going signals.
- Supply voltage for the circuit. This will be a single-supply Schmitt trigger.
- The Zener diode breakdown voltage.
Setup Circuit Equations
Figure 2 shows how I apply Kirchoff’s nodal equations to the circuit of Figure 1 and I determine equations for VTH↓ and VTH↑. VPlus and VMinus refer to the comparator inputs. I often solve circuit equations in terms of normalized component values. Normalized values have an “n” appended to their symbol.
Given equations for VTH↓ and VTH↑, I can solve them for normalized R3 and R5 values.
Solve Equations for R3 and R5
Figure 3 shows how I solved for R3 and R5 in terms of the hysteresis voltages (VTH↓, VTH↑) and Zener diode breakdown voltage (VZ).
While not required, you can denormalize R3 by multiplying by R4. Similarly, R5 is denormalized by multiplying by R1. Figure 4 illustrates the process.
To illustrate how to use the equations for R3 and R5, I will work an example with the following parameters.
- VCC = 3.3 V, which is the system supply voltage.
- R4 = 10 kΩ, arbitrary chosen value
- R1 = 1.33 kΩ, arbitrarily chosen value
- VZ = 2.5 V
- VTH↓ = 11.75 V
- VTH↑= 12.25 V
Given these design parameters, I will now use the formulas for R3 and R5 to complete the circuit design.
Determine Component Values
Figure 5 shows how we can compute value for R3 and R5.
I used LTSpice to simulate the circuit of Figure 1 populated with the circuit values shown in Figure 6.
Figure 7 shows the simulation results, which show that VTH↓ = 11.75 V, VTH↑ = 12.25 V, which are our desired hysteresis voltages. Here is the color code used in this plot.
- Yellow is my annotation color (i.e. I added them).
- Green is the output voltage (vOUT) from the circuit of Figure 7.
- Blue is the input voltage (vIN), which has a trapezoid.
- Red is the Zener voltage.
Just a quick note to demonstrate how to solve a common circuit design problem using a computer algebra system.