Electrical – Delay time for traffic light

digital-logic

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 .

Best Answer

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!