Switch
: This article is about electrical switches. For other meanings of the word "switch", see Switch (disambiguation).
Contact bounce
Contact bounce (also called chatter) is a common problem with mechanical switches and relays. Switch and relay contacts are usually made of springy metals that are forced into contact by an actuator. When the contacts strike together, their momentum and elasticity act together to cause bounce. The result is a rapidly pulsed electrical current instead of a clean transition from zero to full current. The waveform is then further modified by the parasitic inductances and capacitances in the switch and wiring, resulting in a series of damped sinusoidal oscillations. This effect is usually unnoticeable in AC mains circuits, where the bounce happens too quickly to affect most equipment, but causes problems in some analogue and logic circuits that are not designed to cope with oscillating voltages.
Related Topics:
Inductance - Capacitance - Sinusoid - Oscillation - Analogue - Logic circuit
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Sequential digital logic circuits are particularly vulnerable to contact bounce. The voltage waveform produced by switch bounce usually violates the amplitude and timing specifications of the logic circuit. The result is that the circuit may fail, due to problems such as metastability, race conditions, runt pulses and glitches.
Related Topics:
Sequential digital logic circuits - Metastability - Race condition - Runt pulse - Glitch
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Hardware debouncing
Special circuits called "debouncing circuits" are often used to process the voltage from a switch or relay before it is applied to the input of a sensitive circuit.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
- A simple analogue debouncing circuit consists of an RC (resistor-capacitor) filter that removes fast oscillations from the signal. However, the slowly changing edge that this produces is unsuitable for triggering high-speed logic circuits, where it could cause metastability. This issue can be resolved by feeding the signal through a Schmitt trigger.
- A debouncing circuit suitable for logic circuits consists of a monostable multivibrator, a circuit that registers the first voltage pulse, produces an output pulse of fixed width, then ignores any further switch pulses until the output pulse has terminated. The circuit designer sets the monostable's pulse width to exceed the bounce time.
- If the switch or relay has changeover (also called double-throw or SPDT) contacts, then a debouncing circuit can be made by adding an SR flip-flop. One contact of the switch drives a pulse into the set input of the flip-flop, and the other contact drives a pulse into the reset input. The output of the flip-flop is a clean pulse that goes high when the switch is pushed away from its rest position, and then low when the switch is released, with no bounce.
Software debouncing
If the switch voltage is fed directly to the input of a microprocessor, then the software might become confused by the rapid sequence of high and low logic levels when it is expecting only a single, stable transition between "on" and "off". If debouncing circuits have not been provided, then there are software remedies that can be used. A simple algorithm is to wait for the first transition (say, 0 to 1), then ignore the input for a fixed time before sampling it again. The time delay is selected so that the switch has stopped bouncing before it is sampled again.
Related Topics:
Microprocessor - Software
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Reference
- Walker, PMB, Chambers Science and Technology Dictionary, Edinburgh, 1988, ISBN 0-85296-151-1 (definition of contact bounce)
~ Table of Content ~
| ► | Introduction |
| ► | Contact arrangements |
| ► | Biased switches |
| ► | Special types |
| ► | Intermediate switch |
| ► | Multiway switching |
| ► | Contact bounce |
| ► | See also |
| ► | External links |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.
