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.

1 switch and 3 LEDs question.

Status
Not open for further replies.

tee_2

New Member
First let me say I am a electronics newbie. I can get LEDs to light up, and a have played around with logic gates, but that is it. So go easy on me.

I need to know how I can do this.

I want to have 3 LEDs one white, one red, and one green. There will 3-4 super brights that will make up and array for each color.

At the start the white LED will be on,

switch push white LED will go off, and the green LED will go on

switch push green will go off, and red will go on.

switch push again will go green, then back to red, then green, you get the idea here.

then a way to reset back to the white to start over. (second switch)

Can I do this with logic gates, I have an assortment of gates that I bought to learn some basic electronics. I know that it would be best to use a micro possessor and I have some AVR's and a STK500, but that is way over my head. But is where I know I will need to go. But I just want to see if this will work.

When/If I get this to work there will be 10 arrays of switches, and LEDs, with a last LED that will light up when all 10 LEDs are green. And at some point a way to set a time limit, like all LEDs green in 15 seconds. That is the big picture but for now I just need a quick way to do this wiht what I have or can get easy.

Thanks
Todd
 
you can do it with simple counter, your "next" button will go to "clock" and your "reset" button will go to reset ... for example 4017 5stage jonson counter will do the trick, pull the MR pin down with pull down resistor and connect it via reset switch to vcc. do the same thing with cp0 only via "next" switch ...

search google for "led chaser" you will find many examples
 
I have some 4017s that I can try. I have only used them with an astable, I'll probably need a debounce for the switch that I have seen before but have not tried.

The what is the MR pin?

Thanks,

Todd
 
Almost have it working.

I used a 4017 and have it set up with debounce circuit using a 555 timer on the switch.

The thing that I am lost at is.

I can get it to cycle through pin 0 (white LED), to pin 1 (green LED), to pin 2 (red LED), and then back to pin 0.

I need to go from white (start condition), to green, to red, to green, to red, then reset back to white.

The cycle might be white, green, reset. Or it could be white, green, red, green, red, for 10-15 cycles before a reset back to white for the start of the next game.

Thanks

Todd
 
Im not sure 100% but cant you just make it so one it passes the red it hits a pnp which is connected to the main supply and it shuts it off and resets? Not sure if it would work but was bored and thought ill through out whats in my head. :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top