RESULT & DISCUSSION
The traffic light was designed on three junction. The traffic light changed from green to yellow, yellow to red, red to green and continuously followed the program coding. PWM and interrupt use on the LED of traffic light. The interrupt function to bother the brightness of LED based on PWM. PWM act at all traffic light to control the brightness of LED.
4.1 Schedule of traffic light for normal sequence For the first condition, the route of C and A will green if sensor (car) not trigger at route B and route D. For the second condition, route D and B traffic light was red. When a car have on route B, route C traffic light will become from green to red for 25seconds. Traffic light on route B will become green, …show more content…
This sequence will be continue over and over. Route A is always green. The time delay for green light, is 9seconds. For Red is 5seconds. The simulation are successful according with the program coding.
Junction/ State A B C D
1 G R G R
2 G R-G G-R R
3 G G-R R R-G
4 G G G G Table 4.1: Schedule of traffic light for normal sequence
R RED
R-G RED to GREEN
G GREEN
G-R GREEN to RED Table 4.2: Legend for table …show more content…
This connection to make a trouble shoot before the component soldering on PCB board. It as a safety precaution before make a solder.
4.5 Prototype of the Traffic Light System
Figure 4.5: Prototype of Traffic Light System Figure 4.5 showed the prototype of traffic light system. This traffic system is equipped with control panel.
4.6 Hardware Result
The system is implemented as shown in figure 4.6 when the power is on. The traffic light 1 and 4 is active as the same time.
Figure 4.6: System flow diagram of traffic light
TRAFFIC LIGHT RED YELLOW GREEN
1,4 0 0 1
2,3 1 0 0
1,2 0 0 1
3,4 1 0 0
1,3 0 0 1
2,4 1 0 0
Table 4.3: Table of green light and red light of traffic light for turning lane for 10 seconds
The system is implemented as the above table 4. The green light of the traffic light 1 and 4 is ON and the red light of the other traffic lights are ON except for the traffic light 1 because of using free lane. The duration time for traffic light to change are 10 second.
Figure 6: The green light of traffic light 1 and 4 for straight lane (East-West and West-East) and turning lane (East-South)