THE FIVE BASIC METHODS FOR ELIMINATING SWITCH CONTACT BOUNCE


WHAT IS SWITCH BOUNCE?

The electric "snap switch" consists of one or two stationary electrodes called "Throws", and a movable electrode, called a "Pole". When the switch is activated, the movable pole is forcefully snapped onto the fixed surface of the stationary throw. Like snapping a rubber ball onto the floor, it naturally bounces. The greater the force of the snap, the greater the bounce. Unfortunately the spring in the switch that provides the "snap" action through mechanical hysterisis also adds to the force of the contacts coming together. If the switch is used to turn on and off electric lights or to start a motor at 50 or 60 Hertz, the bounce is not noticeable and causes no problems. 

Unfortunately, such is not the case with high-speed, low current DC applications such as microprocessor and microcontroller-based digital applications. Switch bounce is an inherent characteristic of the electric switch, and almost always causes problems that must be dealt with by the digital circuit designer. To make life easier for electronics design engineers and hobbyists, LogiSwitch manufactures switches and NoBounce+ ICs incorporating integral debounce circuitry. It is the stated position of LogiSwitch that it is time for the field of digital electronics to have their own switches that work for them rather than to continue borrowing from the field for which they were originally designed that requires way too much extra effort just to make them usable. LogiSwitch switches are made for high-speed digital applications.

HISTORY OF THE LEGACY SWITCH

Since the advent of the microprocessor and microcontrollers the propensity of the mechanical switch to "bounce" has proved to be a design problem for hardware and/or software designers that nearly always has to be dealt with.

The Electric Snap Switch was designed and patented in 1884 by J. H. Holmes to ease the arcing and burning of contacts for Thomas Edison's new invention of five years earlier, the incandescent light bulb. It has been with us for the past 134 years, and still does a great job when used for the purpose for which it was originally intended: high-voltage, high-current 50 and 60 Hertz AC applications.

THE LOGISWITCH DEBOUNCE TUTORIAL

This tutorial is to demonstrate all four 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:

  1. The 2-Pin Debounce. This is the simplest method, but it requires two processor pins.
  2. The Cross-coupled Nand or S/R Debounce. This method is functionally equivalent to the 2-Pin method, but it uses only one processor pin.

and the two best methods for interfacing with the more simple single pole-single throw (SPST) switches. Note that a delayed output is needed for the SPST switch:

  1.  Hardware SPST Debounce.
  2.  Software SPST Debounce.  

Note that both the hardware and the software methods for debouncing the SPST switch simply delay the switch output until after the bounce time has ended.