Switch Debounce DIY_Tutorial


Bounce Free Switches and Debouncer ICs for High-Speed Electronics

THE FIVE BASIC METHODS FOR ELIMINATING SWITCH CONTACT BOUNCE

This tutorial is to demonstrate all five methods for debouncing switches using single pole-single throw, or single pole-double throw switches. The guide includes the two methods for single pole-double throw (SPDT) switches which require no output delay and the two best methods for interfacing with the more simple single pole-single throw (SPST) switches.

Read More
METHOD 1: SIMPLE TWO-PIN DEBOUNCE

METHOD 1: SIMPLE TWO-PIN DEBOUNCE

If you can spare two pins, this is the way to go. Using a SPDT switch, Pin 1 Low indicates the switch is inactive, and Pin 2 Low indicates it is activated.

Read More
METHOD 2: CROSS-COUPLED NAND DEBOUNCE

METHOD 2: CROSS-COUPLED NAND DEBOUNCE

The cross-coupled nand gate method is ideal for projects where two processor pins are not available for use with one switch.

Read More
METHOD 3: D-TYPE FLIP-FLOP DEBOUNCE

METHOD 3: D-TYPE FLIP-FLOP DEBOUNCE

Using the internal cross-coupled nand gating of a D-Type Flip flop provides an excellent Method 3 Debounce identical to Method 2. Note the Q output is normally high and goes low when the switch is activated.

Read More
METHOD 4. HARDWARE DEBOUNCE FOR SPST SWITCHES.

METHOD 4. HARDWARE DEBOUNCE FOR SPST SWITCHES.

Whenever a single pole-single throw (SPST) switch is used for input into high-speed digital devices, the only thing you can do is to wait out the bounce interval with either hardware or software delays (see Waveform 2 below).

Read More

METHOD 5. SOFTWARE DELAY DEBOUNCE

There are numerous examples online for software debounce routines for every computer language known to mankind. They all amount to simply waiting out the estimated bounce period.

Read More
WAVEFORM 1. CROSS-COUPLED NAND AND 2-PIN DEBOUNCE METHODS.

WAVEFORM 1. CROSS-COUPLED NAND AND 2-PIN DEBOUNCE METHODS.

Note the immediate Q output. Methods 1 and 2 change the output state with no delay both on actuation and release.

Read More
WAVEFORM 2. SPST AND SOFTWARE DELAY METHODS.

WAVEFORM 2. SPST AND SOFTWARE DELAY METHODS.

Note the delayed Q output for these methods. The Hardware Debounce circuit of Method 4 and Software Debounce of Method 5 require delaying action until the bounce time is through.

Read More