The Schmitt inverter is a digital device that acts like a NOT gate - a logic 1 at the input results in a logic 0 at the output and vice versa. However, the Schmitt inverter behaves differently to a simple NOT gate because the output changes state very cleanly - it is either logic 0 or logic 1 and never anything else. The input voltage needed to make the output change state is different depending on whether the input voltage is rising or falling. These features make the Schmitt inverter an ideal interface between analogue circuits (such as potential dividers) and digital circuits (such as counters).
All of the standard logic gates are available as Schmitt input logic gates - the output responds to changes in the input voltage differently depending on whether the input voltage is rising or falling.
Schmitt trigger circuits - very much like Schmitt inverters - can also be made from Op-Amps.
The Schmitt inverter often comes as a 14 pin IC with six inverters on one chip. The inverters can be used completely independently of each other. The hex Schmitt Inverter has the same pin layout as a hex NOT gate and can be used as a direct replacement, especially when the inverter has an analogue or slowly changing input.
A Schmitt inverter acts like a NOT gate. The transfer characteristics show that when Vin is LOW (zero), Vout is HIGH and when Vin is HIGH (logic 1), Vout is LOW. Vout changes from HIGH to LOW when Vin is approximately 3 volts (for a CMOS IC using a 5 V power supply). Vout changes from LOW to HIGH when Vin is approximately 2 volts.
The transfer characteristics show that the output changes state at one particular input voltage when the input voltage is rising (increasing) and a different input voltage when the input voltage is falling (reducing). There is no input voltage where the output is anything other than on or off. The shape of the transfer characteristics graph is the symbol for a Schmitt device.
It is important to understand the difference between a NOT gate or simple Inverter and the Schmitt Inverter.
The transfer characteristics for a typical NOT gate show that there is a region, shaded, where the output voltage changes slowly from one logic level to the other.
Section A: Vin is LOW enough that Vout is definitely Logic 1, HIGH
Section B: Vin is between Logic 1 and Logic 0 and Vout is neither HIGH nor LOW but in an in-between state. In this region, circuits connected to the Inverter could interpret Vout as HIGH or LOW leading to unreliable and unpredictable system behaviour
Section C: Vin is HIGH enough that Vout is definitely Logic 0, LOW
If the input voltage to a logic circuit, not just an inverter circuit, is either analogue or changes slowly from one logic state to another, Schmitt input gates should be used to avoid errors and unexpected system behaviour.
Consider a system that takes a slowly rising input voltage and at some particular value (the threshold voltage) the system output goes from Logic 1 to Logic 0 and remains at Logic 0. The system might be a comparator, a logic circuit or a simple NOT gate. An application of this system might be a trigger for a monostable that opens the curtains when the slowly rising light level reaches a certain brightness in the morning. The light level, and hence the input voltage, is generally increasing but fluctuates, maybe due to clouds or shadows.
The Input voltage reaches the threshold voltage and the Output goes from Logic 1 to Logic 0 as required
The Input now falls back below the threshold voltage and the Output returns to Logic 1 for a short time before going back to Logic 0. This is not what is required. Instead of a single falling edge Output signal, there are now four falling edges on the example shown.
Consider a similar system that takes a slowly rising Input voltage and produces a falling edge when a certain threshold voltage is reached. This time the system uses a Schmitt Inverter.
The Input voltage reaches the upper threshold voltage and the Output falls from HIGH to LOW. A single clean falling edge is produced as required
As the Input changes and falls again, it does not reach the lower threshold voltage. The Output remains LOW and no further falling edges are produced. The system works as expected producing a single clear transition in the Output voltage from HIGH to LOW the first time the Input signal becomes high enough. Subsequent (small) changes in the Input voltage have no effect.
When a mechanical switch or push button is used the metal contacts can bounce meaning that the circuit is made and broken again several times in rapid succession. Switch bounce is very rapid and after only a few microseconds the switch is firmly connected, which does not affect circuits such as bulbs that simply need to be turned on. However, switch bounce can be a serious problem if the switch is an input to a counter circuit or a sequential logic circuit such as a D-type flip flop. The multiple makes and breaks will be counted as individual events causing counting errors or random behaviour in flip flop circuits.
Switches can be de-bounced using either a monostable or an RC circuit with a Schmitt inverter.
When the push button is pressed the expected output is a single clean transition from logic 0 to logic 1 but in reality several pulses may be produced as the mechanical contacts bounce.
Using a monostable means that the first contact of the switch triggers the output and subsequent bounces are ignored. The monostable triggers on a rising edge (shown by the circle / NOT gate on the trigger input).
The advantage of using a monostable circuit is that a single clean pulse of a known duration is produced when the button is pressed. The time period of the monostable must be longer than the duration of the bounces.
The disadvantage of using a monostable is that the output does not stay high if the push button is pressed and held. Another disadvantage is that several logic gates and timing components are needed for each push button or switch.
Using a capacitor and the pull-down resistor used with the push button to form an RC circuit means that, when the button is pressed, the capacitor can charge rapidly. When the switch bounces, the capacitor can only discharge slowly through the resistor and the voltage remains relatively constant rather than dropping back to zero. The capacitor is effectively smoothing the pulses produced by the bouncing of the switch contacts. When the push button is released, the capacitor discharges through the pull-down resistor. The time constant of the RC circuit must be longer than the bouncing of the contacts but short enough so that the output signal goes low almost as soon as the button is released. The Schmidtt inverter is required to ensure a single clean transition as the RC circuit discharges when the push button is released. In the diagram, the second Schmitt inverter is used as a simple inverter to re-invert the output.
The advantage of using an RC circuit and Schmidtt inverter is that a single clean change of output state is achieved with minimal component count.
The disadvantage of using an RC circuit Scmidtt inverter is that several components are required including the Schmidtt inverter, which is an active component. It is sometimes possible to use just the capacitor which is a much simpler passive solution.
In the above examples the time that the switch bounces for is assumed to be around 100 µs and therefore a time period for the monostable of 10 ms is more than adequate. The time constant of the RC circuit with R = 10 kΩ and C = 1 µF is τ = 10 ms which is longer than the switch bounces for but shorter than human reaction time so the effect of the RC circuit should not be noticed in practice. In reality it is often necessary to experiment to find the values that work depending on the type of switch used and the application.
© Paul Nicholls
December 2021
Electronics Resources by Paul Nicholls is licensed under a Creative Commons Attribution 4.0 International License.