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???

sort by: active | newest | oldest
iceng5 years ago
Try this circuit. . A
pletchman (author)  iceng5 years ago
As you warned, the momentary switch was just too "bouncy" resulting in skipped cycles and sporadic results. Can you tell me how I need to incorporate a 555 timer into the circuit to achieve more reliable results. Also, I am open to trying a larger capacitor if you think that will be as reliable. If so please let me know what size you recommend.

Thanks again for the help and guidance.
iceng iceng5 years ago
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.

pletchman (author)  iceng5 years ago
Hello Iceng (and every helpful soul here),

You are correct in your response post with the desired set up...

"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."

Can you please give me a simple schematic/explanation. For my initial use I am going to the trusty Radio Shack and want to make sure I get what I need.

Thanks again for your expertise and assistance.
iceng pletchman5 years ago
Here is the 4017 PDF
pletchman (author)  iceng5 years ago
So are you saying the 0.01uF capacitor negates the need for the 555 timer suggested by framistan???
iceng pletchman5 years ago
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
frollard iceng5 years ago
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.
iceng5 years ago
Here's how I would do it try C1=1uF and R=2.7K...  .  A
pletchman (author)  iceng4 years ago
I tried incorporating this but I think I must have something wired incorrectly because it seems even more "bouncy" than the other option. Attached are photos to better show my problem.
framistan5 years ago
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.
even a tenth of a second debounce should be enough, but totally agreed, debounce.
rickharris5 years ago
With a single switch the only way your going to do this without a lot of discreet components is with a microprocessor.