You are on page 1of 26

A Smart Drowsiness Alert, Accident Detection and

Prevention System for Vehicles


Submitted to:

Dr. Ramachandra Reddy,

School of Electronics Engineering, Vellore Institute of Technology, Vellore.

Submitted by:
Anishkaa Balasubramaniam
20BML0047

Lackesh Shanmugasundaram
20BML0044
.
Akshay Narendran
20BEC0150

Adhiraj Saxena
20BEC0298

Srishti Chopra
20BML0046
ABSTRACT
The increase in accidents due to several reasons such as intoxication, negligence about wearing
seatbelts, rash driving, and drowsiness is posing a huge threat to the well-being of society. The existing
prototypes deal with identifying one or a few of the factors leading to accidents. However, the proposed
system hopes to mitigate most of the issues by providing preventive as well as deductive measures and
by providing prompt access to emergency services. The Arduino Uno microcontroller, which functions
as an on-device intelligent service is the central unit of the system. The whole system can be divided
into two segments, the preventive segment and the deductive segment. The preventive segment of this
system first ascertains that the driver has not consumed alcohol using an MQ-3 gas sensor and has worn
a seatbelt using an optical IR encoder and then turns on the vehicle. An MPU6050
accelerometer/gyroscope detects rash driving, and a camera module is used to recognize if the driver is
drowsy and brings the vehicle to an appropriate stop. The deductive segment of this system includes a
load cell to detect when an accident has occurred due to sudden changes in velocity. The GPS Module
then retrieves the location of the accident, and an alert is sent to the emergency services using the GSM
Module. The objective of this project is to warrant the safety of both the drivers and passengers by
incorporating several measures to prevent an accident and also provide immediate access to medical
help if the accident occurred.
Keywords: Accident detection, intoxication, drowsiness, rash driving, emergency services,
accelerometer, GPS, GSM

INTRODUCTION
Every day, thousands of individuals worldwide pass away in motor vehicle accidents, about 1.3 million
individuals lose their lives annually worldwide, and a substantial number of 20 to 50 million people
experience non-lethal injuries, which can lead to disabilities.[1] According to the Ministry of Road
Transport and Highway Transport Research Wing of the Government of India, during the year 2021, a
total of 4,12,432 road accidents were reported across the country which claimed 1,53,972 lives and
injured 3,84,448 people. Adding onto this the WHO estimates that every 1 in 10 people killed by road
accidents is from India. “If only they had arrived at the hospital sooner” is a popular expression. In fact,
many of these lives can be spared if the necessary medical attention is given in a timely manner.

Road traffic Injuries (RTIs) also incur monetary loss. The cost of RTIs in India is estimated to be
between 2 to 3% of the GDP. [2] This high percentage means that the cost of RTIs results in very high
OOPs (Out of Pocket Payments) which could push families to the brink of financial catastrophe.
According to a report by the National Sample Survey (NSS) the average OOP expenditure for an RTI
related hospitalization case is about INR 23,491(USD $ 368.9) whereas other studies in different parts
of the country showed an OOP expenditure for RTIs in the range of USD $100 to USD $780.[2]
In addition to OOP expenditures, there is also indirect cost in terms of reduction in productivity due to
loss of work and after discharge costs which studies claim t=are 2.5 times the OOP amount incurred
during hospitalization.[2]

When an accident occurs, the ideal scenario for the victims of the accident would be ambulances
arriving onto the scene immediately and the patients being rushed to the hospital for treatment without
any delays, but this is far from reality. Accidents can happen on routes not commonly used or during
times of the day where road traffic is sparse thereby rendering the victim helpless as there arises the
possibility of no bystanders or passing cars available to notify emergency services. In contrast to this,
many accidents occur on highways on which vehicles pass by at high speeds and cannot stop to aid the
victim, or sometimes even ignore or fail to notify emergency services. Identifying the location of the
accident and the engagement of bystanders and passing vehicles to convey this information to
emergency services is a vital element in the time required to communicate the location and occurrence

2
of the accident to the relevant authorities. This gives rise to uncertainty on when, if at all the accident
will be reported in time to save the life of the victim.

This brings response time by emergency services to the forefront of issues that must be addressed to
prevent loss of life due to RTIs. Even a slight reduction in response time by medical services could be
the difference between life and death for the victim of an RTI and could significantly decrease the
percentage of fatalities and economic loss.

The design for the accident detection system proposed in this paper utilizes two microcontrollers that
are connected to various sensors along with a GPS and GSM module. The core working of the system
lies in the use of an IR optical encoder to detect whether the seat belt has been slotted into place and an
MQ-3 gas sensor to identify if the driver is drunk. In addition to this, the camera module of a physical
intermediary device (laptop) is used alongside a Driver drowsiness detection algorithm to detect if the
driver is falling asleep at the wheel and alert them awake using a buzzer. The WHO states that driving
under the influence of alcohol is a key risk factor for 27% of all RTIs and a Centre for Disease Control
(CDC) survey estimated that 1 in 25 adult drivers aged 18 or older reported having fallen asleep while
driving in the past 30 days. This threefold security measure could help prevent drivers under the
influence of alcohol and from operating vehicles, alert drowsy drivers awake and in the event of an
accident, provide more safety to the driver by requiring the seatbelt of the driver to be on at all times to
ensure full operation of the vehicle. Apart from preventative measures, the focus of this proposed system
is to detect collisions at degrees equivalent to that of road accidents via a load cell and the transmit the
longitude and latitude of the accident location which is retrieved by a GPS module and transmitted via
a GSM module as an SOS accident alert to a designated helpline number. The use of inexpensive
microcontrollers and sensors in this system make it ideal for wide scale production and adoption into
the automobile market.

The remainder of the paper is organized as follows: Section 2 lists the related and existing work
pertaining to our proposed work and highlights the possible scope of this work. Sections 3 outlines the
literature survey carried out and sections 4 and 5 discuss in detail the proposed methodology of our
work and the possible future scope of our work respectively. Section 6 outlines the Conclusions and
outcomes derived from our work.

LITERATURE SURVEY

In their paper [3] published in 2018, Naji Taaib Said Al Wadhahi et al. propose an accident detection
system that uses IR sensors and a crashing switch to detect accidents. The microcontroller then retrieves
the GPS location of the accident and sends the location to saved contacts using GSM. The system uses
an RF transceiver module that is capable of acting as both Transmitter and Receiver enabling
bidirectional communication.

S. Parameswaran et al. discuss the advantage of incorporating Bluetooth technology into the accident
detection system [4]. This assists in tracking the accident-causing vehicle when it proceeds without
stopping after the collision. An accelerometer is used to detect the sudden deceleration that occurs after
the accident has occurred and when the deceleration is greater than a threshold value, the data is sent to
the microcontroller via an ADC, and the location is shared with the rescue team. A switch has also been
added to stop the message from being sent if nobody is gravely injured by the accident.

Syedul Amin et al. [5] discuss the opportunities related to using the GPS sensor as a speed measurement
tool. Their prototype employs the HI-204III GPS sensor and the speed information is extracted by
counting the number of commas in the GPRMC sentence acquired. An SMS will also be initiated
containing the same information, to compensate for GPRS being unavailable in some locations in case

3
of accidents. The MCU also starts a voice call to the Alert Service Center, allowing the vehicle occupant
to describe the emergency scenario, if he is not in critical condition. The system also includes a Manual
Detection Switch, which enables the vehicle occupant to initiate an emergency on his own. The position
of the accident is automatically plotted on Google maps using the information from the interpreted
SMS/GPRS data.

In their paper [6] published in 2020, Rane et al. propose a comprehensive accident detection system
that includes an alcohol sensor, a pull-down resistor to indicate whether a seat belt has been worn and
an MPU6050 as an accident detection sensor. A mobile application that displays the status of alcohol
consumption, seatbelt status, and accelerometer axis values as well as current GPS location is developed
in the prototype.

Anitha Mary et al. [7] elaborates on using a “black box” or “event recorder” to store and analyze a
driver’s behavior and also the factors for an accident. The prototype is simulated using LabVIEW with
the central component being an ATmega16 controller that controls several sensors that include a Hall
effect sensor to capture the speed of the vehicle by counting Revolutions per minute (RPM) of the
wheel, an MQ3 sensor to detect alcohol consumption and a camera module to recognize drowsiness in
the driver. The project could be further extended where the GPS location of the vehicle is always
transmitted to the rental service so that tracking numerous vehicles is made easier.

Bharti Motwani discusses an IOT-based approach to accident detection in the paper titled “Wreck
Watch: Accident Detection” [8]. Speed, shock information, acceleration, position rotation, vibration,
and any other required information are all sent by sensors installed on vehicles. Human-wearable
sensors transmit data such as blood pressure, pulse rate, movement, and breath rate. Other sources send
images, videos, and traffic reports. The complex event processing technology is used to satisfy the
requirement of accident detection. CEP-based rescue engines will periodically check for the presence
of any unwanted event, evaluate its effects, and take the appropriate action such as contacting the
emergency contacts.

Rohilla et al. discuss a generic Arduino-based accident detection system in their paper [9] published in
2018. The individual components of the system are mounted on the front end of the vehicle. An
accelerometer is used to detect the occurrence of an accident by checking if the automobile is inclined
with the road at 0 or 180 degrees. The GPS Module is used to extract the exact location of the system
and GSM is used to provide two-way communication by using a SIM card to emergency facilities.

Pre and post-accident detection methods for the complete safety of vehicles have been discussed by
Vaishali et al. in their paper [10] published in 2020. The forward collision detection method employs
various sensors such as RADAR, LIDAR/LASER, or Camera to identify the vehicle's forward impact.
A Vehicular Ad hoc NETwork which uses RF modules attached to each car are in charge of sending
and getting messages between vehicles. The system employs GPS to detect deceleration, which can
lead to an accident. For the post-accident segment of the system, the paper discusses using an MPU6050
MEMs accelerometer, vibration sensor, and a piezoelectric sensor to detect the accident and to send the
current location of the vehicle using the GPS and share it with emergency services using the GSM
module.

In their paper [11] published in 2022, Prajwal et al. analyze the salient features of a combined module
of pre and post-accident detection and alert systems. The VANET network, which is used in the pre-
accident detection system, can also be used to determine the quickest and most efficient path for an
ambulance to take to the emergency site. Furthermore, the GPS/GSM modem used in the post-accident
system can benefit both parties because it can transmit information about the car's current position to
another vehicle. In the case of an accident, it notifies the server and rescue services of the location.

4
Rani et al. elaborates on the information necessary to be registered for the accident alert system to
function optimally [12]. The mobile application in the proposed system requires a one-time registration
for each passenger and the information is uploaded to the headquarters’ database. This system transmits
an automated message to all pre-installed phone numbers in the device. The GPS is used to determine
the exact location of the cars and GSM is used to send and receive messages informing contacts about
the mishap.

An eye-blinking system for vehicle accident prevention is explored in the paper [13] published by Patil
et al. in 2010. An Infrared emitter and detector are used to monitor the driver's eye and provide a
corresponding output based on the driver's eye blink rate. The microcontroller then uses the output
states of an Op-Amp to operate the buzzer. The sensor is embedded in a goggle that the driver will wear
while operating the vehicle.

Shetgaonkar et al. discuss a prototype [14] that incorporates flame and smoke detectors to ensure that
the vehicle is not under threat of fire accidents. The prototype also incorporates a knock or piezoelectric
sensor to detect accidents and uses GPS and GSM to notify pre-saved contacts. The paper also discusses
an extended application of the accident system, which is transport companies utilizing the tracking
features of this prototype to avail the real-time location and speed monitoring of their vehicles using a
mobile application.

In their paper published in 2020, Sampoornam et al. [15] explore the possibility of using the accident
detection system as a theft detection system using the GPS tracking feature. This system incorporates
an accelerometer, speed sensor, a tilt sensor and an eyelid sensor. If the tilt angle is unsafe, the severity
of the accident is measured, and information about the accident's seriousness is sent to emergency
contacts. GPS and GSM components are used to locate the vehicle's exact location, which is shared
with the ambulance and two family members of that individual. A mobile application is configured to
view the speed of the vehicle and the current GPS location of a vehicle in case of theft.

Rajesh kumar Thangavel et al. [16] proposed an accident detection and blackspot alert system that
makes use of a mobile application installed on an Android smartphone. The app is intended to track the
user's location using GPS and alert them when they approach a blackspot, which is a location with a
high accident rate, the mobile application then takes control of the vehicle's accelerometer and manages
the speed limit based on the zone. Google Maps API, Google Location API, Google Places API web
service, and Google Direction API were used to create the application. To store and retrieve blackspot
data, cloud computing is used

Asad Ali et al. discuss the implementation of The Automatic Smart Accident Detection (ASAD) [17]
system The system employs Mamdani fuzzy logic to calculate a collision index by evaluating force,
acceleration, rotation, and speed. The smartphone application, which serves as a decision support and
means of reaching out for assistance, is made up of a Bluetooth module, a fuzzy logic decision support,
and a response module that allows information to be shared with a third party. According to simulated
results, the ASAD system has a 98.67% accuracy rate. The system uses an accelerometer, gyroscope,
force sensor, signal conditioning and processing, and Bluetooth module. The paper concludes by
emphasising ASAD's potential as a detection and notification service.

M.H Mohamad et al. developed a system that integrates an alcohol sensor with a microcontroller, and
a prototype ignition system is built to act as an ignition starter for the vehicle's engine. [18] PIC
16F876A, an alcohol sensor circuit, an alarm system, an LCD display, and an ignition system comprise
the system. The MQ-3 alcohol sensor detects the presence of alcohol in human breath and has a
sensitivity that can detect small amounts of blood alcohol content (BAC). The ignition system is
designed to generate a spark at the spark plugs in order to enable or disable the vehicle's engine. The

5
PIC C Compiler allowed the user to write the desired instruction in C. The software generates
hexadecimal data for the PIC 16F876A, which is then loaded into the PIC16F876A using the PIC kit 2
Programmer which responds according three voltage output conditions, which correspond to BAC level
ranges for drunkenness levels.

In their paper published in 2018, Pankaj A Bhoite et al discuss a project that uses GSM and GPS
technologies to detect and report vehicle accidents. [19] The occurrence of an accident is detected by
sensors such as accelerometers, ultrasonic sensors, and limit switches, which send signals to a
microcontroller, which activates the airbag and automatically locks the brakes. The GPS module is used
to locate the accident, which is then sent to predefined numbers via the GSM modem. With minor
modifications, the system can also be used for traffic estimation and accident surveys.

Dheeraj Khandelwal et al. [20] has suggested a system to detect abrupt vibrations caused by an accident,
using an in-built vibration sensor in the airbag electronic control unit. The system consists of a GPS
receiver, a microcontroller, a vibration sensor, an optional buzzer and a GSM modem that allows the
vehicle to be monitored and, in the event of an accident, can immediately notify emergency services.
Furthermore, the authors propose a broad range of future developments in this field, such as expanding
the system to include a high population density warning system for areas such as schools, colleges, and
so on.

Mohan Kumar J et al. [21] designed a system to address concerns about road safety by preventing
accidents caused by drowsy or reckless drivers. The system includes a camera to monitor the driver's
condition and detect drowsiness, an alcohol sensor to detect intoxication, a proximity sensor to detect
tailgating, and an EMF sensor to detect phone use while driving. The system also checks to see if the
driver has secured their seatbelt. Its goal is to improve overall road safety by reporting dangerous driving
to the nearest control room.

Mubashir Murshed et al. describe the creation of a smart Internet of Things-based system to reduce car
accidents caused by driver inattention and uncontrolled speed. [22] The system monitors the distance
between vehicles and obstacles using components such as a Raspberry Pi, ultrasonic sensor, LED,
buzzer, and a servo motor and alerts the driver via an interface. If the driver does not respond to the
alerts and the distance becomes critical, the system will apply brakes or change gears using a servo
motor to slow down. If an accident occurs, the system will notify the appropriate authorities via email.

In their paper published in 2021, Chaudhary et al. proposed a sensor network that includes gyroscopes
and accelerometers to identify accidents and avoid false positives by incorporating data from sound
level metres and airbag sensors [23]The location of the accident is transmitted to emergency responders
via a GPS module and GSM modem, allowing them to monitor the victim's whereabouts on a Google
Maps-enabled device and provide quick rescue and emergency assistance. A web application is
developed to handle data from multiple locations, and responders are provided with access to a short
message service.

Faiz et al in their paper published in 2015, explore the possibility of an application-based accident
detection system [24] which detects accidents only when the vehicle's speed dropped quickly and when
the pressure rate or tilt angle change surpassed a predefined threshold value while the vehicle's speed
was less than one-third. When an accident was detected, the application enabled Bluetooth to receive
pressure sensor data and instantly sent an alert message to a pre-set number. The GPS was used to
calculate the speed, which was then presented on the screen. By pressing the 'Cancel' button, the user
could cancel the alert and prevent an emergency message from being sent.

6
The suggested system proposed by Nasr et al uses Near Field Communication (NFC) or Bluetooth Low
Energy (BLE) to transmit the passenger's ID and vehicle's ID to the headquarters' database. [25] The
system creates a link between the pre-registered personal information and the ID of the passengers and
the driver using the unique NFC card is tapped on the vehicle. In the case of an accident, the airbag or
shock detection mechanism activates the shock sensor, causing an HTTP request to be sent to the server
informing it of the accident's occurrence and location using GPS. The server can recognise passengers
in danger and instantly dispatch a rescue team with suitable medical support thanks to prior passenger
recognition.

Wakure et al. explore the possibility of using flex sensors and camera modules to improve the existing
system. [26] The flex sensor adjusts its resistance in response to the degree of bending caused by an
accident followed by the system using a GPS module to identify the accident's coordinates (latitude,
longitude, and altitude) and using a GSM module to the closest hospital for emergency medical
assistance. In addition, a camera inside the vehicle is activated, and a live transmission of the scenario
is broadcast which allows for a more exact assessment of the severity of the accident.

The methodology proposed by Khalil et al. in 2017 calls for the use of two ultrasonic sensor modules.
[27] The first ultrasonic sensor module is placed on the windscreen to measure the distance between
the sensor and the car's front bumper. The second ultrasonic sensor module is installed on the backside
of the roof to measure the distance between the back roof and the vehicle's back bumper. When a vehicle
or an obstacle collides with the car within a predetermined distance, the system is immediately activated,
determining the precise position of the car using the GPS module and transferring pertinent information
to the emergency department via the GSM module.

The goal of Sharma et al's 2019 research is to improve on the shortcomings of current accident detection
systems by integrating [28] vehicle acceleration, retardation, crash impact, heart rate, and accident
precise location and using GSM communication to notify emergency services in case of an accident
The system is implemented using an IoT-based vehicle that is embedded with an Arduino development
board, interfaced with various sensors, and controlled via Bluetooth module HC05. The research
emphasises the significance of the heart rate sensor, which monitors the driver's heartbeats during the
drive and provides valuable information about the driver's physical condition.

Prabha et al. explore the advantages of using EEPROM to store emergency contacts in their paper [29]
published in 2014. They propose a system that uses ARM7 TDMI, a high-performance, low-power
consumption microprocessor that could provide high instruction throughput and impressive real-time
interrupt cost-effectively as it is based on Reduced Instruction Set Computer (RISC) architecture. The
piezoelectric sensor is used to detect accidents and 24C04 EEPROM is used to store mobile numbers
entered by the user to receive the accident alert message. Data stored in the EEPROM will be retained
even if the power is off for an extended period and ensures that the contacts are accessible in case of
power disconnection.

7
Singh et al. discuss the development of a Vehicle Accident Detection System [30] to improve
emergency response departments' response time to vehicle accidents. The system employs a vibration
sensor to determine the impact of an accident and a gyro sensor to determine the vehicle's x-y
displacement. When an accident occurs, the GPS module records the vehicle's instantaneous
coordinates, which are then transmitted to the emergency response department via a GSM module. The
flowchart of the problem-solving stages, as well as the design and testing of the CPB (Control Panel
Box) that houses the electronic components of the VADS, are also described in the article. The CPB
was built to be watertight, fireproof, and shockproof, with insulating materials and a sponge to absorb
shocks. The article concludes that vehicle manufacturers in Malaysia can incorporate the VADS
prototype to improve vehicle safety features and ensure the reliability of the vehicle accident detection
and reporting system.

PROPOSED METHODOLOGY

8
Fig 1. Flowchart of the proposed methodology
Accident prevention and detection System:
The accident prevention and detection system consists of an array of sensors including the MQ-3 alcohol
gas sensor, MPU-6050 acceleration detector, a 1kg load cell connected to a hx711 load cell amplifier,
an IR optical encoder for seatbelt detection which are connected to the Arduino Mega microcontroller
which is powered using a 12V adapter via an I/O shield extender. The camera module of the physical
intermediary device is connected directly from the USB-A port of the intermediary device to the USB-
B port on the Arduino Mega microcontroller by a type A to type B USB connecting wire.
The first stage of accident prevention involves authentication by the MQ-3 alcohol sensor followed by
the IR optical encoder. The system awaits input from the user/driver for alcoholic breath. If alcohol is
not detected by the MQ-3 gas sensor it outputs a digital Low signal, then the Arduino Mega
microcontroller processes this low signal and writes the message ‘No alcohol detected’ onto the LCD
and awaits input from the IR optical encoder to check for the seatbelt connection. If the seatbelt is
moved into place and the IR signal is blocked by the seat belt, then the IR optical encoder produces
digital High status. This HIGH signal is processed by the Arduino mega microcontroller to produce an
output on the LCD as ‘Seatbelt detected’ followed by ‘Good Start - Safe Journey’. Only if alcohol is
not detected and the seatbelt is properly in place will the LCD display ‘Good Start – Safe Journey’

9
indicating the ignition of the engine. This two-step authentication takes into consideration two of the
most important parameters for any driver to be able to operate a motor vehicle.
Drowsiness detection with OpenCV which is a common computer vision application that detects
drowsiness while driving is implemented here. The camera of the physical intermediary device captures
a live video stream of the driver's face, which is then analysed by a machine learning algorithm which
determines if the driver is showing signs of drowsiness which is measured here using the amount of
time the camera detects that driver’s eyes have been closed. The application works by setting two
counters; one for ‘eyes open’ and one for ‘eyes closed’. When the counter for eyes closed surpasses a
threshold given, this gives a clear indication that the driver is falling asleep. A loud monotone buzzer
of high pitch turns on and immediately alerts the driver awake and a message ‘Driver Drowsiness
Detected’ is written onto the LCD display.
Based on eye movement, the driver drowsiness algorithm detects drowsiness. It captures the video feed
from a webcam and employs Haar cascades to detect the driver's face and eyes. The system then
employs a custom convolutional neural network (CNN) model that has been trained to determine
whether the eyes are open or closed. The algorithm determines whether the driver is drowsy based on
the number of frames in which the eyes are closed and sounds an alarm to alert them.
The following libraries were used in the implemented driver drowsiness detection algorithm:
‘cv2’: OpenCV is used to capture the video feed, preprocess the frames, and detect the driver's face and
eyes using Haar cascades.
‘os’: The operating system library is used to access the current working directory and save images.
‘Keras’: Keras is used to load the CNN model that was trained to determine whether the eyes are open
or closed.
‘numpy’: NumPy is used to reshape the CNN model's input.
‘pygame’: The alarm sound is played using pygame.
‘time’: Time is used to control the alarm's timing.
‘Serial’ : used to communicate with the Arduino in order to turn on the buzzer.
The algorithm first loads the Haar cascades for detection of the face, left eye, and right eye. It sets up
variables to count the number of frames with the eyes closed, the score, and the thickness of the border
around the video feed. The code enters an infinite loop, reading frames from the webcam, preprocessing
them, and detecting the driver's face and eyes using Haar cascades.
The algorithm then extracts the region of interest (ROI) for each detected eye, resizes it to 24x24 pixels,
and normalises it. After reshaping the input to have a third dimension of 1, the CNN model is used to
predict whether the eyes are open or closed. The label ‘Open’ or ‘Closed’ is assigned based on the
prediction's ‘argmax’. ‘argmax’ is a NumPy function that returns the indices of the maximum values
along an axis. ‘argmax’ returns the index of the maximum predicted value in the predict function's
output. Because the model output is a one-hot encoded vector with two elements (open and closed eye),
argmax returns the index of the maximum value, indicating the predicted class (open or closed). The
score is increased if both eyes are open. Otherwise, the score is lowered.
If the score exceeds a certain threshold (15 in this case), the algorithm determines that the driver is
drowsy and issues an alert. It also saves the current frame to an image file and thickens the border
around the video feed. The algorithm keeps displaying the video feed until the user presses the 'q' key
to exit.

10
The serial communication protocol, which allows two devices to exchange data over a physical
connection such as a USB cable, is used to send data from the driver drowsiness algorithm on Python
to the Arduino Mega microcontroller. In this case, the Python script sends data to the Arduino Mega
microcontroller via the USB connection, which receives and processes the data and writes the message
‘Drowsiness Detected’ when the set threshold is exceeded.
Once the engine has started after the authentication procedure, the MPU sensor which in practice will
be fitted into the steering wheel of the vehicle will be used to determine if the driver was driving rashly
based on if the set threshold for acceleration of 17000 was exceeded by the magnitude of overall
acceleration of the MPU-6050 sensor. The acceleration was determined based on the following
equation:

𝐴 = √(𝑎𝑐𝑐𝑒𝑙𝑋 2 + 𝑎𝑐𝑐𝑒𝑙𝑌 2 + 𝑎𝑐𝑐𝑒𝑙𝑍 2 )


which obtains the square root of the sum of the squares of the 3 axes of acceleration obtained by the
MPU-6050 sensor. The equation calculates the magnitude of the acceleration vector, which represents
the overall acceleration of the object, regardless of its direction. The resulting value of the magnitude
variable will be in the same unit as the input variables accelX, accelY, and accelZ, typically in m/s^2
or g (where 1 g = 9.8 m/s2)
If the magnitude of overall acceleration exceeds that of the threshold value set, then the Arduino Mega
microcontroller writes the message ‘Rash Driving Detected’.
The accident detection part of the system consists of a load cell connected to the Arduino Mega
microcontroller via the hk711 load cell amplifier. When an accident occurs, the load cell undergoes
axial strain causing it to deform. The degree of deformation is based on the severity of the accident (i.e.,
the force transferred to the load cell upon the collision taking place) and the energy transferred to the
load cell and the deformation of the load cell is given by the respective equations:
1
𝐸 = . 𝑚. 𝑣 2
2
● E is the kinetic energy, measured in joules (J)
● m is the mass of the object, measured in kilograms (kg)
● v is the velocity (speed), measured in meters per second (m/s)
𝛿 = 𝑃. 𝐿 /𝐴. 𝐸

● δ is the deformation (or strain) of the load cell, measured in meters (m) or millimetres (mm)
● P is the applied force or load on the load cell, measured in newtons (N) or pounds (lb)
● L is the length of the load cell, measured in meters (m) or inches (in)
● A is the cross-sectional area of the load cell, measured in square meters (m2) or square inches
(in2)
● E is the elastic modulus of the material the load cell is made of, measured in pascals (Pa) or
pounds per square inch (psi)

The change in resistance of the load cell due to the instantaneous force applied on it during collision
changes the resistance through the load cell and, this causes an unbalanced voltage output from the
Wheatstone bridge. This voltage is amplified by the hk711 load cell amplifier and fed into the Arduino
Mega microcontroller. This prototype uses a load cell that is 1kg in weight. If a force that is greater than
the equivalent force of 400 grams deforms the load cell, then the threshold set is exceeded, and the
Arduino Mega microcontroller writes the message ‘Accident Detected’ followed by the message

11
‘Sending SOS’ on the LCD while simultaneously sending a HIGH output signal to the Arduino Uno
microcontroller.
Communication system:
The communication system in the accident detection circuit comprises an Arduino Uno microcontroller
connected to a GPS and GSM module. The Arduino Uno receives signals from the Arduino Mega
microcontroller of the accident detection system and then uses that information to decide on when to
retrieve and send the GPS location via the GSM module. The 12V adapter that supplies the Arduino
Mega microcontroller branches off using parallel connectors and powers the GSM module. The Arduino
Uno microcontroller is powered by a voltage of 5V from the 5V pin of the Arduino Mega to the Vin
pin of the Arduino Uno microcontroller.
The NEO-6M module outputs data in the standard NMEA (National Marine Electronics
Association)format, consisting of serial data streams. The data output provides accurate positioning,
altitude, and time, and can easily be read by the Arduino microcontroller. The NEO-6M module
operates on a voltage range of 3.3V to 5V and consumes approximately 30mA of current, which helps
to conserve battery life. It is an ideal GPS module to use for navigation and geolocation.

The SIM900A GSM/GPRS module is used here for communication between the Arduino Uno
microcontroller and a cellular network. The AT command +CMGF (command name in text: Message
Format) is used to select the operating mode of the GSM/GPRS modem or mobile phone. It takes one
parameter. The value of the parameter can either be 0 or 1. The SMS specification has defined two
modes in which a GSM/GPRS modem or mobile phone can operate. The values 0 and 1 refer to SMS
PDU (Protocol Data Unit) mode and SMS text mode respectively. SMS PDU mode is the default mode
if it is implemented on a mobile device. Here, the SMS text mode is used and hence operating mode 1
is selected. In data mode, the GSM is used to establish a GPRS data connection to the internet. This
allows the Arduino microcontroller to send and receive data over the cellular network.
The Arduino Uno microcontroller acts as a bridge, connecting the GPS and GSM module which is the
Communication portion of the circuit to the ‘Accident Detection’ portion of the circuit whose actions
are processed by the Arduino Mega microcontroller. When the 7th digital pin of the Arduino Uno
microcontroller receives a digital High signal from the 34th digital pin from the I/O shield extender of
the Arduino Mega microcontroller, arising from the condition that the force detected by the load cell
surpasses the set threshold, the Arduino Uno triggers the GSM module to retrieve the latitude and
longitude coordinates from the GPS and then sends an accident alert message along with the retrieved
GPS location to a designated phone number.

HARDWARE DESCRIPTION

12
s.no Sensor Model Specifications

1 Microcontroller Arduino UNO ● Microcontroller: ATmega328P


R3 ● Operating Voltage: 5V
● Input Voltage (recommended): 7-12V
● Input Voltage (limits): 6-20V
● Digital I/O Pins: 14 (of which 6 provide PWM
output)
● Analog Input Pins: 6
● DC Current per I/O Pin: 20 mA
● DC Current for 3.3V Pin: 50 mA
● Flash Memory: 32 KB (ATmega328P) of which 0.5
KB used by bootloader
● SRAM: 2 KB (ATmega328P)
● EEPROM: 1 KB (ATmega328P)
● Clock Speed: 16 MHz
● USB Connector: Type B
● Power Jack: 2.1 mm center-positive
● ICSP Header: 6-pin
● Reset Button: push-button

● Microcontroller: ATmega2560
2 Microcontroller Arduino Mega ● Operating Voltage: 5V
2560 Rev3 ● Input Voltage (recommended): 7-12V
● Input Voltage (limits): 6-20V
● Digital I/O Pins: 54 (of which 14 provide PWM
output)
● Analog Input Pins: 16
● DC Current per I/O Pin: 20 mA
● DC Current for 3.3V Pin: 50 mA
● DC Current for 5V Pin: 800 mA
● Flash Memory: 256 KB of which 8 KB is used by the
bootloader
● SRAM: 8 KB
● EEPROM: 4 KB
● Clock Speed: 16 MHz

13
● Output Signal: Two-phase quadrature output (A, B)
3 Rotary Encoder Correlation ● Resolution: Typically 100-1000 pulses per revolution
Photoelectric (PPR)
Infrared Count ● Operating Voltage: 5-24 VDC
Slot Sensor ● Maximum Current: 80 mA
● Maximum Speed: 6000 RPM
● Operating Temperature: -20°C to +85°C
● Shaft Diameter: 6mm
● Housing Material: Plastic
● Protection Level: IP40 to IP65
● Connection Type: Cable or connector

4 Gas sensor MQ3 ● Sensing element: SnO2 (Tin Dioxide)


● Operating voltage: 5V DC
● Power consumption: < 900mW
● Load resistance: Adjustable between 1K to 10K ohm)
● Heating resistance: 31 ohm +/- 3 ohm at room
temperature
● Sensitivity: 0.4 mg/L to 4 mg/L for alcohol, 0.1 mg/L
to 1.0 mg/L for propane, and 0.2 mg/L to 3.0 mg/L
for methane)
● Response time: < 10 seconds
● Recovery time: < 30 seconds
● Operating temperature: -10°C to 50°C

5 Single Point Load ● Rated capacity:1kg


Cell ● Sensitivity: 1mV/V
● Accuracy: +/- 0.02% of the rated capacity
● Non-linearity: +/- 0.02% of the rated capacity
● Hysteresis: +/- 0.02% of the rated capacity
● Creep: <0.03% of the rated capacity over 30 minutes
● Zero balance: +/- 1% of the rated capacity
● Temperature range: -10°C to 50°C
● Overload capacity: 150% to 200% of the rated
capacity
● Construction: aluminum alloy

● Operating Voltage: 2.7V to 5V


6 Load Cell Amplifier HX711 ● Input Channels: 2 (A and B)
● Input Impedance: >1 GΩ

14
● Gain Settings: 128 and 64 (programmable)
● Output Data Rate: 10-80 SPS (programmable)
● Resolution: 24-bit ADC
● Input Signal Range: ±20 mV to ±40 mV
● Operating Temperature: -40°C to +85°C
● Interface: Serial (2-wire or 3-wire)
● On-board Features: Low noise PGA, power-down
mode, offset and gain calibration
● Applications: Weighing scales, load cells, force
sensors, pressure sensors, etc.

● Gyroscope Range: ±250, ±500, ±1000, ±2000 degrees


7 Accelerometer/Gyro MPU6050 per second (dps) (programmable)
scope ● Accelerometer Range: ±2g, ±4g, ±8g, ±16g
(programmable)
● Digital Motion Processor (DMP): On-board
processing of motion and gesture recognition
algorithms
● Communication Interface: I2C (up to 400 kHz)
● Operating Voltage: 2.375V to 3.46V
● Current Consumption: 3.6 mA (active mode), 40 µA
(low power mode)
● Resolution: 16-bit ADCs for both gyroscope and
accelerometer
● On-board Features: Temperature sensor, digital low-
pass filter, programmable interrupts, self-test
functions
● Size: 4 mm x 4 mm x 0.9 mm

● Frequency Bands: 850/900/1800/1900 MHz


8 GSM SIM900A ● Data Transfer: GPRS Class 10 (up to 85.6 kbps)
● Voice Call Support: Yes (via external circuitry)
● SMS Support: Yes
● Interfaces: UART, USB, ADC, GPIO, SPI, I2C
● Operating Voltage: 3.4V to 4.5V
● Power Consumption: 1.5 W (typical)
● Operating Temperature: -40°C to +85°C
● SIM Card Interface: 1.8V/3V
● Size: 24 mm x 24 mm x 3 mm
● Features: TCP/IP stack, FTP/HTTP/SMTP protocols,
SSL/TLS security, audio jack support, AT command
set

15
● Frequency Bands: L1 1575.42 MHz
9 GPS NEO-6M ● Sensitivity: -162 dBm (tracking), -148 dBm
(acquisition)
● Update Rate: up to 5 Hz
● Positioning Accuracy: <2.5 meters (autonomous),
<0.1 meter (SBAS)
● Velocity Accuracy: 0.1 m/s
● Cold Start Time: 26 seconds (typical)
● Warm Start Time: 1 second (typical)
● Hot Start Time: <1 second (typical)
● Operating Voltage: 3.3V to 5V
● Power Consumption: 20 mA (tracking), 30 mA
(acquisition), 5 µA (standby)
● Operating Temperature: -40°C to +85°C
● Antenna Type: Active or passive (not included)
● Interface: UART (up to 115200 bps)

Arduino Mega ● 54 digital I/O ports (48 servo ports) and power
10 I/O Expansion I/O Sensor supply
Shield ● 16 analog I/O ports and power supply
Expansion
● 1 digital port binding post
Shield
● Auto switch of external power and on-board
power
● ISP download port

16
RESULTS AND DISCUSSION
The hardware implementation of the proposed system and the explanation for each step are
elaborated in this section.

Fig. 2. The hardware setup of the proposed system

The first message displayed on the LCD instructs the driver to wear the seatbelt. This is the first
preventive measure of the system which prevents the vehicle from starting if unfulfilled.

(a)
(b)
Fig. 3. Message on the LCD when (a) the seatbelt is not inserted. (b) when the seatbelt is inserted.

17
When the seatbelt is inserted securely the LCD displays a welcome message. If the seatbelt is removed
during any part of the journey, the vehicle slows down and comes to a stop, enforcing the need for the
seat belt to be worn at all times.
The second preventive measure that the system enforces is the alcohol detection. The MQ-3 sensor
detects if the driver is intoxicated by sensing if alcoholic vapours are present in the breadth above the
threshold and displays a warning when the person is intoxicated.

Table 1. Test cases for MQ-3 sensor

Fig. 4. Message displayed on the LCD when perfume is sprayed around the MQ-3 sensor to
simulate alcoholic breath.
The third measure of caution is rash-driving prevention. THe MPU6050 accelerometer/ gyroscope
module is mounted on the steering wheel of the vehicle and senses the rapid change in acceleration and
warns the driver if he is driving recklessly. When the absolute magnitude of the values obtained in all
6 axes exceeds a preset value , it is detected as rash-driving.

18
Table 2. Test cases for MPU-6050 sensor

(a)
(b)
Fig. 5. Message on the LCD when (a) MPU-6050 is kept still. (b) when MPU-6050 is moved to
imitate rash-driving.
Driver drowsiness is one of the leading causes of accidents throughout the world. In our system , a
python script for detecting driver drowsiness by measuring the amount of time the eyes are closed. If
the time in which the eyes remain closed exceeds the time in which the eyes remain by a defined value
of 15, it is an indication that the driver is drowsy and an alarm is activated in the system to awaken the
driver.

19
(a)

(b)

(c)
Fig. 6. (a) When the eyes are open, the alarm remains off.

20
(b) When the eyes are closed for too long, the red border indicates drowsiness and the alarm turns
on .
(c) Message on the LCD display when drowsiness is detected

The accident detection segment utilizes a load cell which is strategically placed in the position most
prone to be placed under pressure or disfigured during an accident. When an accident has occurred, the
pressure on the sensor exceeds the threshold and the load cell signal is amplified and sent to the
microcontroller while the LCD reflects the same.

Table 3. Test cases for the 1kg load cell

(a) (b)
Fig. 7. Message on the LCD when (a) the vehicle is in motion and no accident is detected
(b) force is applied on the load cell to simulate an accident.
When the microcontroller receives the signal that an accident has occurred via the load cell, the GPS
location of the accident is retrieved and an emergency message is sent to pre-saved contacts using the
GSM module.

21
Fig. 8. Emergency message received on the designated phone number.

FUTURE SCOPE
As with any technical projects, the scope of improvement is vast and many features will be technically
feasible in the near future with developing technology. One feature that could drastically improve the
efficiency of the tracking procedure is to obtain photographs of the accident spot. This data can be used
in big data processing to recognize the common factors for accidents and mitigate them. Another sensor
that can be incorporated into the proposed system is the heart rate monitor which could continuously
monitor the heart rhythm of the driver and raise an alarm in case of medical emergencies such as a
sudden heart attack. A flame detection sensor can also be included in the sensor to alert if the vehicle is
under a threat of fire accidents.
Another futuristic feature that can be incorporated into the proposed system is the VANET, which can
be used as a mode of communication of vehicles traveling nearby, relaying information about road risks
using RF modules, decreasing the chance of accidents. It also assists in tracking a vehicle in case of
theft, as the details are stored in an adjacent passing car. Predictive analysis can also be used to warn of
impending accidents using data collected from MPU6050 and RF and camera modules. Furthermore,
EEPROM can be used to safely store the emergency contacts information of the vehicle occupant, as it
provides secure access to the information even in the case of a power disruption.

22
This proposed model could also be extended to other applications such as stolen vehicle recovery, fleet
management, asset tracking, field sales and transit tracking. For instance, this prototype allows models
to be developed for car rental services which will only allow the user to drive the vehicle if the seatbelts
are on and if they are not intoxicated as per standard traffic regulations thereby improving overall road
safety. The project could be further extended where the GPS location of the vehicle is always
transmitted to the rental service so that tracking numerous vehicles is made easier.

CONCLUSION
The prototype proposed in this paper aims to alleviate the current issues of existing accident detection
and prevention systems, by providing a more comprehensive system that mitigates various factors that
could contribute to the occurrence of accidents. The system includes an optical IR encoder that detects
if the driver has worn a seatbelt, an MQ3 sensor to determine that the driver has not consumed alcohol
and a drowsiness detection system to alert drivers when they fall asleep while driving. Each of these
individual measures are effective in minimizing the occurrence of accidents but the three-fold
implementation discussed previously significantly increases the safety of the driver and could
potentially reduce accidents to by a great margin. When the above criteria are met, the vehicle starts
moving. Further reinforcements such as an MPU6050 to identify rash driving and a camera module to
detect driver drowsiness using Machine Learning are in place to eliminate additional causes of
accidents. A load cell is included in the system to identify the presence of accidents and sends the
current location of the vehicle retrieved through a GPS location using a GSM Module. The proposed
system ensures the safety of both drivers and passengers by integrating several measures to prevent an
accident and providing swift access to medical help if an accident occurs.

23
REFERENCES

[1] Ruikar, M. (2013). National statistics of road traffic accidents in India. Journal of Orthopedics,
Traumatology and Rehabilitation, 6(1), 1.

[2] Prinja, S., Jagnoor, J., Sharma, D., Aggarwal, S., Katoch, S., Lakshmi, P. V. M., & Ivers, R. (2019).
Out-of-pocket expenditure and catastrophic health expenditure for hospitalization due to injuries in
public sector hospitals in North India. PloS one, 14(11), e0224721.

[3] Al Wadhahi, N. T. S., Hussain, S. M., Yosof, K. M., Hussain, S. A., & Singh, A. V. (2018, August).
Accidents detection and prevention system to reduce traffic hazards using IR sensors. In 2018 7th
International conference on reliability, Infocom technologies and optimization (trends and future
directions)(ICRITO) (pp. 737-741). IEEE.

[4] Parameswaran, S., Anusuya, P., Dhivya, M., Banu, A. H., & Kumar, D. N. (2018). Automatic
Vehicle Accident Detection and Messaging System. International Journal of Engineering Research &
Technology, 4(11), COCODANTR – 2016 (IJERTCONV4IS11034).

[5] Amin, M. S., Jalil, J., & Reaz, M. B. I. (2012, May). Accident detection and reporting system using
GPS, GPRS and GSM technology. In 2012 International Conference on Informatics, Electronics &
Vision (ICIEV) (pp. 640-643). IEEE.

[6] Rane, O. (2020). Vehicle safety tracking and monitoring system with alcohol detection and seat belt
control system. International Journal of Scientific & Engineering Research, 11(1), 1-5.

[7] Mary, X.A. & Jegan, R. & Rose, L. & Raj, P.A.C.. (2017). Design and development of vehicle
monitoring system through black box in a car. International Journal of Mechanical Engineering and
Technology. 8. 493-501

[8] Motwani, B. (2017). Wreck Watch: Accident Detection. International Journal of Innovative
Research in Science, Engineering and Technology, 6(1), 178-180. DOI:
10.15680/IJIRSET.2017.0601178.

[9] Rohilla, V., & Bazzad, M. (2019). ARDUINO BASED VEHICLE ACCIDENT DETECTION
SYSTEM. International Journal For Technological Research In Engineering, 6(8), 5241. ISSN
(Online): 2347 - 4718.

[10] Shrivastava, V., & Gyanchandani, M. (2020). A Review Paper on Pre and Post Accident Detection
and Alert System: an IoT Application for Complete Safety of the Vehicles. International Journal of
Engineering Research & Technology (IJERT) IETE–2020, 8(11).

[11] Ghorpade, P., & Nema, A. (2022). A REVIEW ON ACCIDENT DETECTION SYSTEM USING
IOT. International Research Journal of Modernization in Engineering Technology and Science, 4(6),
4278. e-ISSN: 2582-5208.

[12] Rani, B., Sam, R. P., & Kamatam, G. R. (2018). A Review on Vehicle Tracking and Accident
Detection System using Accelerometer. International Journal of Applied Engineering Research,
13(11), 9215-9217.

24
[13] Patil, J. K., & Mathew, L. G. Eye Blinking Monitoring System for Vehicle Accident Prevention.
International Journal of Electronic and Electrical Engineering. ISSN, 0974-2174.

[14] Shetgaonkar, P. R., NaikPawar, V., & Gauns, R. (2015). Proposed Model for the Smart Accident
Detection System for Smart Vehicles using Arduino board, Smart Sensors, GPS and GSM. Int. J.
Emerg. Trends Technol. Comput. Sci, 4(4).

[15] Sampoornam, K. P., Saranya, S., Vigneshwaran, S., Sofiarani, P., Sarmitha, S., & Sarumathi, N.
(2021, February). Intelligent Expeditious Accident Detection and Prevention System. In IOP
Conference Series: Materials Science and Engineering (Vol. 1059, No. 1, p. 012012). IOP Publishing.

[16] kumar Thangavel, R., Athithan, S., Sarumathi, S., Aruna, M., & Nithila, B. (2019, July). Blackspot
alert and accident prevention system. In 2019 10th International Conference on Computing,
Communication and Networking Technologies (ICCCNT) (pp. 1-6). IEEE.

[17] Ali, A., & Eid, M. (2015, May). An automated system for accident detection. In 2015 IEEE
international instrumentation and measurement technology conference (I2MTC) proceedings (pp.
1608-1612). IEEE.

[18] Mohamad, M. H., Hasanuddin, M. A. B., & Ramli, M. H. B. (2013). Vehicle accident prevention
system embedded with alcohol detector. IJRECE, 1(4), 100-102.

[19] Bhoite, P. A., Gopal, K., Sagar, W., Sisodiya, T., & Satish, P. (2018). Accident Detection System
using Arduino. International Science and technology journal, 7(4).

[20] Khandelwal, D., & Manoov, R. (2017, November). Airbag ECU coupled vehicle accident SMS
alert system. In 2017 International Conference on Inventive Computing and Informatics (ICICI) (pp.
82-87). IEEE.

[21] Kumar, J. M., Mahajan, R., Prabhu, D., & Ghose, D. (2016, December). Cost effective road
accident prevention system. In 2016 2nd International Conference on Contemporary Computing and
Informatics (IC3I) (pp. 353-357). IEEE.

[22] Murshed, M., & Chowdhury, M. S. (2019, January). An IoT based car accident prevention and
detection system with smart brake control. In Proc. Int. Conf. Appl. Techn. Inf. Sci.(iCATIS) (Vol. 23).

[23]Chaudhary, U., Patel, A., Patel, A., & Soni, M. (2021). Survey paper on automatic vehicle accident
detection and rescue system. In Data Science and Intelligent Applications: Proceedings of ICDSIA 2020
(pp. 319-324). Springer Singapore.
[24] Faiz, A. B., Imteaj, A., & Chowdhury, M. (2015, November). Smart vehicle accident detection and
alarming system using a smartphone. In 2015 international conference on computer and information
engineering (ICCIE) (pp. 66-69). IEEE.

[25] Nasr, E., Kfoury, E., & Khoury, D. (2016, November). An IoT approach to vehicle accident
detection, reporting, and navigation. In 2016 IEEE International Multidisciplinary Conference on
Engineering Technology (IMCET) (pp. 231-236). IEEE.
[26] Wakure, A. R., Patkar, A. R., Dagale, M. V., & Solanki, P. P. (2014). vehicle accident detection
and reporting system using GPS and GSM. International Journal of Engineering Research and
Development, 10(4), 25-28.

25
[27] Khalil, U., Javid, T., & Nasir, A. (2017, November). Automatic road accident detection techniques:
A brief survey. In 2017 International Symposium on Wireless Systems and Networks (ISWSN) (pp. 1-
6). IEEE.
[28] Sharma, S., & Sebastian, S. (2019). IoT based car accident detection and notification algorithm for
general road accidents. International Journal of Electrical & Computer Engineering (2088-8708), 9(5)

[29] Prabha, C., Sunitha, R., & Anitha, R. (2014). Automatic vehicle accident detection and messaging
system using GSM and GPS modem. International Journal of Advanced Research in Electrical,
Electronics and Instrumentation Engineering, 3(7), 10723-10727.

[30] Singh, J., Velu, V., & Nirmal, U. (2021). Vehicle Accident Detection System using Internet of
Things (VADS-IoT). In 2021 IEEE 11th IEEE Symposium on Computer Applications & Industrial
Electronics (ISCAIE) (pp. 353-359). Penang, Malaysia. doi: 10.1109/ISCAIE51753.2021.9431813.

26

You might also like