Switch debounce is a useful small delay in a circuit to minimize the mechanical oscillations after a switch has been pressed.
Due to these mechanical oscillations, a logic IC could read a secondary bounce or further bounces as a logic level and act on this signal further advancing the decision process of the IC,
consequently yielding incorrect outcomes.
Each type of switch has different bouncing characteristics or transient periods, until it reaches its steady state condition, and to eliminate this a switch debounce circuit is used in the form of maybe; two cross coupled nand gates the basis of a flip flop, RC delays or schmitt triggers.
Some switch debounce actions can be performed in software by simply adding a time delay to the code, say 10mS.
The nand gate configuration is a bistable (a basic memory device) stable in one state or the other and can hold one bit of information until toggled, a flip flop is said to flip from one state and flop to another.
Below shows a diagram of cross coupled nand gates as switch debounce configuration to eliminate the transient periods of mechanical switching, due to the sr latching action.
LedLabs has a rc time fed into a schmitt trigger hex inverter, and when a switch is pressed it makes the input to the schmitt trigger 0v, as it is an inverter a logic 1 is present at the output when this condition occurs.
Connect a free switch to the switch input, (not a pull up or pull down type) either on the lab or different type using both connectors of the switch, the circuitry is wired on the module, it grounds one of the switch contacts and connects the other to the appropriate components, the output can be connected to the 4026 counter clock in.
By way of example pressing the pulse button on the counter module which is not debounced a clean increment of the count is not always observed, the schmitt debounce gives a steady counter increment, it shows how switch debounce with the schmitt trigger cleans up the signal and passes it on to the logic device.
The image below shows a switch and input to the schmitt trigger debounce module whose output can connect to modules
The spare hex inverters are very useful to and are for free use, one example of use here is, inverting the binary ripple counter, to test this feed the clockout of a 555 timer into the ripple counter on around 1-2 hz so it can be seen, the lights of the 555 timer and the ripple counter look antiphase, this is because the ripple counter is falling edge triggered, feed the 555 clock in to a spare hex inverter input (the otherside of the switch debounce) then feed the output in to the ripple counter. and observe they are now in synchronisation and in phase as the hex inverter as inverted the signal.