DEVELOPMENT OF AUTOMATIC TRAFFIC LIGHT BASED ON WIRELESS SENSOR NETWORKS WITH STAR TOPOLOGIES

Traffic jam at the intersection is caused by many things such as the number of vehicles that exceed the capacity of the highway, road users who do not obey the rules, or lights on a traffic light that is not in accordance with the road conditions. The government has implemented measures to control congestion solutif at a crossroads in Indonesia, especially in big cities by installing the ATCS (Automatic Traffic Control System) that regulate light traffic lights based on real time conditions crossroads. The weakness of this system still needed the operator to settings the traffic light lamp replacement and maintenance costs are expensive. Therefore, we need a system that can regulate light traffic lights adaptively based on the length of the queue of vehicles. In this project, created a system that is able to set the lights on the traffic light by the long queues of vehicles adaptively based wireless sensor networks. Data from XBee sent with a frequency of 2, 4 Ghz towards the coordinator node, the coordinator node data is then processed by a microcontroller arduino mega to compare the length of the queue between the road and determine the traffic light lights adaptively. The test results show a sensor capable of detecting the vehicle up to a distance of 175 cm, the system can detect the length of the queue as far as 56 meters, and can be changed adaptively in a ccordance long queues of vehicle.


Background
The growth of the population in Indonesia, followed by the increase in the number of holdings transport both private and public transport. The situation is not matched by the capacity of the highway which is getting memadahi cause problems of traffic jams often occur every day, especially in big cities in Indonesia. Congestion is a situation where the number of vehicles exceeding the capacity of the highway, causing the queue is quite long. Bottlenecks when viewed from the social impact can make a person stress, tired, too late to the destination. Likewise, the air pollution caused by exhaust emissions released by motor vehicles, the effect is very influential on environmental issues, because if the level of air pollution is already past the desired threshold it will affect the health of living creatures that breathe it, especially humans. Socioeconomic impacts due to congestion clearly more visible in terms of lost benefits and costs dikeluarkan.Yakni congestion makes the vehicle speed slowed or even halted (stuck position). These conditions make the use of fuel oil (BBM) increased due to longer engine running so the driver must pay more for fuel purchase. Users road works can also lose their working hours due to late for work so here they lost time caused by congestion. In addition, road users experiencing a change in physical or mental condition that impacts such as stress and fatigue that this is associated with the user's convenience in driving. Journals (Azhar Aris, 2012). The Government has taken various steps to reduce the congestion of them in the forged public transportation convenient and inexpensive to societal expectations shift from private vehicles to public transport, improvement of roads, construction of highways, construction of flyovers, the use of the ATCS or Automatic Traffic Control System is a system Digital control traffic lights to regulate traffic lights corresponding density of the control room ATCS control officers could accelerate the wait time so as to break the bottleneck, and vice versa ATSC system has been implemented in the city of Bogor, Jakarta, Surabaya and Bandung. The drawback of such systems require monitoring for 24 hours and the price per unit ATCS quite expensive so it is difficult implemented throughout Indonesia n the near future. Therefore we need a tool that can detect traffic density for traffic light control timer automatically.
In the final project, the writer will create a system design prototype traffic light-based wireless sensor networks are adaptive to length of the queue, the system detects the presence of vehicles dengang compass sensor HMC5883L four nodes of each of the steps, while the sensor sends data to the coordinator, the coordinator comparing denganruas road other then the light changed adaptively according the length of the queue. This system is more effective and efficient value for an affordable cost, easy maintenance and does not require the operator to set the lights perhantian traffic light.

Traffic Light
Traffic Light is a traffic light that serves to give signs on roads or crossroads on motorists to run smoothly and organized with color signaling lights that indicate when the rider must be alert, walk and stop. Some of the methods used for data collection system uses vehicle sensors and detectors so that can know the current conditions and characteristics of the vehicle in each lane.

Sensor
Sensor is a device that serves to detect the symptoms that come from a change in energy, change the amount of physical and chemical into electrical quantities that can be analyzed with a particular electrical circuit. In this thesis the author uses HMC 5883L Compass sensor to detect the presence of vehicles. IC HMC 5883L implementing AMR (Anisotropi cMagnetoresistive). AMR technology has advantages over other magnetic sensor technologies. Sensor that is anisotropic or have different characteristics in different directions is a directional sensor (directional) having high precision and sensitivity, and to produce a linear output of changes to the orientation angle of the axis. Solid-state sensor is constructed with axes intersect (crossaxis) that is very precise to detect the direction and magnitude of Earth's magnetic field on a scale of a few milli-gauss up to 8 gauss. The magnetic sensor is recognized as a low-field sensor with the best sensitivity and reliable by the industry.

XBee
In this thesis the author uses a star topology as the inter-node configuration. Star topology is communication in which each connection does not happen optical-electrical conversion, so that at each node that communicates not happen buffering process. In the star communication parties communicate with each other to communicate directly without an intermediate node so that each node that communicates not happen buffering.

SYSTEM DESIGN
In designing the system making is about the design of the system to be built, the architecture of the system, the realization of the system. System planning The general picture of design XBee communication system on the ground to move detection using accelerometer sensor can be seen in Figure 1.  The process of making tools work in this final project will require design and materials. In the design and assembly of the authors system dividing it into two parts, namely on the sensor node and coordinator node. Below is a description of the tool working system. Sensor node and coordinator node is connected wirelessly using the XBee as media data sender, then the coordinator node sends the output to the traffic light by using a cable transmission media.
Designing Networks Systems Designing Sensor Networks In Node In this system using the Arduino Uno ATMega IC 328 to the control system delay counter. In Figure 3.5 arduino connected premises Compass HMC 588L as vehicle detection and XBee S2 as the sender of the media data to the coordinator node. This system uses a supply voltage of 8.4 volts.
Designing Networks In Node Coordinator In this system using the Arduino Mega 2560 ATMega IC to control system delay conter. In Figure 3.6 arduino XBee connected to a media recipient of the data from the sensor nodes, the output is sent via cable to the LED. Flow diagram of the system will include vehicle detection process, the process of sending data to the coordinator, the process of comparison with other roads, and traffic light configuration process. In this flow chart there are two functions that functions in show them the coordinator node and coordinator node function. Realization System Implementation of this device requires hardware and software used for system testing. Here are the software and hardware needed by the system.

RESULT AND ANALYSIS
To determine the sensor can detect the presence of vehicles or not, the sensor testing done magnitude and the threshold determination on the sensor. Determining Threshold Compass sensor HMC 5883 L is the kind of AMR sensors are sensitive to changes in direction and the presence of metal, and therefore the determination of threshold on each road must comply with the direction of the wind.
Threshold sensor readings are threshold sensor, if the sensor meets a predetermined threshold value, the sensor is able to read or detect the presence of vehicles. Referring to the paper (Caruso and Lucky, 2002) modules compass sesnsor Axis HMC 5883L about the placement of sensors for detecting the vehicle, the x-axis should be facing (cut) in the direction of the car, the determination thereshold based on the magnitude of the sensor with the formula Magnitude = + + )

Threshold Determination Directions From West to East
In this test carried out two tests, namely when the sensor by car within 50 cm and sensors by car within 1 meter.

Threshold Determination Directions From West to East
In this test carried out two tests, namely when the sensor by car within 50 cm and sensors by car within 1 meter. Sensor testing performed twice when conditions without a car and when the car started coming toward the sensor until the sensor passes from west to east. Tests carried out at the direction of the x-axis compass sensor facing the car (to the north) and the y-axis to the west.  From the testing that has been done, the threshold on the road from west to east is 1500 mgauss.
Threshold Determination Directions From East To West   From the testing that has been done, the threshold on the road from west to east is 800 m gauss. Threshold Determination Directions From North To South     From the testing that has been done, the threshold on the road from south to north is 800 m gauss Threshold testing Parameter testing is done by testing the ability of a sensor to detect a vehicle with a threshold that is superbly set on each of the roads. This is done to determine the threshold that has been set successfully received by the sensor at a distance that has been set or not. The test is performed by placing the sensor and in a distance that has been set.
Test Threshold The experimental results show the value thresold 1500 for phase A or phase Southwestern successfully detected properly and efficiently at a distance of 50cm. The experimental results show the value "1" of 10 trials, demonstrating the value thresold 1500 for phase A or phase Southwestern successfully detected properly and efficiently at a distance of 100 cm (1 meter). Not Detected 10 Not Detected The experimental results show the sensor detected vehicle condition without typing the vehicle walked away from the sensor at a distance of 50cm. Value thresold 1500 for phase A or phase Southwestern successfully detected properly and efficiently at a distance of 100 cm (1 meter).  1  Tidak Terdeteksi  2  Tidak Terdeteksi  3  Tidak Terdeteksi  4  Tidak Terdeteksi  5  Tidak Terdeteksi  6  Tidak Terdeteksi  7  Tidak Terdeteksi  8  Tidak Terdeteksi  9  Tidak Terdeteksi  10 Tidak Terdeteksi The experimental results show the sensor detected vehicle condition without typing the vehicle walked away from the sensor at a distance of 100 cm. Value thresold 1500 for phase A or phase Southwestern successfully detected properly and efficiently at a distance of 100 cm (1 meter). The experimental results show the value thresold 800 for phase A or phase Southwestern successfully detected properly and efficiently at a distance of 50 cm.  The experimental results show the sensor detected vehicle condition without typing the vehicle walked away from the sensor at a distance of 50cm. Sensor managed mendetksi vehicle condition without typing the vehicle running away from the sensor. Value thresold 800 to phase or phase C East successfully detected properly and efficiently at a distance of 50 cm. The experimental results show the sensor detected vehicle condition without typing the vehicle walked away from the sensor at a distance of 50cm. Value thresold 800 to phase or phase C East successfully detected properly and efficiently at a distance of 100 cm (1 meter). The experimental results show the value "1" of 10 trials, demonstrating the value thresold 1000 for phase B or phase-Holland successfully detected properly and efficiently at a distance of 50 cm. The experimental results show the value thresold 1000 for phase B or phase-Holland successfully detected properly and efficiently at a distance of 100 cm. Not Detected 10 Not Detected The experimental results show the sensor detected vehicle condition without typing the vehicle walked away from the sensor at a distance of 50cm. Value thresold 1000 to phase or phase D Holland successfully detected properly and efficiently at a distance of 50 cm. Not Detected 10 Not Detected The experimental results show the sensor failed to detect the condition without the vehicle when the vehicle is running away from the sensor at a distance of 100cm. Value thresold 1000 to phase or phase D Utara berhasil terdeteksi dengan baik dan efesien pada jarak 50 cm. North successfully detected properly and efficiently at a distance of 50 cm. The experimental results show the value "1" of 10 attempts thresold value in 1000 to phase or phase D South successfully detected properly and efficiently at a distance of 50 cm.   Not Detected 10 Not Detected The experimental results show the sensor detected vehicle condition without typing the vehicle walked away from the sensor at a distance of 100cm. Value thresold 1000 for phase D or South Fasa successfully detected properly and efficiently at a distance of 100 cm 1 (Meter).

XBee testing
XBee Testing conducted on urban conditions in Semarang State Polytechnic campus. XBee Testing conducted at Semarang State Polytechnic campus with the condition of many buildings and cars around the place of testing. From the testing that was done on the condition Urban at Semarang State Polytechnic, maximum distance XBee send and receive data as far as 73 m. Because of the XBee can send and receive data at a maximum distance of up to 73 m, then the placement of the nodes in place as far as 14 m between nodes. So that, the maximum distance sensor can read queue length is as far as 56m.

Testing Traffic Light
At the traffic light overall testing performed on campus POLINES. Setting solid state or not is to determine the third of four nodes in a single phase or segment of detecting the presence, if three of the four node sends a "1" to the coordinator of the phases or segments are included in the count plan on A phase ie sensor nodes A1 to A4 shown in figure 4.12 from west to east. Phases B show them pictures shown by 4:13 from south to north. Phase C is a sensor node C1 through C4 from east to west is shown in Figure 4. 14. As the phase D from the south to the north are the sensor nodes D1 through D4 are shown in Figure 4. 15. The prototype in place at each end path in one phase.        In Figure 4. 18 shows the delay setting counter plan 2, since 3 of the 4 node or nodes 4 Phases A and C detect the presence of vehicles. Traffic Light settings on Phase A and C are green 40s, yellow 3s and 6s red.

CONCLUSIONS AND RECOMMENDATIONS
Conclusion subsequent suggest that the system can calculate the exact number of vehicles. 4. On the next system are suggested to multiply the nodes so that the distance and maximum data quality.