Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

7 Different LED switch?

Status
Not open for further replies.

iLLin

New Member
I am trying to design/make a switch that cycles through 7 different LED's and then back to off/no LED's lit.

Basically I have a push button switch that is wired to and IC Chip? So that way when I push the button, it turns the first LED on. If I push the button a second time, it turns the first LED off and the second one on. And so on and so forth until all LED's have been lit and then no LED's are lit. An IC chip can do this right? If it can, I am confused on the configuration of the gates inside the chip and how it should be, or where I can find one at. It's been a couple of years since I learned this stuff. Any help/suggestions would be greatly appreciated. If any more info is needed I will gladly explain more and why I would like to make this switch.

-Thank You
Dennis
 
A small micro could do this with a single part. But if you would prefer "off-the-shelf" logic (i.e. 74XX logic). I would use a 4 bit counter (7493 for example) in conjunction with a BCD to decimal decoder (7442). I would then tie the high bit of the counter, the Q3 output to the reset on the counter. So it would count up to 7 and then reset the counter which would turn all your LEDs off. You would also need a buffer to drive the LEDs as most 74XX parts (or at least as far as I recall) do not have enough current to drive an LED.
 
Small micro? I am still learning lots and if you could be more detail with your explanation I would appreciate it. Maybe show me an example? I appologize for such newbie questions.

Thanks,
Dennis
 
OK i did more research. In the attached pic, (this is not a schematic) I have 4 outputs off an ic chip that is already present on my fog light switch. The first one is always on and has on output of 12v. Each additional output/dot gets turned on differently each time the button on the switch is pressed. There outputs are 12 volts as well. If the two inputs are 12volts for the AND gate, then is the output 12volts? I am so lost when I get to this point. There is eight different states as you can see, hence the 7 LED's and off state when nothing is active. Will just AND gates work? Any comments please, or point me in right direction for research.

-Thanks
Dennis
 

Attachments

  • AND-Gates.jpg
    AND-Gates.jpg
    21.7 KB · Views: 1,312
Hello,

The simplest method that I can think of is to use a CD4017 decade counter. This IC can count up to 10 (even more if you use more ICs connected together) and at each increment only one outputs is high while all other outputs are low. Exactly what you need.

You can find a similar circuit here --> https://www.electro-tech-online.com/threads/convert.360/
You just have to take out the 555 astable and triacs...

I would suggest that you download a datasheet for this IC and study it a bit. If you want, I can send it to you...
 
iLLin said:
I am trying to design/make a switch that cycles through 7 different LED's and then back to off/no LED's lit.

Basically I have a push button switch that is wired to and IC Chip? So that way when I push the button, it turns the first LED on. If I push the button a second time, it turns the first LED off and the second one on. And so on and so forth until all LED's have been lit and then no LED's are lit. An IC chip can do this right? If it can, I am confused on the configuration of the gates inside the chip and how it should be, or where I can find one at. It's been a couple of years since I learned this stuff. Any help/suggestions would be greatly appreciated. If any more info is needed I will gladly explain more and why I would like to make this switch.

-Thank You
Dennis
 
iLLin,

By small micro I was referring to a small microcontroller such as the microchip PIC or Atmel AVR series (I am partial to the latter). Micro is short for microcontroller. In any case, they are programmable parts. You write software for them and download it to the chip. For many of the parts, you just need power and a bypass capacitor. The nice part is they are incredibly flexible and very inexpensive (you could easily find a part for your application for less than $5).

Earlier, I suggested you could use some 74XX parts. I didnt know at the time that you were using 12V. Many parts cannot operate at voltages that high (though some parts have a 3-15V range). I was not able to intrpret your drawing though.
 
Crust,

OK to try to explain my drawing. I have fog lights for my car that have angel eyes as well. Meaning, that there is 2 LED's in the fog light housing that glow differnt colors when differnt volts/current is applied to it, thus looking like angel eyes, cat eyes, or something to that nature. They change from 7 different colors. The fog lights came with 2 interior switches. One for the fog lights themselves, and one for the angel eyes. The reason why I want to make a new switch or add on to it, is that when I push button for the angel eyes, it cycles through 3 colors and then to off, and then it cycles through the same 3 colors and then back to off. The interior LED color doesnt match up with what is displaying on the outside of my car. I orginially was going to put inline LED's for each color which brought me to my diagram from above. The dots represent the orginal switches IC chip. The one leg is constant power, and then it cycles through the other 3 legs applying 12 volts to each as needed and then they go out to transistors and resistors to make the appropriate changes in volts/current for displaying the different colors on the outside of the car. So I am asking is if I can tap into these 4 legs off this IC chip with another IC chip that is just AND gates. Like I have showing above. The Lines coming off the dots represent the legs for the AND gates and then I can put an LED on the output of the AND gates and they will light pending on the right combination so I can get the correct color and I will know what is displayed on the outside. Am I on the right track? Am I going to have to step down the voltages for each leg if this is going to work? If 12 volts is applied each leg of an AND gate, does it output 12V or does it output 24V? Again sorry for such newbie questions. If you still don't understand I will try and explain myself better.

-Thanks,
Dennis
 
Hello Dennis,

Let me see if I understand correctly. There is some type of "angel eye" controller that has basically 4 conductors coming out of it? One of them is always +12V. The other three cycle through the 8 different combinations (on-off-on, on-on-on, on-on-off, etc) whenever you press a button? When you press the button though, the indicator inside the auto does not match the pattern that is shown on the outside of the car. What you want is an addition to your system that is inside the car that mimics what the actual fog lights are displaying. If it will help the collective understanding of this system, can you post a link to such a set of fog lights that might have enough description? You mentioned there are two LEDs inside the light. Based on your circuit, it seems that there should be three? Or perhaps there is one that has two elements inside it and another with only one element?

I still not 100% sure I understand this circuit, but at first glance, I am doubtful that some simple AND gates will solve your problem. In any case, an AND gate asserts its output only when both inputs are asserted. Further, if both inputs are +5, the output is +5, if both are +3, the outputs are +3 ... it does not add the input voltages.

Lets say for a moment that there are 3 outputs on your box, red, green, and blue (RGB). Each of these otuputs is +12V, it would be a fairly simple exercise to just tap each leg and connect it to your interior indicator. So that when the controller turns on the red fog light, your red interior led lights up. Is this kind of what you want?
 
Crust,

Here is the link for the fog lights I am talking about...

**broken link removed**

I don't have the schematic for the circuit but I will take pictures of the switch/board when my wife comes back with some batteries. You are absolutely correct on the on-off-on ... combinations. That is why I couldn't put inline LED's. The LED's in the foglights are probably (I haven't looked at them) the four prong RGB LED's. That is also what I have for my switch to display the color. But it cycles through RED GREEN, Yellow/Red color and then off. Maybe that LED is messed up? Even if it is I would still like to have individual LED's for the different Light patterns.

You said that AND gates only activate when both legs are active. Thats what my diagram represents. Two Legs needed to be active to turn on that particular LED. All 7 different combinations and the 8th (all off except the one thats always on). Thats why I wanted to use AND gates. Seemed to be simpler... When I take those pictures hopefully you can understand a little bit more to where you understand what I am trying to say. I wish my knowledge was better about circuits so I can explain to you better. I appologize. But I appreciate all the help and effort you are putting forth to help me. Thank you.

I will upload those pics in the next few hours for you to look at.

Dennis
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top