Traffic Lights Controller Page 1
Oct 29, 2014
Traffic Lights Controller
Page 1
ObjectivesObjectives
To design and to produce a simple circuit of the traffic light controller.
To learn how to use other program to check the result of the karnaugh map.
To design a fully functional traffic light for the cross junction
To learn how to design and simulate the traffic light circuit schematic and download the design into LP-2900 using Altera Quartus-II program to make sure that our design is functioning theoretically and practically
Page 2
Introduction Introduction
The traffic light 1 will turn green and the rest of the traffic light will be turn to red light.
It will take two seconds for the light to turn to yellow light. Then traffic light 1 will turn to yellow while the rest of the traffic
light will still be red light. This will take one second before it turn to red light. After the
traffic light 1 turn to red light, the traffic light 2 will turn green and the rest of the traffic light still in red light.
This process will continue for traffic light 3 and 4 and the whole steps will keep on going in this order.
Page 3
The truth table of traffic lightThe truth table of traffic light
Boolean EquationBoolean Equation
Based on the truth table and the Karnaugh map just now we can find the equation below:
Y1 = A’B’CD’ G1 = A’B’C’R2 = A + CD’ + BC + B’C’Y2 = BC’DG2 = BC’D’ + A’B’CDR3 = AC + A’B’ + A’C’ + C’DY3 = AC’D’G3 = BCR4 = A’ + C’D’Y4 = ACDG4 = AC’D + ACD’
Logic schematic circuit Traffic 1Logic schematic circuit Traffic 1
Logic schematic circuit Traffic 2Logic schematic circuit Traffic 2
Logic schematic circuit Traffic 3Logic schematic circuit Traffic 3
Logic schematic circuit Traffic 4Logic schematic circuit Traffic 4
General CircuitGeneral Circuit
Timer
Counter
Logic Block Diagram
Page 11
1 Hz timer using divider 101 Hz timer using divider 10
Output waveform of traffic light Output waveform of traffic light
Page 12
DiscussionDiscussion
Page 13
timer - controlled on lights changing time.
green light lighting longer than yellow.
2:1 = green lights will be two times longer
than the yellow light.
1Hz representing the ratio time output for
2:1
0.1Hz is for ratio time output 20:10.
Counter 74163 – count from 0000-1011
(0-11)
Page 14
Using counter 74163Using counter 74163
1 0 1 1
1 1 1 1
1
0 Active CLRN –reset QA-QD (0000)
Waveform of counter 74163 testedWaveform of counter 74163 tested
Problem EncounteredProblem Encountered
Page 17
Selection of counter Try and error method
types of counters had been tested; - 74160 synchronous decade counter (standard
reset) - 74161 synchronous 4-bit counter (standard
reset) - 74162 synchronous decade counter
(synchronous reset)- 74163 synchronous 4-bit counter (synchronous
reset)
Problem EncounteredProblem Encountered
Page 18
Synchronous counters-outputs change together on each clock pulse
Decade counters-count 0 to 9 (0000 to 1001 in binary).
4-bit counters -count from 0 to 15 (0000 to 1111 in binary).
Standard reset -when low it resets the count to zero (0000, QA-QD low
Synchronous reset-reset occurs on the rising-edge of the clock input
Conclusion and RecommendationConclusion and Recommendation
Page 19
successfully run the traffic lights as desired
The weakness - the traffic light has to be lighting in sequence- drivers need to wait although they are no car in other junction
RecommendationRecommendation
Page 20
sensor to detect the appearance of carenhance the circuit with the additional sensor or monitoring system time of green light and yellow light also not practical in real world
-increase the time ratio for green light to yellow light -set the timer to approaches the real traffic time.
Demo