Article : Andy Collinson
All mechanical switches exhibit some form of 'contact bounce'. As two metallic contacts are pressed together, usually by a lever or spring there will be a finite amount of time (often up to 20 milliseconds) before a stable electrical contact is made. In this period, the switch contacts will radidly open and close, generating many
on-off transitions. This behaviour is not seen in electrical ciruits such as lamps, doorbells
and audio circuits but will cause havoc in any digital circuitry.
Imagine you have made a logic conter. You press the input switch and the output increments not by one but maybe
five. On the next press, it steps round seven. What's going on ? The answer lies in the inferior mechanical
contacts of a switch. What you need is a switch debouncer circuit.
There are two types of press button switch; normally open (NO) and normally closed (NC). The description
refers to the state of the contacts when the switch button is not pressed. Depending on the switch construction,
this mechanical contact bounce can last up to 20 milliseconds. Both switch types are frequently used in electronics and below are some suggestions for switch contact bedouncing circuits.
First an electrical simulation of contact bounce as shown below. The diagram is not very accurate but shows
the general idea:
The switch contacts will open and close many times before finally staying closed. A fast digital circuit will respond to each of the pulses causing mis-operation. All that a switch debouncer circuit has to do is eliminate these false impulses. There are several ways in which this can be achieved.
The simplest method is to use a filter circuit containing a resistor and capacitor. The time constant must be at least 20ms to avoid contact bounce. The general idea is shown below :
When SW1 is pressed and released the capacitor will be charged and then discharged via the 10k resistor. This may be OK for driving CMOS logic IC's but TTL chips require a cleaner pulse. With the aid of a simple monostable circuit a clean output pulse can be achieved. See below :
Another method is to use a Schmitt trigger such as the CMOS 4093. The schmitt trigger ensures that a
clean output pulse will be produced.
Dedicated switch debouncer IC's now exist and some are capable of debouncing up to four switch inputs such as the
CMOS4093. The CMOS 4093 is now hard to find but a hex input version, the MC14093 is available in surface mount.
Another switch contact debouncing circuit using a 555 Timer is shown in Switching Circuits.