Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Traffic light controller

  1. Nov 22, 2007 #1
    Hi,
    I have some problem to design a traffic controller.
    the traffic lights are placed at an intersection of two streets, one street running north-south (called NS) and another street running east-west (called EW).
    there is 5 clock cycles for Red light, 1 clock cycle for Yellow light , and 4 clock cycles for Green light. EW light is Red when NS light is Yellow or Green. Similarly, NS light is Red when EW light is Yellow or Green.
    I need to design the controller that is essentially a counter driven with a clock (without any other external input). I will need 10 states to design the circuit. The six outputs are R-EW, Y-EW, G-EW, R-NS, Y-NS, and G-NS

    What I did is that I tried to design a modulo 10 counter (see attached file ). I form the truth table of the system.
    A B C D | NS | EW |
    0 0 0 0 | R | G |
    0 0 0 1 | R | G |
    0 0 1 0 | R | G |
    0 0 1 1 | R | G |
    0 1 0 0 | R | Y |
    0 1 0 1 | G | R |
    0 1 1 0 | G | R |
    0 1 1 1 | G | R |
    1 0 0 0 | G | R |
    1 0 0 1 | Y | R |

    Then I tried the output tables, but I does resemble to anything I dont have the relationship of the table.
    please can you help me ?
    thank you
    B.
     

    Attached Files:

  2. jcsd
  3. Nov 22, 2007 #2

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    Normal solution would be to use a memory (ROM)
    Treat each possible setup as a location in memory, set the value of the memory so that the output lines are the correct state for each switch.
    Then clock through the memory in sequence outputing these values.

    You can always think of a memory as mapping a particlular set of inputs (the address lines) onto a particular set of outputs (the data lines)
     
  4. Nov 22, 2007 #3
    Hi mgb_phys,

    we cannot use memory, only any kind of flip-flop and basic gates.
    B
     
  5. Nov 23, 2007 #4

    berkeman

    User Avatar

    Staff: Mentor

    You are designing a state machine. Have you learned how to do that yet? There is a step-by-step process to define the states, figure out how many FFs the state machine will require, and then write the truth/transition table and implement the logic.

    http://en.wikipedia.org/wiki/State_machine


    .
     
  6. Nov 23, 2007 #5

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    Also worth googling "Karnaugh map"
     
  7. Nov 24, 2007 #6
    Thank you berkeman and mgb_phys,

    I have looked at what you suggested me and I got some good things to work with!

    B.
     
  8. Dec 9, 2007 #7
  9. Dec 10, 2007 #8

    Astronuc

    User Avatar

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Traffic light controller
  1. Traffic Sensors (Replies: 21)

  2. Controllable Valve? (Replies: 10)

  3. Control System (Replies: 5)

Loading...