Traffic Light Logic

Discussion in 'Homework Help' started by Ryan Dickinson, Apr 22, 2016.

  1. Ryan Dickinson

    Thread Starter New Member

    Apr 22, 2016
    Hello all,

    For an end of term project we are required to use digital logic to produce a traffic light system for a main highway and farm road intersection. There are 3 sensors (1 for both the eastern and western direction of the highway and 1 for the farm road). There are also 3 timers that are to be used - 3 seconds for transition a set of light to red from amber, 6 seconds to transition lights to green when either of the roads are empty of cars, 15 seconds to transition the lights when the roads are occupied.

    I am struggling to begin with finding the logic for the combo block that will send a high pulse to the next output which will in turn increment a counter that will change the state of the FSM.

    Does anyone have any ideas or tips on how i should go about beginning the truth table. My issue is that, i understand my inputs to the logic block to be - the sensors and 'count done' - i.e from the state of the sensors has the counter counted the 15 s etc, the output should be next ( which will activate a counter), but when i complete the table next is always 1 so i dont see how i can implement K maps from this.

    any help would be great!

    TrafficLightLogic.jpg Mod edit: rotate/resize image. Welcome to AAC!
    Last edited by a moderator: Apr 22, 2016
  2. WBahn


    Mar 31, 2012
    You need to describe your specs more clearly.
  3. Ryan Dickinson

    Thread Starter New Member

    Apr 22, 2016
    Thanks for the reply, ill try again.

    Three pairs of traffic lights are due to be installed: a pair facing west, a pair facing east, and a pair facing south down the minor road.

    There are three traffic sensors which are to be installed in the roads, each of which output a digital ‘1’ signal whenever a car is detected above them. We can assume that the 2 sensors working on the main road are equal, so in effect there are 2.

    In the default state, traffic should be allowed to flow unhindered along the main road. If a car is sensed on the minor road, then the traffic lights should change after fifteen seconds or whenever there is no traffic on the main road for six seconds (whichever occurs first) to allow the car from the minor road to enter the main road.

    i have also attached the state transition diagram. I am needed to design pure combinational logic that will take in the sensor high or lows as inputs and the timer counted highs as inputs and put out a 1 which in turn will change the state of the lights.

    hope this is more clear :s