Dictionary of Engineering Terms
"A" "B" "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"

## Switch Debounce

Switch Debounce is a mechanical switch bounces or changes state between open and close many times when the switch is moved from one position or the other [contact bounce]. A switch de-bounce circuit inhibits those contact changes from reaching the circuitry reading the switch position. The debounce circuit needs to eliminate all of the mechanical oscillations so that the circuits receiving the signal only sees one circuit open or closer. Other wise the circuit would see dozens of switch changes even though the switch button was only moved once.

Mechanical Relay Bounce

There are four basic ways to debounce a switch; Purchase a stand-alone Switch Controller to handle the problem, use an RC circuit to damp-out the circuit oscillations [filter], read the switch position many times to determine when the switch settles out and stops bouncing [microProcessor], or if possible wait until the switch stops bouncing. Remember if the contacts of a switch bounce for a few milliseconds, it took hundreds of milliseconds for a technician to toggle the switch, so waiting is not an issue [except for the large counter required to terminate the wait time]. A simple 555 Timer could be used as a counter with the switch closure being used as the Trigger pulse and the 555's output [time delayed] as the switch output. As shown in the right side-bar a 555 One Shot could also be used to eliminate contact bounce.

The two graphics above show the bounce rate of a mechanical relay, a switch bounce would appear the same. The graph to the upper right shows that a rely bounces longer when moving from an open position to a closed position. When testing bounce duration be sure to use the bounce time from open to close to get the longest duration contact bounce. The graph above is attempting to show that the physical travel of the contact grows shorter as the bounce progresses. That is, the arm still loses contact but does not move to the other switch position.

Microprocessor Control: If the circuit or switch is being read by a uP than it's possible to read the switch after the switch stops bouncing. The code is just written to see a transition and than wait a certain length of time to allow the switch bounce to subside. The uP can also be set up to read the switch position, and then not make a decision until it reads the same state a number of times in a row. For example if the switch position is changed the processor will not make a decision on the current position of the switch until the uP reads the same position hundreds of times. Remember the higher the clock frequency the larger the amount of reads that have to occur, as a switch bounce will last for milliseconds. Switch bounce is a mechanical failure so the bouncing is rather slow.

uP Switch DeBouncer Circuit

Switch Controller: Maxim Integrated Products produces the MAX7347 as a stand-alone Switch Controller. Using another IC produces another line item in the PL, and additional cost. However the switch debouncers may perform other functions to enhance circuit operation. There are also a number of Switch Debouncer IC's that are produced. This is just one example of a switch debouncer.

On Semiconductor produces a 14490 Hex Contact Bounce Eliminator which only requires an external capacitor to develop a clock. The MC14490 circuit takes an input signal from a bouncing contact and generates a clean digital signal four clock periods after the input has stabilized. The capacitor selects the frequency or clock periods. The data sheet indicated a voltage supply range of 3 volts to 18 volts and was dated 2009.

RC Switch Debouncer Circuit: It's also possible to integrate the switch chatter [oscillations] so that the bounces are smoothed out [damped out], and the receiving circuit does not see them, but that requires an RC circuit [Resistor/Capacitor circuit]. The Time Constant [TC] of the RC circuit should be greater than the expected time the switch will bounce. An RC circuit which also uses a Schmitt Trigger is shown to the right.

Keep in mind that just because you don't see any switch bounce issue during the few days of circuit debugging, that does not mean that intermittent errors won't show up once the circuits is developed or used more.