#### 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.

## Introduction

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.

## Background

### Objective

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 (*V _{CC}*) to a low voltage (~0 V) when the input level reaches

*V*. For a falling input voltage, we want the output of the circuit to transition from a low voltage (~0 V) to high voltage (~

_{TH↑}*V*) when the input level reaches

_{CC}*V*.

_{TH↓}### Definitions

*V*_{TH↑}- Comparator threshold voltage for positive-going signals.
*V*_{TH↓}- Comparator threshold voltage for negative-going signals.
*V*_{CC}- Supply voltage for the circuit. This will be a single-supply Schmitt trigger.
*V*_{Z}- The Zener diode breakdown voltage.

## Analysis

### Setup Circuit Equations

Figure 2 shows how I apply Kirchoff’s nodal equations to the circuit of Figure 1 and I determine equations for *V _{TH↓}* and

*V*and

_{TH↑}. V_{Plus}*V*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.

_{Minus}

Given equations for *V _{TH↓}* and

*V*, I can solve them for normalized

_{TH↑}*R*and

_{3}*R*values.

_{5}### Solve Equations for R_{3} and R_{5}

Figure 3 shows how I solved for R_{3} and R_{5} in terms of the hysteresis voltages (*V _{TH↓}*,

*V*) and Zener diode breakdown voltage (

_{TH↑}*V*

_{Z}).

### Denormalization

While not required, you can denormalize *R _{3}* by multiplying by

*R*. Similarly,

_{4}*R*is denormalized by multiplying by

_{5}*R*. Figure 4 illustrates the process.

_{1}### Example

To illustrate how to use the equations for *R*_{3} and *R _{5}*, I will work an example with the following parameters.

*V*= 3.3 V, which is the system supply voltage._{CC}*R*_{4}= 10 kΩ, arbitrary chosen value*R*_{1}= 1.33 kΩ, arbitrarily chosen value*V*_{Z}= 2.5 V*V*_{TH↓ }= 11.75 V*V*_{TH↑}= 12.25 V

Given these design parameters, I will now use the formulas for *R*_{3} and *R*_{5} to complete the circuit design.

#### Determine Component Values

Figure 5 shows how we can compute value for *R*_{3} and *R _{5}*.

#### Simulation Results

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 *V _{TH↓} = 11.75 V, *

*V*which are our desired hysteresis voltages. Here is the color code used in this plot.

_{TH↑}= 12.25 V,- 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.

## Conclusion

Just a quick note to demonstrate how to solve a common circuit design problem using a computer algebra system.

Pingback: Comparator – some math / Komparator – trochę matmy | DareIT

Pingback: Open-Drain Comparator Circuit With Settable Trigger and Output Levels | Math Encounters Blog