Development and Designing Smart Traffic Light with Xbee Pro

The main function of the highway are used as a means to facilitate transportation, but today is often challenging due to all road users wanting more quickly reach its destination and precede each other. On the other hand, there is also a special car or entourage effect on traffic density, which in turn impact on congestion. To cope with this is actually the duty of the Traffic Police is not every day got in the way to manage traffic and will not be able to count the number of passing vehicles. To direct the traffic at any place such as a T-junction, an intersection, or intersection five solid pace of the traffic, the necessary traffic arrangements multifunctional tool called Smart Traffic Light. Called smart because the traffic light is deemed able to overcome three problems, such detect traffic density which affects the green light sensor uses the object infrared, able to detect the presence of specific signal from cars special like ambulance or fire engine or police or the like are automatically will change traffic lights red to green light using the XBee wireless module Pro and GPS, and seeks the traffic lights stay lit even though the supply of PLN extinguished using a spare battery. The system is capable of regulating the rate of traffic by arranging alternately road vehicle that passes a certain spot every day for nearly 24 hours a day and on these tools need to pair every day.


Introduction
The development of technology in this day and gerund very fast. Various kinds of works technology were created to facilitate humanity in running all kinds of daily activities. In Indonesia, especially users motor vehicles are increasing, consequently the number of vehicles goes up but the number of streets remains thus increasing the amount of traffic density which resulted in congestion. The jams such appear may be caused by some factors, one of which is the light regulator factor traffic [1] Currently in Indonesia light-controlled technology traffic lights to continue to be developed in such a way, so the role of the traffic light is not just for avoiding congestion alone but also playing the improved role of traffic safety. Lights there at traffic that is currently applied is considered not yet optimal traffic congestion, not to mention there is a special car or an influential entourage on the traffic density that impacts on congestion. To tackle this fact is a police duty not every day are on the road to set up traffic and do not will be able to calculate the number of vehicles that passes. Therefore, a tool is required cross-multi functional. This tool is able to set the rate then crosses by arranging the vehicle's way taking turns that pass a certain place every day for almost 24 hours a day [2].

Research Methods
The method used in this research is with a field study of past the daily activities the real cross that will then be converted into miniature look like the real form of sample mocks follow actual shape. All traffic activity on the miniature will all be programmed through microcontroller using Code Vision software AVR. [3] In addition to using the program, that method used in this study also simulated one part of the system block is a rectifier single full-wave phase. This simulation is done to get pure DC wave results after passing through filter C. The pure wave used for supply driver not to cause the ripple that can make output a less good circuit. Software that issued is Power Simulator (PSIM) foresees the results of a wave of input or output a circuit. [4] Learn more from the system as a whole, can be seen in the block diagram shown in figure 1. Power of the transformer, in part used for the source of the rectifier, in part again used for charging accu source. In this project, used two microcontrollers for different needs. The first using ATMega 128, shocked port This microcontroller is used for display 7 segment, push button circuits, LCD, Xbee Pro(client), object sensors, and light to load. And the second microcontroller uses ATMega 162, ports in this microcontroller are used for GPS, Xbee Pro (server), and dipswitch. Second this microcontroller gets the source of the battery, so when the main supply goes out, work from both this microcontroller will keep running with getting backup of batteries, so system works plan still running. Wireless module in this research is used for data communication between Xbee obtained from GPS as a determinant of the existence of cars special that go, like the ambulance or fire fighters or police or the like [5][6].

Result and Discussion
The rectifier in this study is used to assure battery charger that works online to continue to supply the microcontroller in order lights up even if the primary source an off.
To design a rectifier circuit a full 1 phase wave is needed to calculate the value of the right components. Due to incorrect components values, it can cause voltage poor output results, such as the discharge of the ripple and the output voltage too big. To design this circuit, it is necessary defined several variables, namely:  Input voltage : 12 V  Capacitor : 4700 uF 50 V From the data specified above, it can be calculated the values of components used, namely: Battery Charger here functions to fill battery of constant current until it reaches specified voltage. When the voltage level is determined it has been reached, then the charging current will drop automatically to a safe level precisely pre-determined and withstanding the current charging up to be so slower the led indicator lights up indicating the battery has fully charged. The battery charging circuits used in this study is shown on figure 4 and battery charger test results shown in table 1.
Length of charging time of battery it is estimated that only 3 hours turns out in practice5 hours, because the input voltage is used still not great. However, in charging the battery, standard charging current ranges from 10% -30% of Ah battery, the better use is the range 10% of Ah battery because it will not damage the battery. In practice this turns out the range used is:  The circuit used is a circuit BCD to 7 segments to display seven segments of each side ith the intersection. Seven segments that used is common anode. Every seven segments of drive by 1 piece of IC 7447 so total overall for BCD to 7 segment series need 4 port microcontrollers. As for BCD to 7 segment circuits used on This study is shown in figure 5. This d-latch circuit is used for minimizing the port used on microcontroller. If not using the circuit this, the port used for the seven segment its self-amounted to 4 ports. Due to the limited number of ports with the required ports, then this circuit is used so that only onehalf ports are used. 1 full port for output and 4 bits for control of each IC. The IC used is DL-Latch IC type 74LS373N. The schematic of the driver circuit used can be seen in figure 6.
From the schematic of the circuit, it can be seen that the input comes from the seven-segment board itself that uses the BCD circuit of IC 7447. Each BCD input connected to input of each IC d-latch 74LS373N. All the output of the 74LS373N IC is paralleled on connector to enter into the microcontroller port need one full port, then VCC each IC coupled in with separate connector as the control is also included in the port microcontroller but only four bits are used.  In this case, X-bee pro wireless module used for communication between X-bee insides sending data onto GPS. Data that can be from GPS, received by Xbee transmitter (server) on microcontroller AT-Mega 162 and will be sent to second wireless module as Xbee receiver (client) on AT-Mega 128 microcontroller.
Communication happens to this module is communication between server-client Xbee without monitoring via PC but delivery results as well as data reception is displayed via LCD. The process of sending such data can be viewed through hyper terminals using serial cable.
Before using the Xbee ProModule, it is recommended to set baud rates module (figure 7) first and check whether the circuit is used is correct. Both steps can be done through X-CTU software. After baud rate set, can test circuits of "Test / query".  Transmitter mode : Asynchronous  Baud rate : 9,600 bps  Data bit : 8 bits  Stop bit : 1 bit  Parity bit : none When the comment states "OK" then the circuit that we design is correct. Next the process of addressing selfmodule, can already done using to comment instruction in the X-CTU form as well. After testing and selfaddressing has been successful, communication tested to inter wireless module can be done. Results communication is displayed in hyper terminals.
GPS testing are done to retrieve data ontt the location or existence of that object shown in latitude and longitude coordinates on LCD screen (figure 8).

Conclusions and recommendations
After the planning process is done, manufacture and testing for tools as well as with comparing with supporting theories and from the data obtained then it can be taken conclusion: 1) The output voltage of the infrared sensor can work well in detecting objects, but in the dispersion between the receiver and the transmitter sensor the super-precise probe to obtain the appropriate output results. 2) Battery can back up the main supply work when it goes out with online battery system.
3) For data retrieval of GPS and Xbee pro, should be done in an open space, without barrier. Because of the sensitivity of GPS and Xbee pro used is limited. Moments Xbee pro tests, inter Xbee position must be straight and without any barrier, because can lead to chaotic output results. So also, with GPS, the antenna must be facing directly to the sky and without any obstruction. Latitude and longitude data obtained from GPS able to determine the location and from which direction comes an object.