LEDs that change with a button

Thread Starter

onurm2

Joined Sep 11, 2024
8
Hello forum, I am a student and I want to develop a product. When I press a button I want to switch between 3 different LEDs. How can I do this? PCB schematic
 

Thread Starter

onurm2

Joined Sep 11, 2024
8
I need a PCB diagram that will switch between 3 lights when I press the button on the right. I don't know how to do it.IMG_20240911_160800.jpg
 

KeithWalker

Joined Jul 10, 2017
3,607
No, can you help me?
Yes, I can give you some advice:
If this is an assigned project, review the contents of the course you are taking. It should contain all the basic information you need to get started.
If this is something that you have chosen, pick another project; one that you can do yourself.
 
Last edited:

MrChips

Joined Oct 2, 2009
34,812
Hello forum, I am a student and I want to develop a product. When I press a button I want to switch between 3 different LEDs. How can I do this? PCB schematic
You say that you want to develop a product. That comes with a different set of challenges such as fabrication, material sourcing, financing, and marketing. Are you really planning on making a product to be sold?

That is very different from wanting to learn how to design a digital circuit.
 

dl324

Joined Mar 30, 2015
18,328
When I press a button I want to switch between 3 different LEDs. How can I do this?
What are the design constraints? Can you use commercial parts? Are you supposed to design the logic? If you're supposed to design the logic, are there any restrictions on components you can use? Is one of the LEDs always on?
 

Thread Starter

onurm2

Joined Sep 11, 2024
8
Not always on will switch as you press the button. It's not a commercial application, I'm just trying to create the electrical diagram and pcb of such an application.
 

dl324

Joined Mar 30, 2015
18,328
Not always on will switch as you press the button.
I meant will one of the 3 LEDs always be on. As in, will there ever be a time when all three are off.
It's not a commercial application
Will it be a non-commercial application that can use commercial parts (e.g. CD4017)?
I'm just trying to create the electrical diagram
This is in the Homework Help forum, so you need to show your attempt.
 

Thread Starter

onurm2

Joined Sep 11, 2024
8
Yes, one will always be open and the button will provide a transition.

I meant will one of the 3 LEDs always be on. As in, will there ever be a time when all three are off.
Will it be a non-commercial application that can use commercial parts (e.g. CD4017)?
This is in the Homework Help forum, so you need to show your attempt.
 

Thread Starter

onurm2

Joined Sep 11, 2024
8
I actually drew a PCB diagram but I had problems with the location where I would place the fuse and the cable connections.
 

WBahn

Joined Mar 31, 2012
32,840
I actually drew a PCB diagram but I had problems with the location where I would place the fuse and the cable connections.
If you don't have a design for how your switch will cause the behavior you want, you are no where close to being at a point where it makes sense to be doing anything with a PCB yet.

What kind of push button are you using? Single pole momentary? Toggle? Something else?

You say that you want the button to switch between LEDs. What does that mean? If the red LED is on and the button gets pressed, what LED should it switch to? The green? The yellow? Should it pick one at random?

It is impossible to design a circuit that does what you want until you can specify just what it is you actually want the circuit to do.
 

KeithWalker

Joined Jul 10, 2017
3,607
If you don't have a design for how your switch will cause the behavior you want, you are no where close to being at a point where it makes sense to be doing anything with a PCB yet.

It is impossible to design a circuit that does what you want until you can specify just what it is you actually want the circuit to do.
It is possible to design this physical circuit, using one NO pushbutton, three LEDs, three resistors, one ATtiny85 and one 5VDC supply. However the software for it can not be written until the sequence of operation is defined.
 

WBahn

Joined Mar 31, 2012
32,840
It is possible to design this physical circuit, using one NO pushbutton, three LEDs, three resistors, one ATtiny85 and one 5VDC supply. However the software for it can not be written until the sequence of operation is defined.
Why would you even need three resistors?

Also, while the physical design, when using programmable logic, can be done before the detailed specs are finished, it still requires having enough of an idea of what you want in mind before doing even that, lest you risk designing and building a circuit, on the assumption that everything else is just software, only to discover that you hadn't thought things through well enough and made your physical circuit incompatible with actually implementing a viable solution. I've seen that happen quite a few times. Granted, in this case things are simple enough that it's hard to go too far wrong.
 

Thread Starter

onurm2

Joined Sep 11, 2024
8
Yes, one will always remain open and the others will switch when the button is pressed. I took the PCB diagram but I had a problem with the connection part.
 

WBahn

Joined Mar 31, 2012
32,840
Yes, one will always remain open and the others will switch when the button is pressed. I took the PCB diagram but I had a problem with the connection part.
We can't help you when you just keep giving these very vague statements. What PCB diagram? What does it mean to "take" a PCB diagram. What connection part? What problem did you have? We are not mind readers!

As asked before, what does it mean to switch. Assuming that by "open" you mean "on" (as in lit up), then what you have written can be satisfied trivially by hard-wiring one of them to be always on and then wiring the other two in parallel and have them be on when the button is pressed and held down. That meets the requirement of "one will always remain open and the others will switch when the button is pressed". Do you begin to see what why the need to give some thought to clearly specifying the behavior you want. Even if we use our crystal balls to infer that what you really want is for, at any given time, one of them to be on and the other two to be off and, when the button is pressed (and released), that the one that is on turns off and one of the others turns on still doesn't nail it down. As asked (and ignored), which one of the others should turn on?
 
Top