For testing purposes, the design is emulated on the GreenPAK Universal Development Board using the SLG. The traffic lights signals (equated to digital output pins 5, 6, 7, 14, 15 and 16) are used to activate the LEDs that are already available on the GreenPAK Development Board to visually observe the behavior of the FSM. In order to fully investigate the dynamic behavior of the developed scheme, we used an Arduino UNO board to interface with the SLG. The Arduino board provides the vehicle detection sensor input and system reset signals to the scheme while it gets the traffic light signals from the system. The Arduino board is used as a multi-channel logic analyzer to record and graphically show the temporal functioning of the system. Two scenarios that capture the general behavior of the system are developed and tested. Figure 7 shows the first scenario of the scheme when some vehicles are always present on the side street. When the reset signal is asserted the system starts in the first state with only main green and side red signals on and all the other signals turned off. Since side vehicle are always present the next transition into the second state follows 25 seconds later turning on the main yellow and side red signals. Four seconds later the ASM enters the third state where the main red and side red signals remain on for 1 second. The system then enters the fourth state with main red and side green signals turned on. Since the side vehicles are always present, the next transition takes place 25 seconds later moving the ASM to the fifth state. The transition from fifth to sixth state occurs 4 seconds later as TS expires. The system stays in the sixth state for the duration of 1 second before the ASM reenters the first state.
Figure 8 shows the behavior of the scheme in the second scenario, when a few side vehicles are
present at the traffic signal. The behavior of the system is found to be functioning as designed. The system starts in the first state with only main green and side red signals on and all the other signals to be off 25 seconds later the next transition follows since there is a side vehicle present. The main yellow and side red signals are turned on in the second state. After 4 seconds, the ASM enters the third state with main red and side red signals turned on. The system stays in the third state for 1 second and then moves to the fourth state keeping main red and side green on. As soon as the vehicle sensor input goes low (when all the side vehicles have passed), the system enters the fifth state where main red and side yellow are on. After staying in the fifth state for four seconds the system moves to the sixth state turning both main and side signals red. These signals remain red for 1 second before the ASM re-enters the first state. Actual scenarios would be based on a combination of these two described scenarios which are found to be working correctly.
Link to FAMA
Conclusion
In this app note a traffic controller that can manage traffic passing through the intersection of a busy main street and a lightly used side street was implemented using a Dialog GreenPAK SLG. The scheme is based on an ASM that ensures the traffic signals sequence requirements are met. The behavior of the design was verified by several LEDs and an Arduino UNO microcontroller. The results verified that the design objectives were met. The key advantage of using the Dialog product is to obviate the need of discrete electronic components and microcontroller to build the same system. The existing design can be extended by adding an input signal from a push button for passage of pedestrian looking to cross the busy street. The signal can be passed to an OR gate along with signal from the side vehicle input sensor to trigger the first state change. However, to ensure safety of the pedestrian now there is an additional requirement of some minimum time to be spent in the fourth state. This can easily be accomplished using another timer block. The green and red signals on the side street traffic signal can now also be fed to the side pedestrian signals on the side street.
For more information, please visit traffic signal controller manufacturers.