Jan 022010
 

(as a few had noticed, I had an error in the schematic shown. It’s been updated, thanks!)

A recent question from a friend who made a really cool BlinkM hoodie was: How can you turn a momentary button press into an on/off toggle?

There are tons of ways to do this if you like getting into electronics. Most all work off of some flip-flop like principle. And while I could have suggested a true flip-flop chip, I thought it would be cooler if you could use a 555 timer chip (which contains a single flip-flop and a couple of comparators). After scouring my childhood collection of Forrest Mims electronics books and a few 555 timer devoted websites (two of the best I found were: http://www.bowdenshobbycircuits.info/ & http://www.kpsec.freeuk.com/555timer.htm), I cobbled together the following circuit based off a few almost-what-I-wanted examples.

This is what it looks like in use:

The schematic is pretty straightforward, but does use a bit of feedback trickery to get the toggle functionality:
On/off toggle switch from a momentary switch using 555
(old incorrect version here)

The parts cost is pretty low. The 555 timer chip can be had for about $0.43, the 2N3904 transistor for ~$0.40, and various resistors & capacitors are essentially free if you have them.

The circuit has 3 external two-pin connections: 5V&Gnd, button input, and the two pins of the thing to switch. In this case, the switched thing is a power supply to a BlinkM.

By changing the transistor to a beefier one, you can switch much larger loads. The little 2N3904 transistor in there now can switch around 200mA, but a bigger NPN or FET transistor and you could switch a few amps.

It can be made pretty small on a tiny breadboard (courtesy of FunGizmos.com) like this:
Simple on/off toggle from a momentary switch

It’s not the greatest for battery-powered applications. When “off” it draws about 4-6mA, depending on the brand of 555 timer chip you use. When on it draws that plus whatever power the switched device draws. Best to put a proper power switch on the battery pack to eliminate this quiescent drain.
On/off toggle switch from a momentary switch using 555

 Posted by at 11:29 pm

  43 Responses to “Momentary Button as On/Off Toggle using 555”

  1. how would you have to alter the circuit if you had a 12V DC source and your LEDs were 12V 5A 60W led strips with built in resistors. I’m assuming you would need a different transistor?

  2. I’ve found the solution for this circuit. With only a few modifications in the schematic diagram it’s possible to correct the problem of the “self-shoot” on the output when connecting or disconnecting the power supply, no matter how the circuit is powered, either an AC/DC adapter or a battery.

    1) Pins 4 and 8 (both together), must be connected to +V through a 220 ohm resistor, adding a 4.7?F bypass capacitor from that pins to GND.

    2) The seventh pin from the IC must be grounded.

    3) A 5K6 resistor should be added from the base of the transistor to GND.

    4) R4 in the schematic should be 10K instead of 1K.

    Sorry for my poor english, i’m from Argentina.

    Regards. :)

  3. Hello,
    What if I want the cirduit to be “ON” state when I power up ? is there a “reset” on power up which grants that the satet is alwys “ON” on start?

    Many thanks!

    Goerge

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>