Design and development of sensor based traffic light system

American Journal of Applied Sciences, March, 2006 by A. Albagul, M. Hrairi, M.F. Hidayathullah

As for the infrared object detector, SHARP GP2D15 is used. The sensor task is to detect the presence of vehicles. It is functioning continuously by giving a logic 0 when there are no vehicles and logic 1 when there are vehicles present. Therefore, they can detect the length of the queue depending on where they are placed. Each detector has a JST connector housing slot and three crimped wires to use in the JST connector. The connectors are plugged into the appropriate housing slot and into the detector.

The light emitting diodes are used in order to show the traffic light changing according to the program. The LED light will change according to output by the microcontroller. In each lane, there are three LEDs according to traffic lights colors which consist of red, yellow and green. Moreover, two inverters were used in order to connect the output of green and red LEDs together. Therefore, when the green LED is ON then the red LED will be OFF and vice-versa.

Figure 3 shows the connection of the input and output ports to sensors and LEDs. The BS2 microcontroller has 16 Input and Output ports. The ports were divided into 8 input and 8 output ports. The output ports, which are from P0 to P7, give either logic 0 or 1 to the LEDs. Meanwhile, the input ports, which are from P8 to P15, receive input signal from the sensors.

Software simulation: After the hardware had been setup, a program written in the BASIC programming language in the BASIC STAMP editor is downloaded into the microcontroller. The simulation of the algorithm of the traffic signal system was done using MATLAB software. Furthermore, the countdown timer interfacing according to the traffic system using Lab VIEW software is created using the BNC Adapter and the Data Acquisition Card (DAQ) device.

The Lab VIEW programming is done in the diagram using graphical source code. In the block diagram the program runs from left to right. If the green light in the traffic model does not illuminate, the system goes into default since there the no input into the system. The signal from the sensor is acquired through the DAQ, which is connected, to the computer.

[FIGURE 1 OMITTED]

[FIGURE 2 OMITTED]

[FIGURE 3 OMITTED]

[FIGURE 4 OMITTED]

Implementation: A single 3-lamp traffic light is considered as a finite state machine. It has three states, Red, Yellow, and Green, which are also the outputs. A single input for the traffic light is defined, with values 0 for no change and 1 for change. This input is connected to the output of a countdown timer, which outputs a 1 when it reaches zero. Thus for a single light, we can draw the state transition diagram as shown in Fig. 4.

A single traffic light is not very useful. In reality, lights are installed in pairs, with two pairs per intersection. Therefore, in the simulation one pair of lights was used to control traffic in the north-south direction, while the other pair controls the east-west direction. Furthermore, the two pairs of lights must be synchronized; therefore countdown timers are connected to the lights in pairs. Since the lights that make up a pair mirror each other, they are considered as a single light. But since the opposite pairs must be in sync, we must group their different outputs together. Thus there are 3 x 3 = 9 possible outputs. Each combined output describes the color of the north-south light along with the color of the east-west light.


 
Comment on Article

BNET TalkbackShare your ideas and expertise on this topic

Subscribe to this discussion via Email or RSS

  •  
    1

    cmccooey

    10/19/09 | Report as spam

    RE: Design and development of sensor based traffic light syste ...

    good candidate for sentient object examples

  •  
    2

    sheronerose

    10/21/09 | Report as spam

    Design and development of sesnor

    Good write up on this niche. thanks for the sharing mate. keep more writing like this.

  •  
    3

    sheronerose

    10/21/09 | Report as spam

    RE: Design and development of sensor based traffic light syste ...

    The sensors at Andover W and Strander in Tukwila going south on Andover or making a left turn from Strander westbound to Andover W southbound don't work for motorcycles. I can trip them with a 1993 Nissan, <a rel="nofollow" href="http://www.nimbusitsolutions.com" rel="dofollow">bulk sms</a>but not with a Kawasaki KZ1000 LTD or a Honda PC800 (both 600 lb bikes).

    Mr.Albugal, you didn't really answer the question, which was what are motorcyclists supposed to do at the time that we're sitting at an intersection at oh-dark-thirty and the light is stuck on red? We're not idiots; we know where to look for the sensors, we know how to roll back and forth trying to trip them, some of us even know enough to have toyed with the notion of building EMP devices strong enough to trigger every sensor at the intersection at once. Some of the sensors just suck, and it's painfully obvious that you guys don't motorcycle-test your own sensors.

    So do we wait for two complete cycles and then treat the light as a stop sign or what?

Please add your comment:

  1. You are currently: a Guest |
  2.  

Basic HTML tags that work in comments are: bold (<b></b>), italic (<i></i>), underline (<u></u>), and hyperlink (<a href></a)

advertisement
Click Here
advertisement
  • Click Here
  • Click Here
  • Click Here
advertisement

Content provided in partnership with Thompson Gale