Electronics Project - Making a control panel that has push button and toggle switches with led lights on it

Thread Starter

ElctronicZombie

Joined Jan 19, 2020
47
looking to do an electronics project for my wife's school, well have been asked {told} lol.
Making a control panel that has a push button and toggle switch with led lights on it, which that's not a problem just need help on these
Need to make a 10 second countdown timer that will start when a toggle switch is flipped on, that will turn off 10 individual leds and reset when the toggle is turned off, and also make a speaker that will play a sound for 10-20 seconds and flash 4 leds when a toggle switch turned on and then stop and also rest when the toggle switch is turned off. any help would be great thanks
 

MrChips

Joined Oct 2, 2009
30,706
Not a problem. But before we talk about a solution let us nail down the operational specifications in writing in Steps.

1. Turn on toggle switch. 10 LEDs are lit.
2. One LED at a time is turned off after each second.
3. …?
 

MrSalts

Joined Apr 2, 2020
2,767
The way I understand your description is really two different sections... make changes as needed.

Project 1
- 10 second countdown timer that will start when a toggel switch is flipped on,
- that will turn off 10 individual leds​
- reset when toggle is turned off,

Project 2
- and also make a speaker that will play a sound for 10-20 seconds and flash 4 leds when a toggel switch turned on
- then stop and also reset when toggle switch is turned off.
 

Thread Starter

ElctronicZombie

Joined Jan 19, 2020
47
Timer function
1. Turn on toggle switch. 10 LEDs are lit.
2. One LED at a time is turned off after each second.
3. can be reset when turn toggle off
4. back to step one.
this is more of a visual then a function

yes two different sections same project board but are independent of each other 2 different toggles, one toggle for timer one toggle for sound and flashing lights
 

MrChips

Joined Oct 2, 2009
30,706
Keep the two circuits/projects separate for now.

For the 10-LED project, use a 555-timer circuit to generate a 1Hz clock.
Use CD4017 Johnson counter IC to turn on the 10 LEDs.
You can use the toggle switch to enable power to the circuit or as a RESET signal to the 4017.
You may have to experiment with the circuit in order to get it to display the correct start and stop conditions.
 

Thread Starter

ElctronicZombie

Joined Jan 19, 2020
47
Keep the two circuits/projects separate for now.

For the 10-LED project, use a 555-timer circuit to generate a 1Hz clock.
Use CD4017 Johnson counter IC to turn on the 10 LEDs.
You can use the toggle switch to enable power to the circuit or as a RESET signal to the 4017.
You may have to experiment with the circuit in order to get it to display the correct start and stop conditions.
Not sure that would work the way I want it to, need all 10 LED lit at the start then shut off one at a time each second of 10 second count down.
 

MrChips

Joined Oct 2, 2009
30,706
Not sure that would work the way I want it to, need all 10 LED lit at the start then shut off one at a time each second of 10 second count down.
Ok. Then use a 10-bit shift register.
Start with all registers at 0 and serial shift a 1 on every clock pulse.
Buffer the outputs with inverting drivers to the LEDs.
 

MisterBill2

Joined Jan 23, 2018
18,167
You can use the 4017 and five 4013 dual FFs to have all the LEDs on and then as the counter advances it can reset each to switch off an LED in sequence. The initializing will set all ten FFs to lite the LEDs then activating the 4017 and pulser will reset one at a time. Really cheap parts, but quite a few wires.
Depending on how bright the LEDs need to be you may need driver transistors to do the actual switching. an MPSA13 is easy to drive directly from CMOS outputs and can handle over 100 mA very well.
SWitching OFF the lighted string of LEDs one at a time evidently was not clear to everybody. It does make things more complicated.
 
Last edited:

MrSalts

Joined Apr 2, 2020
2,767
I was thinking about the 3914 option as well since most others don't really have the incremental stepping with all others below off. But the LM3914 is out of print and the current limit is quite low - I'd assume the OP wants more than a few mA t light the box.
 

eetech00

Joined Jun 8, 2013
3,856
I haven't tested this but I think it will work.

(I posted this earlier but deleted it by mistake..) :oops:
I've used BJTs to create a descending linear ramp and an LM3914.
When the button is pressed, all LEDs will light and then shut off one at a time at about 1 per second.
I've shown a push button, but it can be replaced with a toggle switch. When the toggle switch is thrown, the LEDs will cycle and stop until the switch is switched off and switched on again.

1644871685042.png
 
Last edited:

eetech00

Joined Jun 8, 2013
3,856
I was thinking about the 3914 option as well since most others don't really have the incremental stepping with all others below off. But the LM3914 is out of print and the current limit is quite low - I'd assume the OP wants more than a few mA t light the box.
I think you may be thinking of the LM3915 or LM3916....
The LM3914 is alive and well, at least I haven't seen any notice of discontinuance on the TI site.

The LM3914 drive output is plenty (30mA) for 5mm LEDs. Especially for some high efficiency LEDs.
 
Last edited:

dl324

Joined Mar 30, 2015
16,839
Not sure that would work the way I want it to, need all 10 LED lit at the start then shut off one at a time each second of 10 second count down.
You should draw a block diagram showing all of the functionality you want so members don't have to spend so much time chasing wild geese.
  1. What is your complexity/cost budget?
  2. Are there any area constraints?
  3. What is the power source?
  4. Are you open to using something like an Arduino Uno?
  5. Do you have specific requirements for the sound?
 

Thread Starter

ElctronicZombie

Joined Jan 19, 2020
47
You should draw a block diagram showing all of the functionality you want so members don't have to spend so much time chasing wild geese.
  1. What is your complexity/cost budget?
  2. Are there any area constraints?
  3. What is the power source?
  4. Are you open to using something like an Arduino Uno?
  5. Do you have specific requirements for the sound?
Making a space ship control panel for my wife's school nothing crazy complex except the two things I asked about just basic push buttons and toggle switches to turn on some leds,
No budget but not looking to spend a ton but also not worried to spend to make it work.
no constraints per say building what ever size i need to make all fit on panel
I have a couple of power supply's laying around from 3v-12v 20w-100w I was going to utilize one of the them
I am open to Arduino uno if thats my best option, I have looked into it but I never have messed around with one but willing to.
would like a rocket sound or blast off sound hence the count down lights and sound/flashing lights.

I appreciate all the help that has been giving
 

dl324

Joined Mar 30, 2015
16,839
I am open to Arduino uno if thats my best option, I have looked into it but I never have messed around with one but willing to.
I think this is your easiest option. Uno has 20 digital I/O's (6 are analog). If the LEDs don't need to draw more than a few mA, an Uno can drive them directly (with current limiting resistors). If you need more current than the Uno I/O's can sink/source comfortably, you could add transistors.

The whole project can be powered by a 5V 0.5A adapter, or a 9V battery, depending on how long it needs to operate.
would like a rocket sound or blast off sound hence the count down lights and sound/flashing lights.
Arduino has a sound library. You just give it a sequence of notes to play. You'll need a transistor to drive a speaker.
 

Reloadron

Joined Jan 15, 2015
7,501
You have plenty of options as to how to go about this. You can, as mentioned take a discrete component route using chips like the 74192 or 74193 route. A simple programmable up/down counter. Count up or down to N and halt. A Google of 74192 74193 counter circuits will bring up a dozen hits and circuits. Take and build a clock with a 555 for 1 second pulses (1.0 Hz). Take the BCD out and convert it to decimal.

Personally I would take the uC (micro-controller) route today verse the older pre uC days. This can be done with any of several uCs but using an Arduino as suggested will do just fine. There are hundreds of code samples available as a starter. Using a uC will greatly reduce your parts count allowing for much easier assembly. As to sound? As dl324 suggest let the uC handle it or just add a small inexpensive sound chip, the kind used in greeting cards. You can buy 2 boards including speakers for about $8.00 on Amazon. Just let the uC trigger your sound. The linked gives you 10 seconds but the chip is based on an old ISD design and now Nuvoton. Boards like this are simple to use and inexpensive. A Google of recordable sound chips will bring up a dozen boards with longer record times. Just put a wav or mp3 file on it.

Ron
 

MisterBill2

Joined Jan 23, 2018
18,167
Setting a bunch of flip-flops to activate the LED drivers, and then clocking them off one at a time with a 4017 counter is both simple and fairly cheap, those ICs are not expensive and they can run on 12 volts very well. Plus the logic is not tricky, And with the darlington transistor I suggested you can use big bright LEDs, or even a cluster, for each step of the countdown. And the last one to switch off can trigger whatever noise you want. And atthe low speed the logic power will be very small, sobatteries should last a long time.
 

MrSalts

Joined Apr 2, 2020
2,767
@electroniczombie
As you design this, remember that each line of Arduino code is about equal to one solder joint. Code is so much easier to adjust and modify than solder. I am all about less parts and more code if you know how.
 

MisterBill2

Joined Jan 23, 2018
18,167
When the design is correct there is no need to change connections. Really. The time for making changes is when doing the circuit drawing. That "Nuts and Volts" concept of doing everything in software gets really old in a hurry.
 

boostbuck

Joined Oct 5, 2017
501
If you are comfortable with coding, it is really the only way to go.

The great advantage of a microcontroller for this kind of one-off project is that it is very easy to change the design to correct specification errors or implement future improvements. Changing code is infinitely easier than altering hard-wired logic.

The downside is that future repair is possibly asking for someone to source a copy of your code. For this reason I always include a spare flashed micro in the enclosure for this kind of project - probably never needed, but someone will be very grateful if it is.
 
Top