Smart Ambulances for IoT Based Accident Detection, Tracking and Response

: One of the main reasons for death among young people in the current era is based on road accidents. The goal of current research on accident detection systems is to shorten reporting times, increase accident detection accuracy and address them through our modern technology. Our primary goal is to recommend a system that can successfully aid in preventing any kind of accident and if such conditions exist, then how it detects and alerts the relevant authorities and people so that the problem can be handled and addressed swiftly. Automatic mechanisms for detecting traffic accidents must be put in place if assistance is to be given right away. The proposed system model Emergency Request Response and Management System (ERMS) takes the benefit of Vibration sensors (VC) and Accelerometers (AB) through the proposed phases namely AcciDet TracSys and AcciAddr TracSys. Wherein, the AcciDet TracSys helps in detection of the accident, explained in detail in this study and AcciAddr TracSys helps address the people met with an accident through technical ways that are explained in detail in this study, also tracing the location of smart ambulances. With the help of the global positioning system, the accident location is sent to the smart ambulance for timely arrival and is also tracked for further assistance through the internet. Finally, this information is communicated to the main contacts of the accident victim, so that they can reach the hospital on time. Our proposed work meets the need to assist the injured after an accident through the accident detection and addressing system, as just only notifying neighboring ambulances does not cater to the solution to the problem.


Introduction
According to the WHO's global status report, which includes data from around 180 countries, the number of people worldwide who die in traffic accidents has risen to 1.25 million per year, with low-income nations having the highest rates.The demand for vehicles has grown significantly as a result of the world population's rapid growth and thus, issues with traffic congestion and road accidents have also become worse.Because the lives of the general public are in danger and accidents result in slow reactions that increase the number of fatalities, an automatic accident detection system is necessary to address this issue.A collision involving any on-road vehicle, an obstruction, or a pedestrian might be viewed as a road crash.The amount of time it takes for an ambulance to get to the accident scene and then transport the patient to the hospital has a significant impact on the victim's chance of survival.Singh et al. (2021) intends to speed up the emergency response department's ability to learn about car accidents in Malaysia.The majority of times when a person is injured in a car accident, the damage is not serious and the sufferer can be saved; nevertheless, if the rescue teams are late, the damage becomes fatal.For the rescue teams to be able to act quickly to save the victim's life, the first objective is to locate the accident's location and convey that information to them as soon as possible.Internet of Things (IoT) based Advanced Transport Systems (ATS) are becoming more and more well-liked and are viewed as a potential option to increase traffic safety.Reducing the time, it takes to respond to an accident is one practical way to lessen traffic hazards and save priceless lives.To address this issue and reduce the response time following an accident, much study has been conducted.We suggest an internet-based Emergency Request Response and Management System (ERMS) to address the aforementioned issues as the main goal of the suggested system.Additionally discussed is the system's architecture.Using the built in sensors that collect the necessary data for detecting an accident lowers the overall system cost.Telegram is a smartphone application that is utilized.GPS technology is used to obtain the location data.The collected data is forwarded to the closest nodes for any additional processing that may be required.If an accident is found, the position of an ambulance is discovered and addressed immediately to provide aid to the victims.The flow of ERMS's system is discussed in Fig. 1.
The time it takes to respond to a disaster, whether it be natural or man-made, is one of the most crucial elements in lowering the number of fatalities.Given the seriousness of the problem, extensive research has been done to find a solution, leading to improvements in emergency anticipatory systems.Fog-based disaster management systems, cloud-based accident detection and disaster management systems, and smartphone-based disaster management systems are some new research topics in this area.Another research proposes a system to automatically turn on green traffic signals in an ambulance's path using an RF module.For the ambulance to timely arrive at the spot (Saxene, 2014).Given that the service is centralized, cloud-based accident detection and disaster management systems may encounter problems with latency and bandwidth (Tian et al., 2019).Smartphone-based accident detection can relieve general traffic and improve emergency personnel readiness (Thompson et al., 2010).Fog computing, which promises to have lower latency, enhance mobility, increase resilience, and be scalable, is a new idea that can help with these problems (Dar et al., 2019).Dhivya et al. (2018) proposes an IoT based ambulance traffic light signal controlling system.In addition, crash detection and management systems can be made accessible also simple to install in older automobiles by leveraging smartphone sensors (Thompson et al., 2010).In this study (Razali et al., 2021), the authors propose an Accident Detection and Classification (ADC) system for smartphones that, in addition to detecting accidents, also categorizes them as collisions.Table 1 describes the developments in research for accident detection and briefs about a suggested solution.
The literature review session helps us to understand the gap between the work that has been done so far by the researchers and our proposed work.Through the above study, we realize that researchers have found various ways of detecting accidents and intimation to the primary contacts through SMS and finding the accident spot through GPS only.But, the system i.e., ERMS proposed in this study accepts the call by the ambulance and acknowledges the primary contacts, and traces the smart ambulance to know the estimated time of the arrival of an ambulance to the spot.A detailed explanation is provided in the proposed methodology.This study suggests a fully automated, internet of things based (2020) detection and rescue system accident detection system.The data is transferred to the web server, instant SMS is sent to the victim's friends and the information is also sent to the appropriate authorities as soon as an incident occurs.A simulated road scenario has been created to assess the system's performance.The outcome of extensive system integration and testing show that the suggested system not only satisfies the research's stated objective but can also give the desired result in a relatively economical manner

Proposed Methodology
The methodology of the suggested system (ERMS) is described in this section.It is a sensor-based system that makes use of the benefits of gathering data from sensors to discover an accident.The technology eliminates the requirement for an external component and an onboard processing unit, hence decreasing system cost, by using the sensors that are easily available in the marketplace.The servers receive the information obtained by the accelerometer sensor, smoke sensor, tilt sensor, and flame sensor.

A. Architecture of the System
Figure 1, the suggested system is made up of five separate layers.The interface and devices are located at the top layer.Microcontrollers make up the second layer.The database is stored in the following layer and services are the exclusive focus of the fourth layer.The last layer is where the cloud resources are eventually made accessible.The information is gathered and shared with ambulances and primary contacts through Telegram, an Android app.

B. System Implementation
The two main components of the proposed system are crash detection and tracking and emergency response and tracking.A detailed explanation of these systems is discussed in the following sections.

Phase for Detecting Crashes
Identifying the incidence of an accident is the focus of the detection phase.VC, AB, Tilt, and flame sensors with GPS are used for this.Each sensor has thresholds that must be met to assess if an accident has occurred or not.The gravity force (a Grav-force value) is considered through the accelerometer and GPS.If this value is more than 4, an accident can be determined as per previous research.However, utilizing this value alone results in a large percentage of false positives.When measuring an accident, the vehicle's speed is also taken into account.According to previous research, a vehicle is deemed to be in an accident state if its speed period variation is more than 2.06 km/s and uses loss function with dynamic weights and Multi-Scale Feature Fusion (MSFF) to improve the performance of object detection for small objects (Saxene, 2014).The microphone can also be utilized to detect an unusual acoustic event, which increases the reliability of ERMS.The sound threshold is defined as a number greater than 14 dB.A microphone can be employed as a supplementary filter to increase the entire process's reliability.
The detecting phase procedure is described by a flowchart (Fig. 2) and through an algorithm.Before starting the journey, the application is launched by the vehicle's driver.A Unique Individual Identification (U_ID) number is used to identify each vehicle.The application keeps track of the sensor data as it is being acquired.When Grav-force values cross the threshold, an alarm is created for 10 sec and an accident is assumed to have happened unless it's manually switched off through the push button.False alarm information is recorded and kept in the database if the notification is canceled.The alert phase begins if the alert is not canceled.
Implementation of AcciDet_TracSys and flowchart for accident detection and Notification: 1. Start 2. Enable all the sensors 3. Initialize all the module connections with the controller 4. If the values recorded by the accelerometer are above the threshold and if tilt is also recorded, the accident has occurred and is detected 5. The current location of the accident is sent to the microcontroller unit through GPS 6. Buzzer is activated and waits for 10 sec 7. If the driver manually turns off the buzzer, then the buzzer goes back to the initial stage of detecting an accident by monitoring the accelerometer and tilt sensors 8.If else buzzer isn't turned off, then the accident has occurred and is confirmed 9.The camera turns on and captures the image inside the car and the location of the accident is shared with primary contacts and the nearest ambulance through telegram and a message through the GSM module 10.End

Phase for Addressing the Emergency Response and Tracking
Addressing the emergency response and notification is described by the flowchart (Fig. 3) and a range of sensors, including tilt, AC, and VB sensors, can be utilized to spot accidents.It is possible to program these sensors to read readings that are outside of the allowed range or values that indicate an accident has happened.The vehicle's chassis angle is measured by the tilt sensor, which assesses whether it is at a safe angle.To quantify vibration, shock, and tilt, an accelerometer is used (inclination).Any significant vibrations within the car are picked up by the vibration sensor.Finally, a gyroscope is a tool that uses gravity on Earth to help identify the orientation.The tilt detection of the tilt sensor is also used in this study and can help in finding the safest angle by keeping track of the vehicle's chassis angle.A notification can be sent by SMS, or Telegram after an accident has been detected.Whether Wi-Fi or GSM was utilized as the module will determine the answer.The information is shared only with one particular contact, as was the case with the prior study's Telegram notification proposal (Karmokar et al., 2020).As a result of this study, a telegram group will get the message.If there is a struggle with Wi-Fi coverage issues, this study also utilizes GSM modules and notifications can also be sent via SMS.
Implementation of AcciAddr_TracSys and flowchart for Addressing the emergency response: 1. Start 2. The ambulance receives the intimation of an accident with an image (the image helps analyze the number of people injured inside the car) 3. The ambulance accepts the call and shares its location with primary contacts and owners for tracking online 4. The ambulance reaches the accident location

Materials, Methods and Implementation
Emergency Request Response and Management System (ERMS) with Telegram and SMS notifications are the focus of this study design and development work.As soon as the accident is discovered, it will be started.The tilt-related sensor sends a signal to the MCU activating it.A push button is turned off if there's a false alarm.The GPS module, however, receives latitude and longitude readings from the GPS via MCU.In case, the push button isn't turned off within the allotted (10 sec) period, the location of the accident and notification are communicated through a telegram to the concerned people.The system will use SMS to convey the notification and accident location if there is no 3-4G service.This system has the benefit that the notification can be sent by GSM and also through Wi-Fi.Implementation of the system encompasses two stages: 1. Hardware, software, and integration 2. Evaluating the model  The NEO-6M GPS module is a capable full GPS receiver with an integrated 25  25  4 mm ceramic antenna that offers a powerful satellite search capability.The power and signal indicators let you keep an eye on the module's condition.When the main power source is unintentionally turned off, the module can still save the data because of the data backup battery.It offers a variety of features, including a full GPS module with an integrated active antenna and an embedded EEPROM to save configuration parameter data.Strong satellite search capacity is provided by the built-in ceramic active antenna.equipped with a data backup battery, power and signal warning LEDs, 3-5 V power supply; 9600 bps by default; RS232 TTL interface SIM900A-GSM-module The module provides GPRS/GSM technology for use in mobile sim-based communication.Users can send and receive SMS and mobile calls using the 900 and 1800 MHz frequency bands.The keypad and display interface enable the creation of specialized applications by the developers.Additionally, it has data mode and command mode.The developers can modify the default setting to meet their needs with the aid of command mode Raspberry Pi Even though Raspberry Pi is the size of a credit card, it functions like a standard computer at a reasonable cost.
It is feasible to use it as a cheap server to manage sporadic web or internal traffic.It is less expensive to group several Raspberry Pi together to function as a server than a traditional one Tilt sensor With an angular movement, tilt sensors generate a changing electrical signal.Within a constrained motion range, these sensors are utilized to measure tilt and slope.Because tilt sensors only provide a signal but inclinometers produce both a readout and a signal, the devices are occasionally referred to as inclinometers instead of tilt sensors.Because they are made up of movable proof mass plates that are mechanically suspended from a reference frame, solid-state MEMS are tiny sensors.Using this method, mechanical and electrical components are combined on a chip to create a system with tiny dimensions Accelerometer Here, it is utilized to identify accidents using a tilt sensor and then a GPS sensor will be used to pinpoint where the accident occurred.The accident site and notification will then be sent over telegram.If 4G/3G service fails during the accident, an SMS will be sent with the notification and accident location Flame sensor A receiver like electromagnetic radiation can be used to construct this sensor/detector utilizing an electronic circuit.This sensor uses an infrared flame flash technique, allowing it to pass through an ice, grease, or dust layer as well as water vapor.High photosensitivity, quick response times, ease of usage Sensitivity can be changed, the detection angle is 600 and the flame range is responsive.Accuracy can be modified.This sensor's operating voltage range is 3.3-5 V.The PCB is 3 by 1.6 cm and has analog voltage outputs and digital switch output indicators.The flame test can be engaged if the flame intensity is lighter within 0.8 m and it will increase distance detecting if the flame intensity is higher Camera When it comes to the dash cam's ability to record images, they have a wide-angle lens that covers the entire width of the road and its surroundings.Therefore, everything is recorded, both on or middle of the road.Dual lens dash cams are available and they can record the vehicle's interior which captures the image at the time of the accident and is also shared with the ambulance which helps analyze the number of injured people inside the smart car and an idea about the severity of an accident.In addition, the dash cameras have a GPS tracker that records the car's speed and precise location.This aids in the detection of accidents

Hardware, Software and Integration
Figure 4 explains the integration of all the above components discussed in Table 2 which helps to detect the accident and provide emergency requests and responses via IoT.
Softwares used in the accident detection ERMS are: The data are being sent to a server which further sends to a provided phone using telegram.
Raspberry Pi programming: The Raspberry Pi-OS is primarily used by the Raspberry Pi device and in this section, we describe the programming language that is used by the Raspberry Pi.Raspberry Pi-OS, primarily employs the Python programming language to carry out various tasks.
Python programming has many features to add to developing different types of AI/IoT-related projects.Built-in python IDE of Raspberry Pi enables the building and execution of various Python-based programs.It also supports other languages such as C, C++, Fortran, Java, and many others.
SQLite programming: The relational database management system SQLite is independent of the usual client-server architecture.The fact that this database system is integrated right into the software sets it apart from MySQL and MariaDB.It can run independently of a server.SQLite stores its SQL information in a file that is present alongside your software rather than relying on an external system.

Evaluating the Model
Table 3 shows the result analysis of the proposed system.Based on Table 3, the accident severity was determined.The created AcciDet_TracSys and AcciAddr_TracSys have been put to the test in six scenarios involving Grav-force values.If the Grav-force is less than the threshold.irrespective of the network, the tilt sensor will not activate and no intimation of the accident is shared.On the other hand, in the 2 G/3G service area, the tilt sensor will turn on if the Grav-force value overdoes the peak value.However, an SMS was used to send out the accident location and notification.In the meantime, if the Grav-force value in the 4G coverage area exceeds the peak value, the tilt sensor will activate and send the report of the accident site.

Results and Discussion
An accident is detected through Grav-forces and also through tilt and flame sensors.Figure 5a-b shows the tilt and flame detection which helps to understand the severity of an accident.Figure 5c shows that XYZ met with an accident and was notified about the accident occurrence to the nearest ambulance and was accepted by ambulance (ABC).Figure 5d shows the interface for showing the ambulance location and accident location.If the accident is minor and emergency assistance is not required.Figure 5e shows a push button that can be used to stop the auto system call for assistance.

Conclusion
To address the issue of the increasing proportion of fatalities owing to prolonged delays in responding to serious incidents, an internet of things-based accident detection, tracking, and addressing system, an alerting system involving telegram and SMS has been developed.AcciDet TracSys and AcciAddr TracSys can fill a gap found in a prior study where there was only accident detection but did not address the timely arrival of the ambulance and tracking it.Furthermore, the tested system's performance has been verified using a variety of Grav-forces and is capable of reducing the number of fatal incidents.In the future, this system can be enhanced by adding alert features for help services and building smart hospitals and smart ambulances that can follow the smart ambulances carrying patients and monitor them.Also, it can further be enhanced to understand and get the previous medical history of the patients so that the treatment can be planned well in advance.

Fig. 3 :
Fig. 3: Accident addressing the emergency response and notification

Fig. 4 :
Fig. 4: Design model of accident detection and Emergency Request response and Management System (ERMS) through IoT

Fig. 5 :
Fig. 5: (a) Tilt Detection; (b) Flame Detection; (c) Notifying the accident occurrence to the nearest ambulance and Acceptance; (d) Interface for showing the ambulance and the accident location; (e) Button pushed to show its a false alarm

Table 1 :
Accident detection through various approaches by other researchers ensuring safety and preventing loss of life by taking the proper actions at the correct moment.Additionally, it checks to see whether the driver is drowsy or unstable, which might result in pedal confusion, unintentional acceleration, or incorrect steering the wheel turns, which can cause a collision with another car or a concrete road barrier Chaudhary et al.Vehicle accident system (using 2021 Explains how a collision force is comparable to running into a brick (2021) GPS tracker and airbag ECU) wall at a 10-15 mph pace would look, can be used to trigger a sensor to inflate the bag.thereby facilitating the detection of accident Ijjina and Accident Detection from 2019 Since dashboard cameras and video surveillance systems are Sharma (2019) dashboard camera video devices that employ vision-based technologies, developed a video-based method to identify car accidents.With limitations on traffic surveillance cameras, a method based on the video from the dashboard, cameras would produce a solution independent of the position of the car Karmokar et al.A Novel IoT-based accident 2020

Table 2 :
Hardware components for accident detection Name of the component Description NEO-6M GPS module

Table 3 :
Predicting the severity of accident through Grav-forces