Controlling 6 light bulbs with one switch

Thread Starter

NoKnowledge

Joined Aug 25, 2023
8
I’m trying to control 6 small light bulbs with one normally open push button switch. I want each bulb, but one at a time, to light for each press on the button, and to turn off when the button is released. I want this to happen in succession.

What’s the best way to accomplish this for someone with no knowledge about electronics? The power source is a 9v battery if that matters.
 

MrChips

Joined Oct 2, 2009
29,809
Welcome to AAC!

There are two ways that come to mind to do this.

1) You can do this with digital circuits. It might take about 6 different chips to do this.
2) You can use a MCU (microcontroller unit). This will take one chip plus driver electronics to power the lights. The MCU requires programming.
 

BobTPH

Joined Jun 5, 2013
8,073
I think you can do it with just a 4017, no? The trick being that the momentary switch provides power to the lights as well as the clock signal. And the 4017 is always powered to maintain state.
 

MrChips

Joined Oct 2, 2009
29,809
I’m trying to control 6 small light bulbs with one normally open push button switch. I want each bulb, but one at a time, to light for each press on the button, and to turn off when the button is released. I want this to happen in succession.

What’s the best way to accomplish this for someone with no knowledge about electronics? The power source is a 9v battery if that matters.
Your specifications are not clear and possibly conflicting.

1) Do you want only one light to be on at a time or do previous lights stay on?
2) For each press of the button something new happens. But you have to lift your finger off the button to terminate a press. That is the same as a released button. Are all lights off when the button is released? Hence, you move on to the next light on the next press?
 

BobTPH

Joined Jun 5, 2013
8,073
I read it as follows:

All lights are always off when button is not pressed.

First press lights the first light for as long as the button is pressed.

Second press lights the second light for as long as the button is pressed.

Who knows what happens on the seventh press? Perhaps the first lights again?
 

Thread Starter

NoKnowledge

Joined Aug 25, 2023
8
Your specifications are not clear and possibly conflicting.

1) Do you want only one light to be on at a time or do previous lights stay on?
2) For each press of the button something new happens. But you have to lift your finger off the button to terminate a press. That is the same as a released button. Are all lights off when the button is released? Hence, you move on to the next light on the next press?
1) only one light is on at a time
2) correct
I read it as follows:

All lights are always off when button is not pressed.

First press lights the first light for as long as the button is pressed.

Second press lights the second light for as long as the button is pressed.

Who knows what happens on the seventh press? Perhaps the first lights again?
Correct. Seventh press lights the first again.
 

Thread Starter

NoKnowledge

Joined Aug 25, 2023
8
Welcome to AAC!

There are two ways that come to mind to do this.

1) You can do this with digital circuits. It might take about 6 different chips to do this.
2) You can use a MCU (microcontroller unit). This will take one chip plus driver electronics to power the lights. The MCU requires programming.
Thank you, which solution is easiest and is there any drawbacks for each?
I think you can do it with just a 4017, no? The trick being that the momentary switch provides power to the lights as well as the clock signal. And the 4017 is always powered to maintain state.
If it’s always powered won’t it drain the battery?
 

MrChips

Joined Oct 2, 2009
29,809
CD4017 is an easy solution. It is designed tp count to 10 and recycle.
You will need some additional circuitry to debounce the push button, make the light go off on release, and count to 6 instead of 10.

How much current do the lights require?
 

MrAl

Joined Jun 17, 2014
10,887
The bulbs take about 1 amp.
Hi,

You will also need transistor drivers or similar then.

You can do this with standard logic IC chips. There will be a few different kinds of solutions.
One is to use a 4 bit counter like the 74LS93 or similar, and a 1 of 8 decoder for up to 8 bulbs or a 1 of 16 decoder for up to 16 bulbs. That's probably the simplest.
You also need to debounce the switch and there are a few ways to do that.

You can also use a microcontroller chip which can do it all in one chip, except for the drivers for the bulbs. The drivers have to handle higher currents than most logic chips can handle.
 

Thread Starter

NoKnowledge

Joined Aug 25, 2023
8
CD4017 is an easy solution. It is designed tp count to 10 and recycle.
You will need some additional circuitry to debounce the push button, make the light go off on release, and count to 6 instead of 10.
I have a few questions.. If CD4017 has to be powered to maintain state, what happen if it’s turned off? For example if I change the battery, will it damage the circuit somehow? And I don’t really get why I have to make the lights go off on release, when the push button is released, the switch is opened, so there is no flow of electricity to make any bulb glow, or am I missing something here?
 

Thread Starter

NoKnowledge

Joined Aug 25, 2023
8
Hi,

You will also need transistor drivers or similar then.

You can do this with standard logic IC chips. There will be a few different kinds of solutions.
One is to use a 4 bit counter like the 74LS93 or similar, and a 1 of 8 decoder for up to 8 bulbs or a 1 of 16 decoder for up to 16 bulbs. That's probably the simplest.
You also need to debounce the switch and there are a few ways to do that.

You can also use a microcontroller chip which can do it all in one chip, except for the drivers for the bulbs. The drivers have to handle higher currents than most logic chips can handle.
Hi

So for 1 amp bulbs, CD4017 won’t work and the best/easiest option is 47LS93 + a decoder?
 

ericgibbs

Joined Jan 29, 2010
18,213
hu NK,
You will require a power MOSFET on each pin, rated at say 2Amps, in order to drive a 1Amp Lamp bulb.

If your 9V battery is a PP3 , then is is no use for this project.
E
 

djsfantasi

Joined Apr 11, 2010
9,128
I have a few questions.. If CD4017 has to be powered to maintain state, what happen if it’s turned off? For example if I change the battery, will it damage the circuit somehow?
It won’t damage the circuit in any way. It “resets” the counter so it starts counting from 0.
And I don’t really get why I have to make the lights go off on release, when the push button is released, the switch is opened, so there is no flow of electricity to make any bulb glow, or am I missing something here?
The switch does not directly power the bulbs. It merely advances the counter. Whatever you use to “drive” the bulbs will supply the power. Maybe it’s a transistor. Maybe it’s a driver chip. That’s where the power comes from.

Note that you still have to “debounce” the pushbutton.

And logic ICs (like the CD4017) don’t like being connected to nothing (that’s called “floating”). You’ll need a 10k resistor from ground to the junction of the pushbutton and thr 4017.
 
Top