# Delay time for traffic light

I am doing a traffic light design control circuit, so the light will change from red to yellow (for 3s) to green(for 12s) then to yellow(3s) , my question is how do when the light is green, how do I make it green for 12 s before turning yellow again. I was given a clock with 3s cycle.

Do I have to use J-K flip flop or counter ? Is there a way not to use it ? Because we wont be taught them until next week .

• What constraints do you have on the circuit? (This sounds like a homework question, so I'm guessing you can't use a microcontroller). What have you tried thus far? Add additional information to your post, not in comments. – uint128_t Apr 25 '16 at 15:20
• Be aware that red to yellow to green is not a standard sequence, and for good reason. It encourages people at a red to get ready to jump forward on green, and this will encourage accidents. Yellow is warning for red. – WhatRoughBeast Apr 25 '16 at 15:41
• Very hard to answer since we don't know the scope of allowable technologies: i.e. things you are being taught in the course. Unfettered, I'd go for a motorized drum contactor. It's lightning proof. – Harper Apr 25 '16 at 22:09

Since this is obviously homework for a digital design class (or similar), there is a tradition on SE that we don't simply feed your the answer, but guide you towards it, so I'm not going to provide a counter or IC or anything, just some food for thought.

For me, this implies some sort of counter, although I'm sure that you can implement the counter using J-K flip-flops.

It looks like you have 3 states

green - 12s - 4 periods

yellow - 3s - 1 period

red - 3s - 1 period

If you look at the periods, you have a modulo 6 cycle (4 + 1 + 1) which could count from 0 -> 5. When the counter is 4, then yellow. When the counter is red, then 5. When not yellow or red, then green.

Good luck!

If you won't be taught about digital circuits for a while, you could use three 555 timers hooked up so the red one would be on for 3 seconds, then when it timed out it would turn the green on on for 12 seconds, then when it timed out it would turn the yellow one on for 3 seconds, then when it timed out it would turn the red one on and start the cycle again, forever.