design a traffic light with a cross walk

Thread Starter

trinipulse14

Joined Nov 22, 2010
1
hi guys, i have assignment to do and i am pretty much stuck. this is the question. this lecturer gave us a vid on state machines to look at on youtube an daz wit we on our own
any help greatly appriciated.

Question 2
A simple example of a FSM is a traffic light controller.
There is a busy main road that passes in front of a primary school. There is also a pedestrian crossing in front of the school controlled by two sets of traffic lights as follows: the traffic light for vehicles (on the main road) has three possible states- Red (R), Yellow (Y) and Green (Gr) while the traffic lights for pedestrians to cross the road have two lights- red for Wait (W) and green for Go (g). The normal state of the system is the green light for vehicles and the wait light for pedestrians. The pedestrian green light is activated by a push-button switch that can take two values; 1(pressed) and 0 (not pressed).
You are required to design and implement a synchronous sequential circuit using J-K flip flops to control the traffic lights in a safe and effective manner. Make any assumptions necessary
 

Georacer

Joined Nov 25, 2009
5,182
It seems it's that season again where students start learning digital logic.

Anyways, check here to refresh what you learned about the design and implementation of FSMs: http://www.allaboutcircuits.com/vol_4/chpt_11/5.html

Other than that, do you have a transition diagram, state table or other thoughts to post here? We 'll work based on your ideas, we won't give you chewed food (does that expression exist in English?).
 

thatoneguy

Joined Feb 19, 2009
6,359
You can also search the forum for "Traffic Light", but do not bump (reply to ) the old thrads. Just link to them and ask questions.

Your circuit WILL be different, mostly because we have a number of solutions in the archive for the non walk signal version. You'll need a 1 second clock, to flash the "no crossing" for 8 seconds, at the end of which, no crossing goes solid, and that traffic light goes from green to yellow, staying on yellow for two seconds, and then to red. The process repeats for traffic going the other direction. Red lights go straight to Green, while Green lights transition through yellow to Red.

Walk (upper/white) is lit solid for 20 seconds, then don't walk (lower/orange-red) blinks for 8 seconds at 1 Hz, ending with a solid don't walk signal between the 8 seconds and the yellow light for a total of 30 seconds of "walk" time with warning. These are in parallel with the road with the green light.

It can be done with counters, flip flops, whatever is requested by prof. Just pull out the taps that have the behavior you are lookig for.

A user pressing the "Push To Walk" button will simply jump the timer so there is < 5 seconds to wait (the other intersection still needs to go through yellow to red).
 
Top