Friday, May 25, 2012

Momentary pushbutton debounced into toggle flip-flop

Here's how to debounce a momentary switch to turn an AC-powered device on and off, and provide power status indication at each pushbutton switch.

The circuit uses the 4538 Precision One Shot to debounce the switch in two stages. The first stage creates a long pulse; this is the amount of time the one-shot will ignore subsequent (accidental) button presses. This long pulse triggers the second stage. The second stage outputs a very short pulse at the beginning of the stage one long pulse. This pulse is sufficient to trigger a variety of devices (more on this in future posts) but in this circuit it triggers the 4027 Dual J-K Flip Flop.

A J-K type Flip Flop can be converted into a T (toggle) type Flip Flop by connecting J & K together to HIGH. The pulse from the 4538 comes into the Clock pin on the 4027. Each pulse flips the state of the output from LOW to HIGH and so on. The output of the 4027 drives a switching transistor which drives a relay. The diode across the relay coil protects the transistor from damage.

The output of the relay turns on the indicator lights and connects the HOT pins of the AC power connectors together.


You can also view a video at http://youtu.be/gKd8KTdUxAg

No comments:

Post a Comment