Traffic Congestion Detection and Alerting Ambulance using IoT

— Traffic congestion is a major issue in modern scenario. Congestion of roads is due to huge number of vehicles in use and also due to over population. This results in huge amount of accidents every day and this also increases imminent road violence which is above the average level. This system intends to implement a model which detects the traffic congestion on the road and intimate this information to the ambulance driver before 3-4 kms through mobile app to take another route. This system consists of Ultrasonic sensors which detects the traffic on the road at a particular side. The Ultrasonic sensor is used to detect the obstacles, that is, vehicles on the road and this helps to intimate the ambulance driver about traffic. So, when the ambulance is nearing the traffic lane alert message is sent to the ambulance driver’s mobile through android app.


INTRODUCTION
The Indian city managing system is a combination of many interdependent systems, in which traffic management plays a significant role. Moreover, it can be stated as one of the key aspects of the smart city. On the contrary, modern transport is failing to provide a smooth transportation system to the people. The excessive traffic jams affect people like delays in reaching the office or home, wastage of fuel, wear and tear on vehicles or even a road rage by the stressed and frustrated motorists. Nowadays, transportation systems are an essential part of human activities. But, transportation infrastructure in the urban areas is almost saturated due to the lack of land resources, a growing number of vehicles on the road, damages of the road due to increased potholes, pits, and so on. Because of this saturation, various traffic-related problems have erupted in the urban areas where people need to move very fast from one place to another. One of the major issues with the public transportation system in recent times is traffic congestion.
In general, traffic congestions are also associated with a few more traffic problems such as emergency vehicles like ambulance, fire engines get blocked. Precisely, the traffic congestion often blocks the path of the emergency vehicles which may prove fatal at times. Also, the number of deaths due to delay in the arrival of emergency vehicles have increased to a greater extent in recent times.
Emergency vehicles like Ambulance and Fire engines need to be on time to prevent loss of human life. Thus, helping an emergency vehicle to move out of traffic congestion is very much essential in the current traffic scenario. Therefore, intelligent traffic management has evolved as a compulsory requirement for proper civilization. Currently, smart and adaptable traffic control systems are being preferred over fixed time systems in most developing nations.
The problem of urban traffic congestion is spreading constantly. The increase in traffic is due to the growing population and number of vehicles. Due to an increase in population and the increased use of automobiles it has become a huge challenge for emergency vehicles like an ambulance to pass through in emergency situations. Therefore, 'Traffic Congestion Detection and Alerting Ambulance' system to detect traffic congestion on the road and alerting the ambulance in advance is being proposed to develop so that the ambulance can take an alternative route to reach the hospital.
II. LITERATURE SURVEY In [1], intelligent control system to pass emergency vehicles smoothly was proposed during which each emergency vehicle contains ZigBee transmitter module and therefore the ZigBee receiver implemented at the traffic junction. The buzzer is going to be switched ON when the vehicle is employed for emergency purpose. This may send the signal through the ZigBee transmitter to the ZigBee receiver. It'll make the traffic signal to vary to green. Once the ambulance passes through, the receiver not receives the ZigBee signal and therefore the traffic signal is turned to red.
In [2], a detection method for road traffic jam supported V2V communication is proposed. Firstly, a fuzzy controller is made supported vehicle speed and traffic density because the input and therefore the local congestion level because the output, which is employed to gauge the extent of local traffic jam. Then, the extent of local traffic jam of neighboring vehicles is collected supported V2V communication, and therefore the level of regional traffic jam is obtained supported the massive sub-sample hypothesis test. After the traffic jam information is obtained, it's timely sent to the concerned vehicles to maximize the effectiveness of traffic jam detection results. Traditional technologies like electronic information boards, FM radios and SMS cannot guarantee the efficient dissemination of congestion information, whereas Internet of Vehicles (IoVs') communication technology can effectively improve the congestion information transmission. [3] have proposed Traffic Density Detection and Signal Automation Using IOT. This technique consists of IR sensors which keeps track of the density of the traffic level at a specific side. Either side IR sensors are fixed at particular ranges then that it's ready to detect the density of every side simultaneously. This records the values and stores within the microprocessor. The sound sensor is employed to detect the noise pollution within the particular area and this also helps in identifying the emergency cases based upon the edge value which is fixed. So, if the sound crosses the edge limit then automatically emergency cases are detected then the signal gets altered and automatic accordingly. This technique identifies the traffic jam and removes it as per the density within the signal and also provides way for the emergency cases.
The main aim of the system proposed in [4] is to efficiently manage the traffic and to assist safe passage of emergency vehicles. The system consists of RFID reader which reads the RFID signals from the moving traffic. These signals are collected and transferred to the Arduino controller. The Arduino processes these signals then takes the required decisions for efficient control. The RFID signals are collected by the RFID reader which is placed at a particular distance from the signal. The collected signals are transmitted to the Arduino. Arduino calculates the density of the vehicles in each lane at the junction. Depending upon the density, the signal at the junction changes. Emergency vehicles are identified when an RFID signal of certain range is detected. The traffic server informs the Arduino at the junction if any emergency vehicle is coming through that route. The Arduino then matches this received information with the RFID signals it receives from the RFID reader. This confirms whether the vehicle is in emergency or not. Once confirmed, the lane for emergency vehicle is cleared by turning the green signal on. [5] have proposed the 'Intelligent control System for Smart Ambulance'. The main objective of this technique is to form it possible for the ambulance to succeed in a specific location without having it to prevent anywhere until the destination is reached. This paper proposes monitoring of traffic lights and its controlling by the driving force of the ambulance. Basic information of the patient is taken alongside the status of the patient like critical or non-critical. This information is further wont to send it to the hospital. Depending upon the emergency, the driving force sends the direction towards which it wants to travel. Depending upon the command, that specific signal is formed green to supply thanks to the ambulance and simultaneously the others are changed to red. Using this method, way is provided to the ambulance resulting it to succeed in the destination in minimum time.
The system discussed in [6] permits drivers to spot traffic jam and alter their routes accordingly, thus reducing the time period. This technique monitors, processes and stores large amounts of knowledge, which may detect traffic jam during a precise way by means of a series of algorithms that reduces localized vehicular emission by rerouting vehicles. To simulate and evaluate the proposed system, an enormous data cluster was developed supported Cassandra, which was utilized in tandem with the OMNeT++ discreet event network simulator, including the SUMO (Simulation of Urban Mobility) traffic simulator and therefore the Veins vehicular network framework. The results validate the efficiency of the traffic detection system and its positive impact in detecting, reporting and rerouting traffic when traffic events occur.
Traffic congestion are often managed effectively, if the numbers of vehicles that are to undergo a crowded junction are often pre-estimated in time. [7] have proposed a system that manages the traffic on local and centralized servers by exploiting the concepts of IoT and Intelligent Image Processing. In proposed system for Indian urban settings, the important time video data is acquired is firstly. Then, it's divided into frames, then after binary conversion and noise removal, blob detection is performed and eventually the count is estimated using the proposed vehicle counting method.
In [8], a thought was proposed for saving a patient's life during a faster way in emergencies. The proposed model will notify the traffic light system or authorities as an advance alert, so chances of clearance of road before arrival of ambulance is increased. Hence it reduces the time complexity and helps to supply faster transportation services for the ambulance. It uses Google map server API to detect the space between the ambulance and therefore the traffic light. Finally, complete content and organizational editing before formatting. Please take note of the following items when proofreading spelling and grammar: III. SYSTEM ARCHITECTURE Architectural design is the process of defining a collection of hardware and software components and their interfaces to establish the framework for the development of a computer system. There are two architectural design in the project: A. Architecture of Traffic Detection B. Architecture of Alerting Ambulance Figure 1 explains how traffic congestion is detected. The ultrasonic sensors are placed at 200m on the roadside. When the traffic light turns to red color the ultrasonic sensor starts emitting sound waves. If there is vehicle standing in front of it, the sound waves hit the vehicle and reflects back. This means that there is traffic congestion up to 200m. When the traffic is detected, the road id is sent to firebase.  Fig. 2 explains how the alert message is sent to the android app of an ambulance driver. The GPS Neo 6m is connected to the ESP8266 Wi-Fi module which is fixed in an ambulance. The coordinates from GPS Neo 6m of the moving ambulance are posted to the firebase database dynamically. The android app is developed is connected to the firebase database and used by the ambulance driver. The ambulance driver login to the app using his mobile number. He presses the emergency button when there is a patient inside the ambulance. When the ambulance is 2km away from the traffic zone, the android app receives an alert notification and the traffic zone is seen on the map available in the app.

A. Traffic Congestion Detection
As shown in Fig. 3 This is considered as one round. The next round again starts by turning lane 1 to green and other lanes signals to red. This process continues until the system is shut down manually.

B. Alerting Ambulance
In this module, GPS neo 6m is connected to ESP8266 which is fixed inside ambulance. When the traffic congestion is detected, the road id of traffic lane is sent to firebase database. The coordinates of the ambulance are sent to firebase database when it is moving if there is emergency. When the distance between the ambulance coordinates and coordinates of road id retrieved from firebase is 2km, the alert notification is sent to ambulance android app.

1) Ambulance Android App
The name of the android app developed which is used by the ambulance driver is Ambulance Alert. The app has two modules: a) Register: The user registers with the app by giving his full name and valid phone number. The details will be stored in firebase. Anybody can register with the app but only the phone number of ambulance driver is given access to login into the app. b) Login: The user enters valid phone number and clicks on the button to send verification code to the entered phone number. If the permission to the entered phone number is given by the admin, the OTP (One Time Password) is generated and sent which is then entered in verification code text box. If the entered OTP is correct, the verification process is successful and can be used by the ambulance driver. c) Emergency: After the login is successful, a screen with Emergency button is opened. If there is patient inside the ambulance or there is emergency, the ambulance driver clicks on that button. If there is traffic congestion in 2km radius of the ambulance, alert notification is sent to that mobile. On clicking the notification in notification bar, map is opened where it shows the red line on the traffic lane so that the ambulance driver would know about traffic congestion.
If the permission is not granted to the entered phone number, an alert message pops up saying "Not a valid user!". Until the admin grants permission to the phone number registered, it cannot be a valid user to use the app. If the entered phone number is not registered with the app for the first time, an alert message pops up saying "Not registered!".
V. RESULTS The android app is developed to show the traffic congestion in 2km radius of the ambulance. Map is displayed in the app which makes the user (ambulance driver) to have a better view of the traffic congestion. To demonstrate the working, a real time traffic junction is considered which is Jayanagar 3 rd block, Bangalore, India.

CONCLUSION
One of the major issues with the public transportation system in recent times is traffic congestion. The traffic congestion often blocks the path of the emergency vehicles which may prove fatal at times. Also, the number of deaths due to delay in the arrival of emergency vehicles have increased to a greater extent in recent times. Emergency vehicle Ambulance needs to be on time to prevent loss of human life. Thus, helping an emergency vehicle to move out of traffic congestion is very much essential in the current traffic scenario.
Traffic Congestion Detection and Alerting Ambulance system are developed to overcome the above problem. In this system, the traffic congestion detected in the traffic signal. If there is traffic congestion up to 200m or above in a particular lane, is detected and an ambulance is alerted before 2km from the traffic signal so that the ambulance driver takes alternative route to reach the hospital.
The android app is developed to show the traffic congestion in a 2km radius of the ambulance. The map is displayed in the app which makes the user (ambulance driver) have a better view of the traffic congestion.
In future enhancement, the alternative route can be shown to reach the nearby hospital avoiding the traffic signal. The app is developed for android users only. Hence, an iOS app can also be developed. The android app developed can be enhanced by associating with the hospitals. The hospital nearby to the ambulance can receive patient details and status of health condition so that the hospital would be ready to treat the patient by the time ambulance reach that hospital.