Maker Pro
Maker Pro

Flashing LEDs

louisetech

Sep 29, 2010
1
Joined
Sep 29, 2010
Messages
1
Hallo, I wonder if anyone can help me with a project I'm working on at the moment which has grown too complex for my level of ability!

What I need to do is to have three pairs of LEDs, one green pair, one red pair and one yellow pair, powered by one 9V battery. The green pair need to be controlled separately from the red and yellow pairs and they need to flash at a controllable rate (so that the flashing is just green - off - green - off etc). At the flick of a switch (!) the red and yellow pairs need to flash with the green pair in sequence (so that the flashing will be green - red - yellow - green - red - yellow etc). I also need to be able to turn the circuit off altogether so that nothing flashes.

I think I'll need a 555 chip for this, and would like to be able to vary the rate of flashing so I guess I need a few potentiometers in there to replace at least one of the resistors, but I don't know much about 555 chips so need a bit of help. Do I need a separate chip controlling the actions of each LED? Do I need to think of this as three separate circuits each controlled by a 555 chip which just happen to be powered by the same cell? How do I arrange it so that I can get the green LED to flash individually and as part of the overall sequence?

Any help anyone can give would be great! Thanks!

Louise
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
What you describe I believe can be implemented rather simply as a state machine with JK flip-flops (e.g. CD4027). The mode line controls whether just the green LED flashes or all LED's fire in sequence. Note that the K input on all flip-flops is at a logical "1" so the J input controls whether the Q output toggles or is set to logical "0". The reset line forces all LED's off. You can use a 555 timer to supply the clock signal. I have not tried building this but the simulation I created in the attached OpenOffice.org spreadsheet seems to work. Have not considered any initial state except all off. You might find it necessary to include a power-on reset.
 

Attachments

  • Three-State-Counter.jpg
    Three-State-Counter.jpg
    35.8 KB · Views: 346
  • spreadsheet.zip
    10.1 KB · Views: 105
Top