Momentary Button as On/Off Toggle using 555

(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

52 Replies to “Momentary Button as On/Off Toggle using 555”

  1. Yay! You rule! I’m going to start cranking these out after next month. Right now I am up to my eyeballs in VDMX (http://vidvox.com). By the way, if any of the geniuses on this blog can work out a way to have a MaxM change to a random color every time it senses a whack with an accelerometer (all on an arduino), I will pay you for your design! I want to have a kickdrum light up a different color every time it is hit.

  2. Jeez you guys, it’s like you want correct schematics and reasonable pictures of the circuits. ;-)

    I updated the schematic and included an overhead view.

  3. I would love to cheat and get a clearer top-down photo of your proto-board by the way.

    I guess for my finished jackets i’m going to try to build this on as small a piece of breadboard as I can, and then maybe seal it up in a blob of shapelock or something. I think there’s a lilypad protoboard that is big enough to accommodate the circuit, but I’m not sure.

  4. Oh good. I thought I was just not building it correctly. (I am a novice at trying to put stuff together from a standard schematic and I’m spoiled by getting to use so many premade pcb’s with component maps.)

  5. The circuit doesn’t work. I just tried building it from the schematic provided. I will now try the one left by underwood.

  6. Underwood & Tim, I think you’re both correct: the schematic I drew above has an error. I could have sworn I wired it up exactly as the schematic I drew. Once I get back to my lab I’ll take a look at how I really have it wired up. :) For now, yes assume the bowden circuit is more correct one.

  7. Looking at the photo, it appears that capacitor C1 is actually connected to R3 and not to the blue wire going to IC1 pin 2. So the proto-board is correct, but it didn’t get properly transcribed to the schematic.

  8. I think the schematic may have an error. The referenced site shows capacitor C1 on the other side of the switch, connected to R3. I haven’t built the circuit, but intuitively the Bowden circuit seems correct – when the button is pushed, the capacitor will override the R1/R2 divider and momentarily pull the trigger pin high or low. As shown here, the 100K isn’t going to move the trigger voltage enough to get the trigger out of the hysteresis zone.

  9. Ivo, a BC547 transistor should work fine instead of the 2N3904 I use.

    Andrew, yes you are correct that 555 chips have high drive capability. This makes them great for driving multiple LEDs usually.

    In this case though, that can’t be done because the OUT pin is being fed back into input section of the circuit. The load from an LED connected directly to OUT screws up the input section, most notably not allowing the capacitor to charge up correctly. The transistor then is acting more like a buffer for the signal than an amplifier.

  10. I have a 555 manufactured by Fairchild, and according to the datasheet, it can source, on its own, 200mA. I understand 555s are generally known for this relatively high capacity. Doesn’t that make this transistor redundant? One would have to be careful, of course, to make sure that their specific 555 has this capability, but most 555s, I belive, should be able to manage 60mA on their own. Please let me know if I’m mistaken, or if I’ve misunderstood.

  11. Very nice, been looking for something like this!

    I would like to drive a relay with it, can this circuit also operate at 12v? Also, can I use another small-signal diode like BC547 or similar?

  12. Yup. Each BlinkM draws 60mA at most and that transistor that acts as the power switch is good up to 200mA. If you needed to switch more power, just swap out that transistor for a power transistor like the TIP120.

  13. Mouser is awesome (as is Digikey). But they both have overwhelming amount of variety. I like Jameco because they stock the most common things pretty cheaply.

Leave a Reply

Your email address will not be published. Required fields are marked *