So far we've talked about logic levels. These are relatively static; we are dealing with circuits that have response times measured in double digit numbers of nanoseconds, so the time it takes you to flip a switch is a really long time. We've mitigated the issue of bounce in the logic level input circuit by using a latch to capture switch states once they've settled (which happens very quickly in the human timescale).
Sometimes, though we want a pulse: a signal briefly changing to the opposite logic value and back. We could slide one of our switches back and forth, but that takes some random amount of time, and is messy. We could just use a momentary contact push-button switch. Better. But it's still messy.
Bounce
When I say messy, I'm referring to the change from one state to the other bouncing back and forth before settling into the new state.
This is just something that mechanical switches do. Logic circuits are so fast that they'll likely see each bounce as a separate pulse, which is pretty much what it is. That can be all kinds of not good. In order to use this as a single, clean change in logic state, we need to get rid of the bounce. That is to say, we need to debounce the switch.
There are a variety of approaches to this, many which try to remove the bounce using an RC circuit or flipflops, but for a momentary pushbutton I like the approach of using a 555. This also means that we can use a small, cheap, SPST pushbutton switch. The idea is to trigger on the initial bounce of the switch to produce a clean output pulse that ends (cleanly) shortly after the switch is released. Specifically, after it finishes bouncing back to its stable state. It's a simple, clean circuit... and it shows a great use of the 555 about which I wrote a previous guide.
The trigger input is held high by R1 until S1 is pressed. That bounces as expected, but the first time it goes below 1/3 Vcc the 555 triggers and it's Q output goes high. Since the bipolar 555 is triggered by the input being below 1/3 Vcc and not (as in the CMOS version) the act of going below 1/3 Vcc, it stays in a triggered state with Q high until the switch is released. Then the RC timing (R2 & C2) takes over and holds Q high until the voltage on C2 reaches 2/3 Vcc at which time Q goes low. R2 and C2 are chosen to hold Q high until after the switch stops bouncing and settles into it's released state. Notice that there's an inverted version of the output made available for convenience.
Four copies of this circuit fit nicely onto my standard 40mm x 60mm piece of perfboard so that's what I've used for the PCB as well. The 7404 has 6 NOT gates so we just need one of them (and even have a couple spare gates). Four pulse generators are probably plenty.
Text editor powered by tinymce.