LED question.

Thread Starter

tee2

Joined Nov 19, 2004
46
Hi All

Here is what I need to do.

I have three LED's one white, one green, and one red. (each LED will be made up of an array of four ultrabright LEDs)

At the start the white LED will be on, then with switch1 the green LED will come on, then on switch1 again the red LED will light. Only one LED at a time. Switch2 will reset back to white to restart the game again.

The cycle can be...
white, green, reset
white, green ,red, green, red, green, red, reset
the green, red cycle can be up to 20 times before a reset.

I have been playing with a 4017 and a 555 time for a debounce on the switch1. As you can see I'm a newbie :confused: at this and the problem is with the reset back to white.

Any ideas on how to do this?

Also can a 4017 handle the current for 4 LEDs at 3.3v at 30 ma each?

Thanks, TT
 

DickCappels

Joined Aug 21, 2008
10,152
First the easy one: " Also can a 4017 handle the current for 4 LEDs at 3.3v at 30 ma each?"

No. You would need to add some kind of buffer. I suggest a grounded emitter transistor such as a 2N2222 with a 1k base resistor. The cathode of the LED array connects to the collector of the transistor. The anode of the LED array connects to a current limiting resistor. The other end of the current limiting resistor connects to a positive power supply. That is one of many approaches to buffering, and one of the most foolproof.

If I understand your description of what you want to do, then a set of latches with reset comes to mind, rather than a sequencer like the CD4017. Especially since you don't want a fixed sequence. I am sure you will see as many different ways to do this as there are people interested in helping. Please see below, which is based on the 74HC74.

This just a quick sketch of the idea, not a completed design. For example, you would have to deal with the unused inputs of the 7474, etc. No guarantees - just an idea.


 

Thread Starter

tee2

Joined Nov 19, 2004
46
I haven't done anything with Latches so this is all new to me. In your sketch you show a switch for green and a switch for red. I'll just have one switch for both. Does that change things. The sketch shows 74HC73 and everything else says 74HC74 which should I try.

I don't have any 2n2222 transistors is that a good one to stock up with?

Thanks,
 

Wendy

Joined Mar 24, 2008
23,415
Yes, 2N2222 are pretty universal. Here is a simple LED buffer you can use them with.



The resistor needs adjusted to match your particular LED.
 
Last edited:

DickCappels

Joined Aug 21, 2008
10,152
"... In your sketch you show a switch for green and a switch for red. I'll just have one switch for both. Does that change things."

It sure does. I thought you wanted to be able to press a momentary contact button that corresponds to a particular LED and have it turn that LED on and turn all the other LEDs off. That is what the circuit above is intended to do. If you use a single switch for both red and green, there is no way to tell which one would be on after the button is pressed.

"...The sketch shows 74HC73 and everything else says 74HC74 which should I try."
74HC73 was a typo. I intended this circuit to work with the 7474 type (Dual D, rather than Dual JK). I am sorry for the confusion.
 

MyNameMimi

Joined Nov 10, 2008
1
Anyway, if possible you can control the whole thing by microcontroller which you can program your own without using 555 timer. I'm sure that a single switch/ button can work for it. Is that helpful for you? If no, I am sorry :(
 

Thread Starter

tee2

Joined Nov 19, 2004
46
Mimi,

I do have some AVR's and a STK500 board, but I haven't had the time to learn it. It is way over my head. So that is not going to happen anytime soon unless someone could code it for me.

Todd
 

Bernard

Joined Aug 7, 2008
5,784
Here is another choice; at reset [ SW 2 ], W LED is on, G & R off.Push SW 1 , W off, G on ,R off. Sucessive pushes toggle FF A between R & G. Suggest replacing 555 B,C,D,E with Bill_ Marsden's emitter follower drivers. Computer problem, will try to send schematic later.
 
Last edited:

mik3

Joined Feb 4, 2008
4,843
Tee2,

Another solution is to take a binary counter and clock it with a square wave oscillator. Then make a decoder circuit which will decode each binary output and produce a signal which will turn on/off the appropriate leds. By designing the appropriate decoder you can make any sequence you want and also reset the counter.
 

Thread Starter

tee2

Joined Nov 19, 2004
46
Bernard..I'll give your idea a try. I'll need to order a few parts. That will be the biggest circuit I will have built, should be fun. I think I understand every thing.

mik3...I would like to give your idea a try but I haven't a clue to what you are saying. :confused::confused::confused: I am a newbie to electronic. Bernards idea is more my speed but still challenging for my skill level. Thanks for the reply maybe some day.

Todd
 
Top