Traffic Light Circuit using 555 Timer
I would really appreciate if anyone could help me figure out how to create a traffic light circuit using a single 555 timer. I need 3 LED's that flash for one second each and then repeat that cycle. I know how to do it using 3 555 timers but I cannot figure out how to do it using only 1. Thanks in advance!
Well, you'll need more than just a 555 timer
Take a look at a CMOS 4017 Decade Counter. Use the square wave output from your 555 timer as the 4017's clock pulse (the CP1\ input, tie the CP0 to ground.)
The 4017 has an MR input; if that is put to a logic "1", the counter is reset.
It also has 10 outputs O0 through O9. These outputs are individually set to a logic "1" in sequence, the remainder of the time they are at a logic "0" level. You can use the O0 through O2 outputs for your green, yellow, and red LED's respectively. Tie the O3 output to the MR input; it will cause the 4017 count to re-set and start over with the green light.
The 4017 can't supply enough current to run your LED's, so you'll need something for that. A 4049 inverting buffer would BARELY supply enough for standard LED's if you were running at 10V - but it's risky to run IC's at their max ratings.
Instead, have a look at the ULN2804, which is Eight Darlington Pairs. The ULN2004 is similar, but only seven pairs. Each of the Darlington pairs can sink up to 500mA - that's quite a bit. You COULD use ULN2803 or ULN2003 IC's, but you'd need to use resistors to limit the base current if your Vcc is in excess of 5V.
You connect O0-O2 of the 4017 to the first 3 gates of the 2803/2804/2003/2004, and the output goes to the cathodes (short leads) of the LED's. The anodes of the LED's get connected to current-limiting resistors, the other side of the resistors gets connected to Vcc. Rather than having the 4017 attempting to drive the LED's itself (which it is not capable of), the Darlingtons invert the logic output of the 4017, so we're using the open-collector output of the Darlingtons to provide the ground for the LED's.
Calculating your current-limiting resistors:
Since you have three different types of LED's, they'll have different ratings for current @ voltage. You should calculate the current flow for each LED to ensure that you don't exceed the current ratings.
Since you're using Darlington pair drivers, there will be a voltage drop of roughly 0.7v across the junction, even when it's conducting - this has to be figured in with the voltage rating of your LEDs.
For example, let's say that one of your LED's is rated for 15mA @ 2.5v.
You plan on using 12V for VCC.
R = E / I (Resistance = Voltage / Current)
R = 12V - 2.5V - 0.7V / 15mA
R = 8.8V / 15mA
R = 586.667
So, for an LED of the stated rating, you'd need a 586.667 Ohm resistor.
You could use the next highest value; the LED would not be quite as bright, but it wouldn't suffer an early demise
Let's see what happens using 620 Ohms, the next higher E24 value:
I = E/R (Current = Voltage / Resistance)
I = 8.8/620
I = 14.2mA (approximately)
Safely within limits, and your LED will still be plenty bright.
Have a go at it.
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Last edited by SgtWookie; 12-09-2007 at 10:17 PM.
|555, circuit, light, timer, traffic|
|Related Site Pages|
|Worksheet||TTL logic gates|
|Textbook||Ring counters : Shift Registers|
|Textbook||CMOS 555 LONG DURATION RED LED FLASHER : 555 Timer Circuits|
|Textbook||CMOS 555 LONG DURATION FLYBACK LED FLASHER : 555 Timer Circuits|
|Textbook||CMOS 555 LONG DURATION BLUE LED FLASHER : 555 Timer Circuits|
|Textbook||CMOS 555 LONG DURATION MINIMUM PARTS RED LED FLASHER : 555 Timer Circuits|
|Textbook||555 HYSTERETIC OSCILLATOR : 555 Timer Circuits|
|Textbook||LED sequencer : Digital Integrated Circuits|
|Textbook||Special-purpose diodes : Diodes And Rectifiers|
|Thread||Thread Starter||Forum||Replies||Last Post|
|How to design an egg timer circuit?||JLam||Homework Help||2||03-21-2008 04:36 PM|
|556 timer circuit?||hobbyguy48||General Electronics Chat||3||12-05-2007 01:26 AM|
|distance detector using 555 timer||cvrider||The Projects Forum||2||12-03-2007 10:28 PM|
|difference between an analog multivabrator and a 555 timer multivbrator||anilson||General Electronics Chat||2||10-02-2007 02:06 PM|
|555 timer project help||tester101||The Projects Forum||3||09-05-2007 04:32 PM|