RescueAlert-an accident detection and rescue mechanism

Received Sep 8, 2020 Revised Dec 24, 2020 Accepted Jan 13, 2021 With the increase of vehicles and cars of different kind and the large movement that occurs every day on the roads it was natural to observe an increase in traffic accidents, but the real dilemma lies in how to make the rescue process efficient. The problem that we want to solve is the response of ambulances towards accidents and the lengthy registration process of patients in hospitals. In the above two scenarios, the manual process of calling the ambulance leads to delay in rescue of patients from an accident and the delay in registration of patient leads to delay in medication or treatment of the patient. We want to make the process more efficient by automating accident detection for increasing the efficiency of the ambulance rescue process and by sending the details of the patient before the patient reaches the hospitals for faster treatment of patients. Along with this, alert messages will be sent to the family or friends of the patients to notify them as soon as an accident is detected.


INTRODUCTION
With the increase in population and traffic over the years, everyone has vehicles, and everyone is in a rush to be at their journey's destination. The accidents in India single-handedly account to 6% of the world's road traffic accidents, which cannot be reduced, but the casualty rate can be reduced if there is an automated system which does most of the work before an injured person reaches the hospital. The objective of this project is to try to optimize the rescue mechanism as well as the patient registration process by implementing internet of things (IoT) on 4-wheeled vehicles. When and if any accident occurs, we hope to notify the nearest hospital, ambulances and the family of the patient through a web application as well as short messaging service (SMS). The life of a human being can suffer a drastic change in a matter of seconds and therefore we want to make the process more efficient and effective. The process of building the complete system from scratch helps us as students to understand how the correlation and collation of various technologies and different fields can be done to innovate and improve the current trend in the technology as well as to learn and research in the areas of interest to make and develop new algorithms and design systems that can help the needy. The aim of this idea is to analyze and understand various challenges that are faced by the people who drive in their day-to-day life and to effectively and efficiently use state of the art technologies and their combination to fulfil the needs and requirements of the people. We will discuss the process and working of each module and their connection along with the steps that we will be following to make sure that the results match the desired outputs using comparative analysis. In the following paragraphs, we have deduced potential outcomes from multiple research papers.
The authors in [1] have introduced an automatic ambulance rescue system (AARS). The idea behind this system is to control the route for ambulances to have a clear path to reach the hospital effortlessly. The sensor gets the location of the accident and the nearest ambulance reaches the site of the accident. The traffic lights within the trail of the ambulance are controlled for faster movement of the ambulance in traffic [2]. The ambulance is guided to a hospital by servers through a direct route. According to the paper [3], when an automobile encounters an accident, the vibration sensor detects the signal immediately and sends it to the microcontroller. The GPS module finds the location of the accident spot and sends an alert message including geographic location coordinates via the messaging module to ambulance [4]. This system also controls the traffic signals in the path of ambulance and helps the ambulance to reach the hospital in minimal time. The project [5], aims at finding the occurrence of any accident and reporting the location of accident to the nearest ambulance, so that instant help can be provided by the same ambulance. GSM technology is used to send the vehicle location in the form of latitude and longitude coordinates through internet. Sensors such as vibration sensors and airbags detect signals in case of an accident and send those signals to the microcontroller. The authors of [6] have introduced a system called intelligent traffic light system (ITLS). The main idea behind this system is to provide a smooth flow for the emergency vehicles like ambulance to reach the hospitals in time and thus reducing the interruption caused by traffic congestion. The ambulance is provided with a smaller shorter route to get to the hospital smoothly and safely by the control of traffic lights according to the position of the ambulance.
The model that the authors are presenting in [7] is an effort to deliver radical solutions to those problems that have been mentioned previously and to enable the access of ambulances to the accident site or the hospitals easily depending on three electronic circuits. The first circuit is situated in citizen's vehicles and its task is to notify the ambulances by sending a message that contains the location of the accident. The second and third circuit in the ambulance controls traffic signals on its way to either the site of the accident or to the hospital by RF communication. The authors in [8] implemented a solution where they overcome the drawback of traffic congestion for smooth flow of emergency vehicles. They use accelerometer sensors to sense vibrations and GPS to give location of the vehicle, so that dangerous driving is detected. If and when an accident takes place, the sensors send a message to the server. An alert message will be sent to the ambulances and emergency contacts. In the paper [9], the authors discuss the various ways to detect the occurrence of traffic accidents on roads supervised under surveillance cameras. They lead to the conclusion that accident detection is more efficient when the hardware and software is used together as compared to individual results. They also conclude that having hardware dependency results in issues while sending data because when an accident occurs, the hardware might get damaged and send faulty or null values. In [10] the authors have installed an accident detection device which sends SMS/messages to the family members, police station, ambulances and the nearest hospital. This system is used for tracking the position of the vehicle by GPS sensor [11]. The main modules in this paper are: i) Vehicle registration and preparation, ii) Commuters' registration (full name, blood type, phone number, email, medical history, date of birth and a reference phone number), iii) Tracking accidents through a web application. The solution provided by authors in [12] uses Smartphone integrated driving safety application in which the hardware is equipped inside the vehicle to detect the accidents and the software design uses Wi-Fi Direct technology for data transmission between vehicles.
The proposed system in [13] uses an android application on smartphones which is kept in a holder attached to the vehicle. The algorithm detects accidents based on three events: i) Collision detected according to a threshold reading mapped to an acceleration severity index, ii) Gyroscope and magnetometer sensors are used for detecting rollovers and iii) Airbag deployment indicate accidents. If any of these events is detected, an alert is sent through a decentralized environmental notification message, e-call to the Emergency medical system and also an SMS. In the proposed system [14], GSM is used in applications by monitoring the load from anywhere by sending a message. It uses accelerometer [15], piezo electric sensors and gyroscope sensor to detect accidents. They used an ARM 7 microprocessor which offers high performance and consumes less energy. In addition to accident detection, this system also allows transit tracking, field sales, asset tracking, fleet management and stolen vehicle recovery. The authors in [16] have proposed an automatic alert system for detection of accidents. As soon as the accident occurs, a vibration sensor detects the accident and a message is sent to the registered mobile number through the GSM module which is used to transfer messages to different devices in a system. GPS will then help in getting the exact location of the accident and notify the nearest hospitals. The main idea behind this paper [17] is the use of SONAR for the prevention of accidents. Five SONAR devices are placed at the blind corners of the vehicle. If the obstacle is present inside the range fixed, it would give an alarm and the driver will get notified. If the accident occurs, a sensor will send an interrupt to microcontroller which will enable the GSM module to send the exact position of the accident. This project [18] focuses on the medical assistance to be provided when an accident occurs especially for two wheelers as the rate of accidents for them is very high. The authors propose a way to use a heartbeat sensor to detect the user's body senses. As soon as the accident takes place, the accelerometer detects the accident [19], the heartbeat sensor attached to the user's body will check and understand the severity of the accident. The application on the phone sends an automatic message to the nearest hospital/medical center along with the exact location of the accident captured by the GPS. This project [20] recommends the system use a GSM and a GPS module attached to a microcontroller. As the accident takes place the vibration sensor senses needless shocks, tilts and locks the breaks immediately. GPS gets the exact location of the accident and the GSM helps to send the location along with a message to the members of family [21]. As proposed by the authors, this system can also be used to track stolen vehicles, travel luggage, fleet management and vehicular activity.
This solution [22] looks upon improving the accident detection using an alarm. A vibration sensor on detecting vibrations, sends a message to the control center team through GSM module. The GPS in the system gets the exact position of the accident which is also sent in the message [23]. The authors say that it's a less expensive and convenient way to detect accidents. This thesis [24], highpoints the features of the smartphones that are being used in accident detection and notification system. The smartphone detection system banks on the high speed of the vehicle. The main hindrance defined in this thesis is how to differentiate in a slow accident whether the person is inside or outside the vehicle, walking or running. There are two phases of this system: i) the detection phase where low or high-speed accident is detected, ii) the notification phase where the message is sent using GSM to the emergency responder along with the exact location coordinates found using the GPS. According to the authors of [25], a vibration sensor detects the accident and an RF transmitter attached to the microcontroller starts sending the signal. GPS gives the exact position of the accident [26]. The control rooms have a RF receiver attached to an LCD screen. As it receives a signal the message is displayed on the screen. Authors in [27] use accelerometer, vibration sensors and heartbeat sensors to track four cases of accidents mainly being, i) warning to avoid accidents, ii) determining when the car is at rest and the driver is present in the vehicle, iii) when the car is at rest without the driver present, and iv) when the car is moving.
After studying the referenced research papers, we were encouraged to implement an applicationbased system which focuses on optimizing the rescue mechanism by: i) Reducing the ambulance rescue time, ii) Implementing automatic patient registration and iii) Accurately getting the count of people met with the accident.

METHOD
The architecture shows us that the proposed solution makes use of two web servers namely, XAMPP (for sending sensor values from Arduino Mega to the MySQL database) and Apache Tomcat Server (to connect the web application with the MySQL database) as shown in Figure 1. The monitoring nodes are connected to the sensors which send values to the database via HTTP network. The user is at observer node in the local end. The database values are sent to the servers by CRUD operations for easy retrieval and analysis of the data. The processes and events that our proposed solution is able to handle and perform are:  To detect accidents that occur in real time.  Upload and store real time accident and user data in the database.  Notify the hospitals about the accidents and its location for speedy rescue mechanism.  Notify concerned relatives and friends about the accident as soon as the accident is detected.
The accidents will be detected using an accelerometer sensor. Network connection will be established using ESP8266 which will connect to the Wi-Fi. Location and notification will be sent by GPS and GSM modules respectively. Data will be uploaded on server using microcontroller and the Wi-Fi module. Patient details will be sent to the hospitals using database, web application and the server.

RESEARCH METHOD
 Hardware specifications: a) Arduino Mega: It is a microcontroller board based on ATmega2560 which is used to provide power to the sensors and send values through the internet using Esp8266 module. b) Esp8266 module: It is a Wi-Fi microchip which is used to connect the Arduino board to the internet. c) Logic level converter: It is used to safely step up/step down the voltage according to sensor needs. d) GPS module: Global Positioning System is a satellite-based system that uses satellites and ground stations to measure and compute its position on the Earth. The model in this proposal is Neo 6m. e) Accelerometer: An accelerometer is an electromechanical device that measures the rate of change of velocity of an object. The model employed in this proposal is ADXL345. f) RFID-RFID tags are small devices that utilize low power radio waves to receive, store and transmit data to nearby readers for tracking purposes. g) GSM Module: A GSM module is a chip or circuit that is used to establish communication between a mobile device and a computing machine. The model employed in this proposed system is SIM900A.  Software specifications: a) Arduino IDE: It is used to generate the code for the hardware module. It uses C and C++ language and its functions for the coding and these codes are uploaded to compatible microcontroller boards. b) Spring Tool Suite 4.0 (STS): It is an Eclipse based IDE which is a ready to use development environment which allows the user to implement, run, debug and deploy our web applications. c) MySQL: MySQL is an open-source relational database management system emphasizing extensibility and technical standards compliance. d) XAMPP Server: XAMPP is a free and open-source cross-platform web server solution stack package used to host webpages and web applications on the local server.

IMPLEMENTATION
Every user with this system must first register into the web application where the user will be asked to enter the unique ID that has been provided to them through the RFID cards. After successful registration, everyone entering the vehicle, including passengers, must scan their respective RFIDs so that number of people inside each car can be accurately detected as shown in Figure 2. Accelerometer is used for accident detection. If readings of sensor cross the threshold values set by the system, the accident detection mechanism gets triggered. An SMS will also be sent to the emergency contacts. The unique ID stored inside all the scanned RFIDs will be sent to the MySQL database. The details of all those users will be retrieved from the database where all the user details were previously stored at the time of user registration. These details will be displayed in the accident detection monitoring dashboard from where the hospitals can register the patient themselves without any requirement of manual paperwork and accurately get the count of people inside the vehicle.
On detection of accident on the dashboard, hospitals will also be able to send the ambulance at the required location by tracing the coordinates sent by the GPS module. Figure 3 shows the flow of the web application which asks the user to register themselves with all the necessary details and shows the hospitals the detected accidents along with the coordinates of the location where it has occurred. When the vehicle meets with an accident, the accelerometer measures the lateral velocity of the vehicle, compares it with the threshold value and triggers the rescue and alert mechanism. In this mechanism, GPS sensor sends the location of the vehicle in terms of latitude and longitude and GSM module sends the message notifying the hospital and the relatives about the accident. Circuit diagram for the described module is displayed in Figure 4.

RESULTS AND DISCUSSION
There are two parts of the web application. One is the user registration portal and the other part of the web application is the monitoring dashboard. Both functionalities were successfully created and tested. Figure 5 shows that part of the web application which will be used to detect and monitor the accidents that occur in real-time. Figure 6 is the GPS output, which gives the location coordinates to help the ambulance in locating the accident. All the details of the accidents that are detected by this system will be stored in the database. This helps in keeping the record of occurred accidents as history with the hospitals.
According to [28], every year, around 33% of the general road accidents and 99% of the cardiac arrest victims do not survive in India as compared to 2% and 70% respectively in the US. The prime reason stated for this was the quality of treatment provided by the ambulances and hospitals in the "Golden hour", which is the hour following the accident. Taking this information into account, we analysed a dataset taken from [29] and compared it with the proposed system to produce results: Figure 5. Web application-accident alerts Figure 6. GPS module output

Comparative analysis
In the existing system, response time is calculated by observing time taken to complete the following steps:  Delay in reporting the accident: The time taken for initial rescue by other commuters and bystanders=1-2 minutes  Call centre takes the information from the person reporting the accident: The time taken to report an accident and collect the location and severity information=1-2 minutes  Call centre directs the ambulance to the accident location: The time taken to find the nearest ambulance and provide the information=1 minute Note: The above calculated time is the ideal case of reporting an accident where minimum time is assumed.  Total time taken by the existing system (above mentioned three steps)=5 minutes  Time taken by proposed system=30 seconds to 1 minute (Since the three steps are automated)  Time optimized (proposed system)=Time (existing system)-Time (proposed system)=5-1=4 minutes Proposed system response time (PSRT)=Actual response time (ART)-Time optimized by our system as shown in Table 1. Percentage reduction=((ART-PSRT)/ART)*100 as shown in Figure 7. Other parameters that may catalyze time optimization:  Since the proposed system is able to identify the exact number of people met with the accident, the ambulance call centres or the hospitals will know the expected number of ambulances to be sent. This results in deployment of adequate number of ambulances and medical personnel at the site of accident.  If an accident occurs during non-peak hours (after midnight or early morning), the time taken for ambulance rescue in existing system is significantly more due to a smaller number of bystanders or commuters present to report an accident. In some of these cases, accidents are not even reported within first 20-30 minutes of the accident, resulting in a dangerous life or death situation for critical cases. Since the proposed system reports an accident automatically, the ambulance rescue call is made immediately without needing anyone to report the accident manually.  The time taken for completing the formalities for registering a patient is reduced since the details of the victims are already stored in the database.  Figure 7. Graph showing the comparison between existing system and the proposed system

CONCLUSION
The concept behind coming up with this multi-disciplinary solution is to integrate various fields together and understand the essentials of each in order to develop the required module. We have used components that make the solution efficient and economical. Code compaction has made the solution efficient by defining appropriate deliverables. We have used accelerometer, GPS module and GSM module as the sensors, Arduino Mega as the microcontroller and Esp8266 as the Wi-Fi connecting module. The combined result of all the sensors infused with the microcontroller declares whether an accident has taken place. There are two unique functionalities in our proposed system. First is the victim details that are being sent to the hospitals which will help in easing the patient registration process and optimize time even more. The second unique functionality in our proposed system is the retrieval of an important detail when an accident occurs and that is the number of people met with the accident. These details are sent to the hospital at the time of accident so that hospitals are able to provide rescue personnel and ambulances in adequate number. This way, the tracking of patients across the globe will get much more efficient and the rescue system will become more effective.