2.4 Schmitt Trigger

The Schmitt trigger is an analog comparator with hysteresis, a dead-zone where the output remains in the same state until the input exits the zone. This prevents a marginal signal from causing output oscillations. The output function for the Schmitt trigger is shown in the figure below.

Figure 2-4. Schmitt Trigger - Output Function Example

Unlike other configurations, the feedback network is connected to the non-inverting input. This creates positive feedback, which helps the output latch to either VDD or GND.

Figure 2-5. Schmitt Trigger Schematic

The switching points of the Schmitt trigger are set by a combination of bias voltage and feedback resistors. In the state where the output is 0V, the feedback resistors act as a voltage divider. When the divided signal is greater than the bias voltage the output flips.

V L O W _ S W = R 2 + R 1 R 2 * V B I A S

In the case where the output is VDD, the feedback resistors also act as a voltage divider (with the resistors flipped).

V H I G H _ S W = V D D ( ( R 2 + R 1 R 1 ) * V B I A S )

From these two expressions, the amount of hysteresis can be calculated:

V H Y = | V D D ( R 1 + R 2 ) * ( 1 R 1 + 1 R 2 ) * V B I A S |

If the microcontroller contains an integrated resistor ladder, rather than entering absolute values into the above expression, the values of the resistors relative to a fixed (or arbitrary) value (for example, R1 = 4R and R2 = 6R, where R is an unknown or arbitrary number) can be entered since the resistance units cancel out.