ELM409
About Contact Bounce
The circuit of Figure 1 below shows one possible
connection that might be made between a mechanical
switch and a digital circuit. The pushbutton could be
used to summon an elevator, or to turn a circuit on, or
it could be a switch that is operated by foot pressure to
count the number of people entering a room. It does
not matter what the function is actually - in every case
we simply need a clean signal to present to the logic.
taken from our pushbutton tests (and shows the output
from the ELM409 in the lower trace). Note that the
signal alternates between high and low several times,
bouncing between the levels. This bounce occurs
when the moving contacts of the switch meet the
stationary contacts, and is simply due to the physics of
the two parts meeting one another. The bounces do
not seem to have a defining characteristic that would
allow the behaviour to be predicted and filtered - it is
basically digital noise.
Normally, the pushbutton will not be pressed, so
its contacts will be open, and the digital circuit will ‘see’
If this signal were to be input to the digital circuit
as it is, it would be seen as at least two switch presses
(and maybe more). Note that when the contacts open,
there is a similar problem, as shown in Figure 3:
Digital
Circuit
Figure 1. Pushbutton input to digital logic
only a resistor to circuit common (a ‘low ‘input). When
the pushbutton is pressed, the contacts close and the
digital circuit will be connected to the positive power
supply, or a logic ‘high’. It should be a simple matter of
processing this signal, but it is often not.
The oscilloscope trace of Figure 2 shows the
voltage that the digital circuit of Figure 1 might see
when the pushbutton is pressed. It is an actual trace
Figure 3. Bounce on switch opening
Seeing multiple inputs for a single switch press is
certainly not what is intended by any circuit, and it
needs to be addressed. The technique of ‘cleaning up’
such a signal is commonly known as ‘debouncing’, and
that is what the ELM409 does. It simply waits until the
bounces stop, then waits an additional time (the
debounce time) to be sure that there are no more
bounces likely to occur. Choosing an appropriate
debounce time is a design choice, but 25 msec seems
to be a good value.
There are several analog methods of performing
the ‘debouncing’ of a signal, many that work extremely
well, but we do not think that any work better than the
ELM409.
Figure 2. Bounce on switch closing
ELM409DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
4 of 8