A recent PetitFoo talk at the Chaospott on how to debounce keys with a Schmitt trigger prompted me to play with a 74HC14 IC I had lying around.

A Schmitt-trigger converts an analog voltage to a digital logic level. It has two voltage thresholds, and the interesting thing happens between the two:

  • Below the lower threshold the input is considered logically low, so the inverter outputs a logic high.
  • Above the upper threshold the input is considered logically high, so the inverter outputs a logic low.
  • Between the two thresholds the Schmitt-trigger keeps the input state, so the output doesn't change.
  • That last part of the behavior is called hysteresis. It helps to avoid uncontrolled switching due to noise on the input, especially when the input is changing slowly compared to the switching speed of a logic IC.

    Basic Behavior

    Here is an oscilloscope screenshot of the basic behavior of one inverter of the 74HC14, using a triangle wave from the function generator as the input: Oscilloscope screen showing 74HC14 schmitt-trigger behavior More ...