# Introduction e are much aware of the fact that ambulances and various other emergency services get disrupted by getting caught up in traffic. On an average each ambulance/fire-engine takes over 28 % more time and in the case of cities and urban areas delays could even go as far as up to 1-2 hours regardless of distance to destination. Establishing proper coordination among authorities at all times is neither possible nor feasible, apart from this due to increased dependence on electronic and wireless systems there is the threat of undesired intrusions. Hence a smart, reliable and autonomous traffic control system is required to prevent the loss of many lives/collateral delays. On thorough, systematic evaluation of the problem we made the following observationsambulances/emergency service vehicles get caught up in traffic due to taking less favorable (e.g. traffic prone) owing to the drivers' lack of knowledge and also because those on the roads are unaware/unguided of an ambulance/emergency service vehicle approaching and the actions needed to be taken in order to make way for them. # II. # Design Through the analysis of the problem it has been decided to solve the problem in two parts-the first part of the problem i.e. drivers' awareness of approaching ambulance/emergency service vehicles and information for necessary measures/actions to be taken is solved by using the RF-Transceivers and a additional sensor on the ambulance that transmits its location on the road to nearby traffic-signal posts fitted with systems to react accordingly by warning and diverting traffic to make way for the ambulance/emergency service vehicle. The communication between the ambulances /emergency service vehicles and device at signal posts is done via RF signals using a secured low-power Zig bee wireless transmission protocol, a technology with proven ease of deployment, functionality and costeffectiveness. The second part of the problem i.e. choosing the most favorable route is solved by gathering roadspecific and other custom data of traffic conditions from various sensors (IR etc.)fixed at several strategic locations along the roads. The data obtained is then analyzed for information and searched for patterns to obtain a list of best routes (represented in colors based on traffic intensity, distance etc.) to guide the drivers at real-time assisted with in-vehicle GPS system. # III. Module 1 The first part i.e., system to prevent ambulances/emergency service vehicles from getting caught up in traffic due to fellow drivers' lack of awareness/guidance is realized by using this method .The construction of this module include two pairs of RF transceivers of different frequencies say TX1-RX1-433MHz and another pair say TX-RX2-836 MHz for communication between signal posts and ambulances/emergency service vehicles. By using the two frequency pairs of RF trans receivers the protocol will be more secure. The above is the traffic post module which is fitted at the traffic junctions it uses another transceiver say TX2-RX1-836/433 MHz for sending and receiving signals between the ambulance and traffic post. The master unit uses an 8051 microcontroller for processing which is connected to the traffic controller that acts as a slave. When an interrupt is generated by an emergency vehicle the master unit will disable the slave (traffic controller) and it takes control over the whole action. IV. # Module 2 The second part i.e., system to help the ambulance/emergency service vehicle driver choose the most favorable route is realized by placing IR/speed sensors at strategic positions and infrared sensors to detect speed of vehicles, traffic intensity all connected by an ad-hoc network. The data is then processed and with analytics the most favorable route is calculated based on the ambulance/emergency service vehicle's current location obtained through GPS and shown to the driver as routes color-coded in order of time taken on his on-board device. The above setup shows the WSN nodes set at strategically located hoardings/traffic posts used to collect data that is sent to the host controller at the control room for further action. # Figure 1.2.2 : Establishing Network Connections The above setup shows the network patternvarious clusters of the WSN nodes, each member node is a place where sensors are fixed for calculating the speed. The data will be transmitted from all member nodes to the cluster node through wireless network established between them the cluster heads act as a common terminal connected to the WSN nodes via Ethernet connections which are connected to the central point at the control room. V. # Working a) Implementation the first module The working of the automated traffic control system for emergency services is such that, the vehicle at time of dispatch sends its unique id, location(junction id) and direction in the form of a code word from the ambulance to the system fixed at the traffic posts the microcontroller checks the unique id with the look up tables stored in the memory and checks the junction id when the data bits are matched the authorization is sanctioned and the traffic is cleared according to the direction in which the ambulance is stuck Using the data other vehicles on the road are affectively guided to make way for the emergency service vehicles by giving appropriate signals. Apart from this the ambulance/ emergency service vehicle drivers get a mapping of the most favorable routes on their LCD screens with driving instructions. Coming to the working of the encoding system, the module at the ambulance/emergency service vehicle sends a 16-bit codeword consisting of its unique id, junction id, direction value, parity bits as shown below, 16 bits i.e. 1 word This is implemented using acknowledgement based approach Ping1: first the unique ambulance id with the junction's unique code is transmitted through the rf tx under 433 mhz which is received by the rf rx and process the data bits accordingly and will give the acknowledgement. Depending upon the received acknowledgment the direction bits or the resending (pinging again) are sent to let the system know in which direction it has to clear the traffic or what functionality it has to perform. # Ambulance identification bits + junction + direction bits Identification bits Ack 1: The ack is based on the output of the processes data if suppose the bits are matched then the ack will be accepting The presence of an ambulance is first detected by the sensor/detector at the junction and communicates with the ambulance after the authorization is sanctioned the route will be cleared automatically without human operation. # b) Implementation of second module The WSN, IR sensors mounted on strategic locations such as this hoarding. This collection of data is through a network of clusters containing member nodes and a cluster head to which the data is sent shown in the fig1.2.2.The clusters are connected to a common host network at the control room. The internal and external connections are via Ethernet. As shown above Fig 2 .2.1 the WSN, IR sensor pairs are used to calculate speed of moving vehicles, frequency of moving vehicles etc. used to determine the most favorable path. # c) Speed Calculation The speed of moving vehicles is determined by dividing an average car length value by the time obtained from an IR sensor pair. Whenever the beam cuts the timer in the 8051microcontroller will start and value will be noted till the beam rejoins The speed of the vehicles moving on a road is found using sensors, the data taken from those sensors are moved to control point further computations are done on the data acquired to find an average value and is compared with the theoretical value stated in the table 3.1 and the relevant color-coding is given to that road in the maps which can be viewed in the LCD screen by the driver in the ambulance to choose the most favorable route The roads, colored in green and yellow are the routes that the ambulance has to choose and avoid the red colored routes VI. # Security Being a vital, heavily used system it has the potential to be manipulated/exploited/hacked by hackers and other anti-social elements. This problem is solved by using fool-proof secure protocols and cryptography while processing signals. A secure protocol consists of the encryption algorithm applied to conceal the message from attackers. The encryption cipher used in a protocol is very important such that even the data is stolen he may not find the patterns to use it. The cipher must be small size, consume less power and provide satisfactory level of security the Tiny Encryption Algorithm (TEA) seems to be optimal block ciphers notable for their simplicity of description and implementation typically a few lines of code and most suitable for implementation in tiny microcontrollers. We have implemented this using 8051 microcontroller which executes instructions in two clock cycles. It has 4 kB -erasable Flash code memory, 128byte RAM data memory, high-accuracy internal RC oscillator and several system-level functions just perfect for the requirements of low cost, and less power consuming device. When compiled, the cipher occupies 218 bytes of code Decipher needs 224 bytes of code and runs for little more than the encryption. The protocol itself is much secure it's hard penetrate or hack. Moreover, by using this tiny encryption algorithm (TEA), it adds greater benefit for the safety of the system and the whole process like data transmission and communication. # VII. # Conclusion This solution can be used to prevent greatly the interruption of ambulances and other emergency services, ensure in-time reach of emergency services and not to mention it could greatly improve the chances of survival of patients/victims thus preventing irrecoverable or collateral damages as is the case. This is highly effective when implemented in cities and urban areas. # VIII. # Summary This is a project with the aim to minimize the time taken by ambulances/VIP/emergency service vehicles in reaching their intended destinations, aiming to prevent deaths and collateral damage due to untimely arrival. A highly efficient, elegant and cost-effective system has been devised using various advanced, reliable, secure technologies as the solution for the problem discussed. 1![Figure 1.1 : 1Module in Ambulance/Emergency Service vehicleThe ambulance module uses one transceiver package say TX1-RX2433/836 MHz for sending and](image-2.png "Figure 1") 1![Figure 1.1.2 : Module at traffic signal post](image-3.png "Figure 1") 1![Figure 1.2.1 : Data is transmitted from all locations to the main System](image-4.png "Figure 1") ![The direction bits denote the compass directions of the ambulance, such as: 00-North direction 01-West direction 10-East direction 11-South direction The direction bits indicate in which road the ambulance has been stuck.](image-5.png "") 2![Figure 2.1.1 : An ambulance stuck in traffic The ambulance is stuck close to the junction as the vehicles in frontobstruct it due to lack of proper coordination or long traffic jams.](image-6.png "Figure 2") 2![Figure 2.1.2 : The ambulance signals the system to make the road available](image-7.png "Figure 2") 3![Figure 2.1.3 : The road is made available for the ambulance as per request Once the authorization is obtained, the path is cleared for the ambulance to move ahead.](image-8.png "Figure 2.1. 3 :") 2![Figure 2.2.1 : Infrared sensors fixed to find speed The system uses IR sensors, located at strategic locations such as traffic signal posts, hoardings etc. to sense the traffic movement.This collection of data is through a network of clusters containing member nodes and a cluster head to which the data is sent shown in the fig1.2.2.The clusters are connected to a common host network at the control room. The internal and external connections are via Ethernet.As shown above Fig 2.2.1 the WSN, IR sensor pairs are used to calculate speed of moving vehicles, frequency of moving vehicles etc. used to determine the most favorable path.](image-9.png "Figure 2") ![Speed = Avg. Car Length /Time spent by the vehicle b/w IR beams The table 3.1shows the theoretical values of traffic intensities and color-coding for routes based on speed of vehicles, traffic intensity. The theoretical values are calculated through statistical observations.](image-10.png "") 31![Figure 3.1: Display showing the various paths that may be taken The fig 3.1 above is a screen short of a area of the Vijay awadain the google maps which we have taken as an example to test. These are the maps that we generally get on our smart phones, laptops or a GPS systems.](image-11.png "Figure 3 . 1 :") 32![Figure 3.2 : The display showing paths with colors representing levels of traffic intensity In the above fig 3.2 is the similar fig 3.1 with an extra feature incorporated is that it indicates the traffic intensity representing what are the favorable paths for the ambulance to choose avoiding it to get captivated in the traffic.The roads, colored in green and yellow are the routes that the ambulance has to choose and avoid the red colored routes](image-12.png "Figure 3 . 2 :") 31 : Theoretical ValuesSPEED(KM)COLOR>60Green40-30Yellow<30Red © 2015 Global Journals Inc. (US) © 2015 Global Journals Inc. (US) 1 * The 8051 Microcontroller by Kenneth J Ayala 5. Embedded Systems Architecture, Programming and Design by Raj kamal