3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How do I create an ON-ON-OFF switch using a momentary push button switch???

I have a project where there are one set of LEDs and another set of LEDs. I am interested in using a momentary push button switch to act as a ON-ON-OFF switch so if you press it once the first set of LEDs turn on -- press again those turn off and the second set are on or if you press it again if turns both off -- etc.

How do I do this???

12 answers
sort by: active | newest | oldest
Feb 29, 2012. 1:09 AMiceng says:
Try this circuit. . A
Feb 29, 2012. 5:21 AMfrollard says:
Does that not turn both sets of leds on for q3?

question has 'first set on, then those go off and 2nd set goes on'

so they crossover diode between q3 and q2 needs to be dropped.
Feb 29, 2012. 6:14 PMiceng says:
The 0.01uF capacitor is the debounce device, guys :-)
Or use a magnet on a Hg ( mercury ) whetted reed switch.

If I misread the author take out the middle diode like follard says
and the circuit will turn on one group of leds
and then switch to the second group of leds
and then switch off
and then repeat.

That makes it too easy, no circuit fun .
In fact no diodes ( just Q2 to a base and Q3 to other base ) works also.

A
Feb 29, 2012. 11:38 PMiceng says:
Not as foolproof as framistans second whole NE555 IC...

If you use my corrected circuit ( Sorry about those previous errors )
A lot depends on how bouncy your push-button is, 
you may need more capacitance.

Also included the CD4017 PDF which is basically a 10 step counter IC.
Every high-to-low clock pulse the counter advances the Q output ( High )
to the next Q in line and at Q10 goes back to Q1.

However when Q4 goes High it is wired to Reset and back to Q1= High
then Q2 goes High lighting group 1 LEDs  and then Q3 goes High
lighting group 2 LEDs and then etc, etc.......   A
Mar 1, 2012. 12:03 AMiceng says:
Here is the 4017 PDF
Mar 5, 2012. 10:25 PMiceng says:
Here's how I would do it try C1=1uF and R=2.7K...  .  A
Feb 29, 2012. 3:57 AMframistan says:
The schematic given by "iceng" would work. You may have a problem with the push-button giving more than ONE pulse per push. This can be fixed by placing a 555 timer IC in the circuit. When the pushbutton is pressed, the 555 puts out a SINGLE pulse of a second or 2 length. Feed the output of the 555 IC to the pin 14 of the 4017 IC . This is called "de-bouncing" because whenever a switch is pressed, it gives several pulses rather than just one.
Feb 29, 2012. 5:19 AMfrollard says:
even a tenth of a second debounce should be enough, but totally agreed, debounce.
Feb 28, 2012. 11:45 PMrickharris says:
With a single switch the only way your going to do this without a lot of discreet components is with a microprocessor.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!