Traffic Light Circuit

Discussion in 'Homework Help' started by Lightme, Aug 6, 2011.

  1. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    Hey, I am new to this site but I am having a hard time making sense of making my circuit.
    I am new to circuit maker and this is my first piece of work, I have to make a Traffic light sequence, I have already made my circuit,

    [​IMG]

    The set of traffic lights controlling the crossing between Herjal Lane and Mainland Avenue in Venice, operates in the following sequence :-

    L3 L2 L1 Herjal Lane, Mainland Avenue,
    0 0 0 Red, Green ,
    0 0 1 Red, Green ,
    0 1 0 Red, Amber,
    0 1 1 Red & Amber, Red,
    1 0 0 Green, Red,
    1 0 1 Green, Red,
    1 1 0 Amber, Red,
    1 1 1 Red, Red & Amber,

    I know I need two traffic lights for this, and I know the order in which they change, But you see I don't know where to go from there, I have created the circuit and I know I have to create a logic that turns outputs q3, q2 and q1 into the right logic that illuminates the correct traffic light.

    The problem is I have been trying for hours, but I don't have a clue on how to create the logic to change the traffic lights. Do I need to connect two traffic lights to one circuit? or do you think I need two separate circuits for Herjal and mainland?

    Thanks
     
  2. TBayBoy

    Member

    May 25, 2011
    148
    19
    are you required to use the 74ls293?
     
  3. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    [​IMG]

    That's the question, I have to use the specified circuit, what I am stuck on is how to apply the logic to the circuit once I have made it.
     
  4. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Hi Lightme,

    Welcome to the forum!

    I don't have a lot of time, but this looks like fun. Okay, so at the bottom of your problem statement, it says you will need two sets of traffic lights, so that implies at least two 74LS293's and two sets of lights. I'd start by looking at how to control one set of lights first.

    Look at the '293 datasheet, specifically the truth table. You first need to determine how to turn on only one light at a time. Once you've done that, look at how to turn on each of the three lights in the order you want. Lastly, look at how you might a) control both lights with one logic circuit or b) use two logic circuits (one for each traffic light) that either feedback to each other or use another logic circuit so they are staggered, i.e., you don't end up with two green lights at the same time.

    Let us know if you get stuck, but be sure to show us your work first.

    Good luck!
     
  5. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    Awsome, Im going to give this a try now.. the problem i am facing is that im not fully aware of the functions of circuit maker, so i can make the circuit, i just have no idea how to add the logic etc but ill give it a go first!

    much appreciated
     
  6. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    I have tried to get the circuit i shown in post 1 to work, using all the required parts, but im not sure what im doing wrong, does the circuit need to be whole? am i missing a battery?

    I am trying to test it with just one traffic like and one counter, with the logic switch etc and all other parts specified, but I have no idea how to add the logic in order for me to get the lights to switch on, or even if my circuit is complete, can you take a look? its a the circuit in post 1, do you think i need to add anything? or do i just need to add the logic for me to get the lights to change.
     
  7. Zazoo

    Member

    Jul 27, 2011
    114
    43
    Yes, you will need logic between the 293 counter and the street lights.
    Try starting with a truth table for the system.
    You have 3 inputs (L3, L2, L1) and 6 outputs (3 lamps on 2 street lights).
     
  8. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    Right, I understand i have three inputs, and six outputs, what logic gate would i be using?

    The three inputs would be as such

    L3 L2 L1

    T T T
    T T F
    T F T
    T F F
    F T T
    F T F
    F F T
    F F F

    But how would i calculate the 6 outputs? what gate would i use if any? sorry but its just confusing the hell out of me and i cant find the solutions pad for this question.
     
  9. Zazoo

    Member

    Jul 27, 2011
    114
    43
    The necessary outputs are given by the sequence given in the problem statement. Each traffic light has 3 inputs, one for each lamp.

    One approach for the first lamp:
    1.) Set up a truth table for the red lamp at Herjal Lane (HR), you have the red light on for the first 4 counter states, of for the next 3 states, and on again at the last state. So the output table is:

    Code ( (Unknown Language)):
    1.  
    2. L3  L2  L1 |  HR
    3. 0   0   0     1
    4. 0   0   1     1
    5. 0   1   0     1
    6. 0   1   1     1
    7. 1   0   0     0
    8. 1   0   1     0
    9. 1   1   0     0
    10. 1   1   1     1
    As a minterm function: HR = Ʃm(0,1,2,3,7)

    2.) Use a k-map (see first image below) to quickly get the minimized logic:

    HR = L3’ + L2L1

    3.) Build the logic function using gates (see second image below)

    You can repeat this process for each lamp.
     
  10. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    Okay! Thank you so much, I am finally understand it, I thought I needed gates in order for the traffic light to work.

    Really appreciate the help!
     
  11. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    Also, does this mean I would need a LS293 and three gates for each light? so I would have a large circuit?
     
  12. Zazoo

    Member

    Jul 27, 2011
    114
    43
    The number of gates you need for each lamp depends on how the logic for the lamp minimizes. And this is just one of a few possible ways to implement the logic (e.g. you can use a MUX instead of discrete gates).

    The "digital" section of the e-book on this site has all of the info you need to work through this problem:
    http://www.allaboutcircuits.com/vol_4/index.html
     
  13. Lightme

    Thread Starter New Member

    Aug 6, 2011
    8
    0
    ah i see, do you think i could get away with using the same gates to put the logic on each light though? as thats all i know how to do atm, im reading the e-book and learning it, but im struggling on how to input what ive learnt in terms of the traffic light
     
Loading...