Switch Debouncing Challenges and Alternatives
Bounce-free switch: When we press a pushbutton, toggle switch, or micro switch, the mechanism involves two metal parts coming into contact to shorten the supply. However, an instantaneous connection is not established; rather, these metal parts connect and disconnect multiple times before a stable connection is eventually made. Similar bouncing occurs upon releasing the button, leading to potential issues such as false triggering or multiple triggers. This phenomenon can be likened to a bouncing ball descending from a height, continually bouncing until it eventually comes to rest. Traditional debouncing circuits, especially those with change-over contacts, may not always be practical or cost-effective. Particularly in scenarios where accommodating an extra connection poses challenges, as is often the case with keyboard switches.
Efficient Single-Contact Circuit for Debouncing
The compact circuit presented here is designed to operate with either one make-contact or one break-contact. In practice, the choice between the two doesn’t significantly impact the functionality since the Q or Q output can be selected to invert the switch action. The logic level at the circuit’s input is determined by the pull-up resistor R1 and the position of S1. The input signal directly feeds into the data input of the bistable IC 1a (flip-flop in US terminology). Where it is clocked as soon as the contact bounce dissipates, typically within the range of 0.5–1.0 ms.
Clock Generation and Bounce Filtering with IC2a
The clock signal is produced by IC2a, which functions as an XOR gate. With every alteration in its input level, this gate generates a pulse. The width of which is governed by the values of R2 and Ci. However, this generated pulse is not free from contact bounce. To remedy this, C2 and the output resistance of IC2a are employed to filter out the unwanted bouncing effects. The potential across capacitor C2 undergoes smoothing and inversion by IC2b before the pulse is directed to the clock input of the bistable. Consequently, the output signal is rendered clean, albeit experiencing a slight delay of a few milliseconds.
Considerations for Circuit Replacement and Adaptation
Given that the bounce filter relies on the output resistance of IC2a. It becomes crucial to recognize that this circuit cannot be substituted with just any other type. In instances where replacement is unavoidable, adjustments must be made to accommodate the new circumstances. This involves either adapting the value of C2 or introducing a resistor connected in series with the output of IC2a. It is noteworthy that the circuit’s current drain amounts to 3 mA.