KEMBAR78
Road Accident Detection and Alert System | PDF | Traffic Collision | Airbag
0% found this document useful (0 votes)
71 views108 pages

Road Accident Detection and Alert System

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views108 pages

Road Accident Detection and Alert System

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 108

SCHOOL OF ENGINEERING SCIENCES AND TECHNOLOGY

DEPARTMENT OF MECHATRONICS ENGINEERING


FINAL YEAR DESIGN AND MAKE PROJECT PROPOSAL
TITLE:
DESIGN OF AN ACCIDENT DETECTION AND ALERT SYSTEM
BY
1. COLLEN TINARWO C18133862A
2. FANUEL MUNYORO C17132044D
3. HEMSON MUNYANYI C18134311Q
4. KOMBORERAI Z MUKARO C18133856M
5. KUDAKWASHE RAVENGWA C18134876M
6. LEMMINGTON TEMBO C18135319A
7. MASIMBAASHE MUSEKIWA C18135133O
8. NOMATHEMBA SIKIRETA C18134389B
9. TAUYA SHINDI C18132573K
10. TINASHE TARARA C18134315U
11. TINOTENDA TINARWO C18132674J
12. WALTER SHAIBO C18132927P
This thesis presented to partly meet requirements for the Bachelor
of Engineering honours degree in mechatronic engineering
(BEMC).

www.cut.ac.zw

1
Declarations
STUDENTS’ DECLARATION
We hereby declare that this research project titled "Design of an Accident and Alert System"
conducted at Chinhoyi University of Technology is an original work and has not been copied or
plagiarized from any sources. All information, data, and sources used in this project have been
properly cited and referenced according to the guidelines provided by our supervisors, Engineers
Musaidzi and Kapuya. The purpose of this research project is to design an accident and alert
system. The data used was obtained from empirical evidence. Data analysis and interpretation
was conducted using engineering principles. This research project represents solely our work and
has never been submitted to any university for any degree or qualification. The project complies
with all ethical standards and regulations set by Chinhoyi University of Technology for research
projects. The research was conducted with integrity, objectivity and professionalism. We take
full responsibility for the contents of this project, including any errors, omissions or inaccuracies
present.
We acknowledge that the results and conclusions are based on the limitations and assumptions of
the methodology and data used, and may not apply in all situations. The findings are subject to
criticism, review and further research. Any attempt to misrepresent or falsify the contents or
results will result in serious consequences including revocation of any qualification obtained
based on this project. Any breach of ethical standards set by the university may result in
disciplinary action and legal consequences. We hereby grant Chinhoyi University of Technology
the right to reproduce and distribute this research project in its original or modified form for
academic and research purposes only. We also grant the university the right to use our names,
images and affiliations in association with the publication, promotion or dissemination of this
research project provided that proper attribution is given to us as the authors. In conclusion, we
affirm that this research project represents our knowledge, skills and knowhow in the field of
study and contributes to transition of knowledge in this discipline, inspiring further research and
innovation.
Signature…………………………………………Date……………………………………

2
SUPERVISOR’S DECLARATION

This project report has been submitted for examination with my approval as the University

Supervisor.

Signature:

_____________________________________________Date: ____________________________

3
Acknowledgements
We express our gratitude to Chinhoyi University of Technology, specifically the Faculty of
Engineering, for providing us the rare opportunity to complete our Bachelor of Engineering
degrees. This chance to learn through hands-on experience in instrumentation, automation, and
engineering projects has been invaluable. Our gratitude extends to our lecturers in the
mechatronics department for their patience, enthusiasm and support throughout our studies. We
would also like to thank our project supervisors, Engineers Kapuya and Musaidzi, for donating
their time and effort to ensure we received the relevant guidance and knowledge necessary to
complete this project document. Above all else, our deepest appreciation goes to God for the gift
of life and the privilege to accomplish our bachelor's degrees.
For without the educational opportunities provided by the University, sound teaching of our
lecturers, expert advice from our supervisors and blessings of the Almighty, we could not have
designed and developed an accident and alert system as mandated for our final year capstone
project utilizing instrumentation, sensors, microcontrollers and wireless technologies. The
expertise and technical skills gained through this hands-on approach to learning will undoubtedly
serve as a concrete foundation for our future careers as professional mechanical engineers. Once
again, we wish to express our heartfelt gratitude to the University administration, faculty and
members for investing in our education, our lecturers for imparting knowledge and inspiration,
our supervisors for donating time and resources to advise and guide us, and finally to God for
good health, wisdom and the many blessings that made this achievement possible. We trust that
the accident alerting device and technical report we have produced will serve as a small yet
sincere return of the significant investment made in our education and future.

4
Abstract
An accident alert system has the capability to substantially decrease the number of road accidents
and their related costs. The system uses sensors and data analysis to identify vehicle crushes in
real time and notify emergency services, permitting faster response times and potentially saving
lives. This technology can have a major impact in countries like Zimbabwe, where road
accidents are a serious problem. One of the key advantages of an accident alert system is its
potential to give real-time traffic conditions and hazard information. This data can alert drivers to
potential dangers, like poor road conditions or heavy traffic, allowing them to adjust accordingly.
By taking a proactive approach to road safety, accidents can be prevented, reducing the overall
number of accidents on Zimbabwe's roads. In addition, an alert system can help enhance
emergency response times.
By providing real-time accident data, emergency services can be notified immediately, enabling
faster response and potentially saving lives. This is especially important in Zimbabwe where
emergency services may have difficulty reaching accident sites due to poor road conditions.
Implementation of an accident alert system in Zimbabwe could have a paramount impact on
lowering the number of accidents and related costs. The high accident rate results in substantial
human and economic costs including lost productivity, medical expenses, and property damage.
By preventing or minimizing the impact of accidents, a system can help reduce these costs. In
summary, an accident alert system has the potential to considerably enhance road safety and
emergency response in Zimbabwe. By utilizing real-time data and proactive measures, accidents
can be prevented or minimized in their impact. This technology has the capability to save lives
and reduce human and economic costs associated with road accidents.

5
Contents
Declarations .................................................................................................................................................. 2
Acknowledgements ........................................................................................................................................ 4
Abstract ......................................................................................................................................................... 5
LIST OF FIGURES .......................................................................................................................................9
LIST OF TABLES ...................................................................................................................................... 10
CHAPTER I ................................................................................................................................................ 11
1.1 Title ................................................................................................................................................... 11
1.2 Introduction ....................................................................................................................................... 11
1.3 Background ....................................................................................................................................... 13
1.4 Problem Statement ............................................................................................................................ 15
1.5 Aim .................................................................................................................................................... 15
1.6 Objectives .......................................................................................................................................... 15
1.7 Justification ....................................................................................................................................... 15
1.8 Scope ................................................................................................................................................. 16
1.9 Dissertation Structure ........................................................................................................................ 16
CHAPTER II ............................................................................................................................................... 20
2.1 Literature Review .............................................................................................................................. 20
2.2 Background ....................................................................................................................................... 20
2.3 Related Studies .................................................................................................................................. 21
2.4 Technologies Used in Accident Detection Systems ..........................................................................23
2.5 Case Studies ...................................................................................................................................... 23
2.6 Types of Accident Detection System Based on Design .................................................................... 25
2.6.1 Sensor-Based Accident Detection Systems ................................................................................25
2.6.2 Camera-Based Accident Detection Systems .............................................................................. 26
2.6.3 Machine Learning-Based Accident Detection Systems ............................................................. 27
2.6.4 Acoustic-Based Accident Detection Systems ............................................................................ 28
2.6.5 Vibration-Based Accident Detection Systems ........................................................................... 29
2.7 Performance Evaluation Metrics ....................................................................................................... 29
2.7.1 Accuracy .....................................................................................................................................29
2.7.2 Precision ..................................................................................................................................... 30
2.7.3 Recall ..........................................................................................................................................30
2.7.4 F1 Score ......................................................................................................................................30
2.7.5 Receiver Operating Characteristic (ROC) Curve ....................................................................... 31
2.7.6 Mean Time to Detect (MTTD) ...................................................................................................31
6
2.7.7 Mean Time Between Failures (MTBF) ...................................................................................... 31
2.8 Challenges and Limitations ............................................................................................................... 31
2.8.1 Data Privacy ............................................................................................................................... 31
2.8.2 System Reliability ...................................................................................................................... 32
2.8.3 False Alarms ...............................................................................................................................32
2.8.4 Limited Coverage ....................................................................................................................... 32
2.8.5 High Cost ....................................................................................................................................32
2.8.6 Ethical and Legal Concerns ........................................................................................................33
2.8.7 Human Factors ........................................................................................................................... 33
2.9 Conclusion .........................................................................................................................................33
CHAPTER III ..............................................................................................................................................35
3.1 Introduction ....................................................................................................................................... 35
3.2 System Design Process ......................................................................................................................36
3.3 Design Requirements ........................................................................................................................ 36
3.4 System requirements ......................................................................................................................... 37
3.4.1 System Checklist ........................................................................................................................ 38
3.4.2 Incident Matrix for List of Requirements ...................................................................................41
3.5 System Development (Conceptual Design.) ..................................................................................... 43
3.6 Abstraction-Based Identification of Essential Problems ...................................................................43
3.7 Functional Analysis of the System .................................................................................................... 44
3.8 Functional Tree ..................................................................................................................................45
3.8.1 The Component Tree Diagram ...................................................................................................46
3.9 Scope of the Design ...........................................................................................................................49
3.10 DOMAIN SPECIFIC DESIGNS .....................................................................................................49
3.10.1 POSSIBLE SOLUTIONS ........................................................................................................ 49
3.10.2 Chosen Solution ....................................................................................................................... 50
3.11 DEVELOPMENT OF CHOSEN SOLUTION ............................................................................... 50
3.11.1 Mechanical Domain ................................................................................................................. 50
3.11.2 Electrical Domain .....................................................................................................................52
3.12 Electronics Domain: Sensors Used ................................................................................................. 54
CHAPTER IV ..............................................................................................................................................62
4.1 Testing and Results ........................................................................................................................... 62
4.2 Wiring Diagram .................................................................................................................................63
4.3 Accident Detection System (PCB Design) ........................................................................................65

7
4.4 Testing the Accident Detection System ............................................................................................ 69
4.5 Evaluation of Testing and Results .....................................................................................................71
CHAPTER V ...............................................................................................................................................74
5.1 Financial ............................................................................................................................................ 74
5.2 Recommendations ............................................................................................................................. 74
5.3 Future Work of Accident Detection Systems ....................................................................................75
REFERENCES ............................................................................................................................................78
APPENDICIES ........................................................................................................................................... 82
Additional Pictures .................................................................................................................................. 82
APPENDIX A: ARDUINO CODE ............................................................ Error! Bookmark not defined.

8
LIST OF FIGURES
Figure 1: Month of Completion .................................................................................................... 19
Figure 2:On camera-based accident detection system .................................................................. 27
Figure 3: On machine learning based accident detection system ..................................................28
Figure 4: On acoustic based accident detection and alert system ................................................. 29
Figure 5: VDI 22O6 design methodology (Schramm, 2012) ........................................................35
Figure 6: Flow Chart of the Accident Detection System .............................................................. 42
Figure 7:Steps taken to come up with the principal solution ........................................................ 43
Figure 8:Flow chart diagram for functional analysis .................................................................... 44
Figure 9: The Component Tree Diagram ...................................................................................... 46
Figure 10:The system block diagram ............................................................................................ 48
Figure 11: On A sample black box for safe keeping the electronics hardware .............................51
Figure 12: Arduino Mega ..............................................................................................................54
Figure 13: Accelerometer ..............................................................................................................55
Figure 14: Tilt Sensor ....................................................................................................................55
Figure 15: GPS Module .................................................................................................................56
Figure 16: Flame Sensor ............................................................................................................... 56
Figure 17: Vibration Sensor .......................................................................................................... 57
Figure 18: Push Button ..................................................................................................................58
Figure 19: Buzzer .......................................................................................................................... 58
Figure 20: 12C LCD Display ........................................................................................................ 59
Figure 21: GSM Module (Sim 900) .............................................................................................. 60
Figure 22 schematic on the complete proteus design ....................................................................61
Figure 23: PCB after Etching ........................................................................................................ 65
Figure 24: PCB Design on Proteus ............................................................................................... 66
Figure 25: PCB After being run under water ................................................................................ 67
Figure 26: Finished PCB with mount Arduino Board ...................................................................68
Figure 27: Bluetooth Vehicle ........................................................................................................ 69
Figure 28: On sms alert after an accident occurs .......................................................................... 71
Figure 29: Mounting of the whole detection and alert system ......................................................72
Figure 30: On 3D PCB layout in proteus ...................................................................................... 82
Figure 31: On testing of the flame sensor as part of accident detection ....................................... 82
Figure 32: On the black box design .............................................................................................. 83

9
LIST OF TABLES
Table 1: The component tree diagram ...........................................................................................45
Table 2: System Requirements ......................................................Error! Bookmark not defined.
Table 3: System Checklist ............................................................. Error! Bookmark not defined.
Table 4: Incident Matrix for List of Requirements ....................... Error! Bookmark not defined.

10
CHAPTER I
1.1 Title
DESIGN OF AN ACCIDENT DETECTION AND ALERT SYSTEM
1.2 Introduction

A vehicle accident detection and alert system is a system that gathers information about the
impact, vibration, or tilt of a vehicle and sends an alert message immediately to the emergency
responders or rescue team. Road accidents are usually caused by over speeding and a slow
reaction when the driver is consuming alcohol while driving. In Zimbabwe, there is no
automated solution for detecting and reporting accidents. In some cases, when there is no one to
report the accident, the injured person may even be dead without any notice. The proposed
project helps reduce the number of deaths due to accidents in Zimbabwe. The system uses
wireless communications techniques to send messages to the police and hospital.

When an accident occurs at any place, an alerting message is sent to the registered mobile
through a GSM module immediately after the accident is detected. Arduino forms the heart of
the system, which helps in transferring the message to different devices in the system. The
vibration sensor, impact/shock sensor, and tilt sensor will be activated when the accident occurs,
and the information will be transferred to the registered number through the GSM module. The
GPS system will help in finding the location of the accident spot. The location can be sent
through a tracking system to cover the geographical coordinates of the area.

Accidents are an unfortunate reality of life. They can happen at any time and in any place, often
without warning. While some accidents are minor and can be easily remedied, others can be
catastrophic, resulting in serious injuries or even death. In recent years, the number of accidents
on our roads has increased significantly, with distracted driving and other factors contributing to
the problem. This has led to a growing need for accident detection systems that can help reduce
the number of accidents and improve safety on our roads.
Accident detection systems are designed to detect when an accident has occurred and alert
emergency services to the situation. These systems use a variety of sensors and technologies to
detect the presence of an accident, including accelerometers, cameras, and GPS tracking. They
can be installed in vehicles or on the road itself, and can be programmed to detect different types
of accidents, such as collisions, rollovers, or pedestrian accidents. One of the primary benefits of
accident detection systems is that they can help emergency services respond more quickly to
accidents. When an accident occurs, every second counts.

The faster emergency services can get to the scene of the accident, the greater the chances of
saving lives and reducing the severity of injuries. Accident detection systems can provide real-
time information about the location and severity of an accident, allowing emergency services to
respond quickly and efficiently. Another benefit of accident detection systems is that they can
help prevent accidents from occurring in the first place. Many systems are designed to detect
when a driver is becoming drowsy or distracted and can alert them to take a break or refocus

11
their attention on the road. Some systems can even take control of the vehicle and bring it to a
stop if the driver is unable to do so themselves.

By helping drivers stay alert and focused on the road, accident detection systems can help
prevent accidents before they happen. Accident detection systems can also help reduce the
severity of accidents when they do occur. For example, some systems are designed to deploy
airbags or other safety features automatically when an accident is detected. This can help protect
the occupants of the vehicle and reduce the risk of serious injuries. Other systems can
automatically call for medical assistance or alert nearby drivers to the presence of an accident,
helping to prevent further accidents from occurring.

The need for accident detection systems is becoming increasingly urgent as the number of
accidents on our roads continues to rise. In addition to the human toll of accidents, they also have
a significant economic impact. According to the National Highway Traffic Safety Administration,
the cost of motor vehicle crashes in the United States alone was $242 billion in 2010. This
includes medical costs, lost productivity, and property damage. By reducing the number and
severity of accidents, accident detection systems can help reduce these costs and improve overall
economic productivity. Accident detection systems are an essential tool for improving safety on
our roads.

They can help emergency services respond more quickly to accidents, prevent accidents from
occurring in the first place, and reduce the severity of accidents when they do occur. With the
number of accidents on our roads continuing to rise, it is more important than ever to invest in
these systems and make our roads safer for everyone. In the present day, the rate of accidents can
increase rapidly. Due to employment, the usage of vehicles like cars and bikes can increase.
Because of this, accidents can happen due to over speeding. People are at risk owing to their
excessive speed, and the number of accidents cannot be reduced due to the lack of sophisticated
solutions.

To reduce the accident rate in the country, this paper introduces an optimal solution. An
automatic alert system for vehicle accidents is introduced; the main objective is to control the
accidents by sending a message to the registered mobile using wireless communications
techniques. When an accident occurs in a city, the message is sent to the registered mobile
through the GSM module in less time. Arduino is the heart of the system, which helps in
transferring the message to different devices in the system. A vibration sensor will be activated
when the accident occurs, and the information will be transferred to the registered number
through the GSM module. The GPS system will help in finding the location of the accident spot.

The proposed system will check whether an accident has occurred and notify the nearest medical
centers and registered mobile numbers about the place of the accident using GSM and GPS
modules. The location can be sent through a tracking system to cover the geographical
coordinates of the area. The accident can be detected by a vibration sensor, which is a major
module in the system. The proposed system deals with accident alerting and detection. A
vibration sensor will be activated when the accident occurs, and the information will be
transferred to the registered number through the GSM module.

12
1.3 Background
According to the Traffic Safety Council of Zimbabwe, the number of fatalities in road crashes
climbed in Zimbabwe from 1,836 in 2016 to an average of 2,000 deaths per year (almost 5
deaths per day) from 2018 to 2021. (TSCZ). According to WHO estimates that take into account
victims who pass away while traveling, in the hospital, or after discharge, this number may really
be over three times higher at about 7,000 road deaths per year. According to the United Nations
Road Safety Performance Review of Zimbabwe, published in Harare, Zimbabwe, on January 12,
2022, if coordinated action and considerably enhanced commitment are not taken, the annual
crash death rate is predicted to quadruple in the following ten years.

Figure 1: ZimStats Z.R.P 2019

Numerous accidents cause severe harm to people, and some of them lose their lives as a result of
the issues. The number of cars on the road has been steadily rising every year, and at the same
time, the number of accidents on the roads has also been rising. Today, driver negligence and
traffic law violations are the primary causes of accidents. If the appropriate authorities were
alerted to the emergency at the right moment, many lives that would have been lost in an
accident could have been saved. The proposed system overcomes the above problems and
provides accident information at the correct time, and first aid will be given to rescue the people
involved in accidents.

Car accident deaths are very high nowadays as the victims do not receive medical assistance in
time. Timely medical aid can help save lives. This system aims to detect an accident and notify
the respondent or the rescue team to provide immediate medical aid. The most critical things
about accidents are location, impact, tilt, and vibration, which are detected through the use of
GPS, shock, and tilt sensors. Based on gathered information from sensors or GPS, the system
makes a decision and sends alerting information immediately through a smartphone to the rescue
team. The rescue entities are the police, hospital, and next of kin. GPS and GSM modules will be
used to send information about the location as well as the location of the scene.

Both the detection phase and the notification phase are achieved by means of mechatronics.
When an accident occurs, the police are notified first. The police are not a reliable respondent in
Zimbabwe, as they might not have a vehicle or fuel to get to the scene. While the police are
doing what they will be doing, the system makes use of a long-range transceiver to send a signal
so that any vehicle in that range can pick up the signal and come to the rescue. Road safety is
still a major concern for global development and public health and a leading source of death and

13
injury. Ninety percent of the 1.35 million road fatalities documented in the Global Status Report
on Road Safety 2018 occurred in developing countries.

Figure 2: Number of Accident Recorded

Deaths in underdeveloped nations, with 11% occurring in only Zimbabwe. In India, there were
151 fatalities in 2019. We have failed to significantly advance in this area despite our promise to
reduce the number of deaths. The Department of Roads and Motorways is responsible for a
number of projects, including campaigns to raise public awareness of the importance of driving
safely. The fault of the driver accounts for 78.4% of accidents. These include making phone calls
while driving, driving while intoxicated or under the influence of narcotics, and speeding. Third-
party negligence (7.1%), which includes the negligence of pedestrians, bikers, or drivers of other
cars, is another reason for road accidents. Government negligence (2.8%), auto malfunctions
(2.3%), and bad weather (1.7%) all contribute to fewer accidents.

Road accidents are a significant problem in Zimbabwe, with thousands of people being injured
or killed on the country's roads every year. According to the Zimbabwe Republic Police, there
were 4,506 road accidents in the country in 2020, resulting in 1,804 injuries and 1,184 fatalities.
One of the main causes of road accidents in Zimbabwe is reckless driving. Many drivers ignore
traffic rules and regulations, exceeding speed limits and overtaking dangerously. In addition,
many vehicles on Zimbabwe's roads are poorly maintained, with faulty brakes, tires, and other
components. This makes them more prone to accidents, particularly on the country's poorly
maintained roads.

Another contributing factor to road accidents in Zimbabwe is driver fatigue. Many drivers work
long hours without taking adequate breaks, leading to tiredness and reduced concentration. This
can result in poor decision-making and slower reaction times, increasing the risk of accidents.
Pedestrians are also at risk on Zimbabwe's roads. Many pedestrians walk along the side of the
road due to the lack of sidewalks, putting them in danger from passing vehicles. In addition,
many pedestrians do not wear reflective clothing or use proper crossing points, making them
difficult to see for drivers.
14
The impact of road accidents in Zimbabwe is significant, both in terms of human lives and
economic costs. Families are devastated by the loss of loved ones, while injured victims often
face long-term disabilities and medical expenses. The economic costs of road accidents are also
significant, with lost productivity, medical expenses, and property damage all contributing to the
overall cost. To address the problem of road accidents in Zimbabwe, the government has taken
several steps. These include increasing fines for traffic violations, improving road infrastructure,
and launching public awareness campaigns to promote safe driving practices. However, more
needs to be done to reduce the number of accidents on Zimbabwe's roads.

One potential solution is the implementation of accident detection systems. These systems can
help detect accidents in real-time and alert emergency services, enabling faster response times
and potentially saving lives. In addition, accident detection systems can help prevent accidents
from occurring in the first place by alerting drivers to potential hazards or taking control of the
vehicle in emergency situations. Overall, road accidents are a significant problem in Zimbabwe,
with a high human and economic cost. While the government has taken steps to address the issue,
more needs to be done to reduce the number of accidents on the country's roads. The
implementation of accident detection systems is one potential solution that could help improve
road safety and save lives.

1.4 Problem Statement

There are so many car accident deaths due to late reports of the accidents to the police and first
responders, thus reducing their response time to the scene to help and assist the accident victims.
Because of this problem, there have been more deaths due to the lack of attendance of the
accident victims in time. The increase in road accidents and deaths is of great concern to the
health sector, the Ministry of Transport, the Ministry of Finance and Economic Development, the
citizens themselves, and other stakeholders at large. This continues to give worry to the Ministry
of Transport and Health. Since these deaths are avoidable, this study will thus provide a solution
to the challenges faced in mitigating accidents in Zimbabwe.

1.5 Aim
To design an accident detection and alert system.
1.6 Objectives
1. To design a vehicle accident detection system.
2. To develop a vehicle accident alert system.
3. To design a system that can give accurate reading through the integration of multiple
sensors
1.7 Justification
The system mitigates delay by alarm systems -Alarm systems, which are highly effective
because they operate with alert systems, help the system reduce delays. Typically, the issue and
accident position will be highlighted by the alarm and alert system. The alarm system will
activate immediately and alert the appropriate personnel to help the injured. Because there are
few opportunities for convectional employment, the alarm and alert system is successful. They

15
must act quickly to secure the preservation of lives. Usually, delays lead to fatalities when
victims bleed excessively.
It functions even in remote places - This mechanism functions in secluded areas with no
inhabitants. It is rather common for individuals to travel and pass-through mountainous areas that
are uninhabited. These locations frequently require awareness and attention in the event of
accidents. Because this system uses GPS, it verifies similar systems. This is a terrestrial location
system that uses radio waves and satellites to locate any point. The technology warns and notifies
of the location of an accident, saving time spent looking and searching but providing a precise
location instead.
There is mechanism in place to protect the driver and passengers - Most of the time, relying
solely on the seat belt is insufficient for protection. This method will take advantage of air bags
in accidents, even for passengers. In order to lessen catastrophic conditions like fires and other
catastrophes, it will also cut off the vehicle's power source. One of these methods is the capture
of carbon dioxide to inhibit burning. Because oxygen is often required for flames to ignite,
carbon dioxide is employed to counteract this. In addition to that, there are measures in place to
keep the windows open for other hazardous gases so that passengers in the car are not harmed.
Even in a crash the system is fortified - Even in the event of an accident, the system is
strengthened. It is shielded in order to prevent damage. It has an immortal system that draws
power from an outside source. Lithium batteries built into this power source are only ever used
when sensors cause actuators to actuate. The system's exterior is made out of water-resistant
metallic cases. The configuration of this system is among its most crucial and vital components.
The system is positioned to minimize collisions. This depends on the vehicle because certain cars
are more likely to crash in the front while others are in the back. As a result, the system will be
situated in a collision-free zone.
Because cars are made of volatile substances like gasoline and diesel, it is not uncommon for
accidents to result in fires. An explosion will occur when there is a leak and an open flame. The
system's components are first composed of flexible composite materials that are also water
resistant and fire-resistant materials. Heat sensors will trigger actuators when there are flames,
which will cause carbon dioxide to be realized, putting out the flame and stopping combustion.
The driver and other passengers will be saved while they wait for medical personnel to save them.
The alert time is quick -Protection is carried out in a really brief amount of time. Accident
victims frequently go unconscious as a result of collisions. They risk losing some persons during
that period due to the discharge of hazardous gaseous pollutants during burning. For instance,
carbon monoxide. To alert for emergencies and raise awareness, a mechanical device that is
automated is required. Time is crucial because how we use it to react decides whether or not
someone will be saved. One of the system's primary objectives is to reduce casualties, therefore
the quicker the response, the more effective the system will be.
1.8 Scope
The scope of the accident detection and alert system will be focused on the vehicle itself and its
occupants. The system will monitor the driving conditions, detect potential hazards and accident
16
situations, and alert the driver and emergency services accordingly. By concentrating on ensuring
the safety of vehicle users, the system has the potential to significantly reduce accident fatalities
and injuries. The system will consist of sensors installed on the vehicle to monitor its movement
and surroundings. Accelerometers and gyroscopes will detect any sudden deceleration or impact
that may indicate the vehicle has been involved in an accident. Road condition sensors will
monitor factors like traction, potholes and obstacles that could cause an accident. Ultrasonic
sensors will detect the proximity of other vehicles and objects. Cameras will provide visual data
to identify potential hazards. All sensor data will be processed by a central electronic control unit
using an algorithm to determine if an accident has occurred.
If an accident is detected, the control unit will immediately send an alert to emergency services
using wireless communication technology. The alert will contain information such vehicle
location, number of occupants and type of accident to assist the responders. The control unit will
also activate the vehicle's hazard lights and horns to draw attention to the accident site. An alert
will also be sent to a mobile application used by the vehicle's owner to notify them of the
accident. The system's primary focus will be the safety of people inside the vehicle. Therefore,
sensors will also monitor the condition of occupants such as use of seat belts and airbags. If an
occupant is not belted, the system will activate an audio-visual warning. In the event of an
accident, the system will determine if airbags have deployed correctly for each occupant. This
information will be included in the emergency alert to prioritize medical attention. The scope of
the accident detection and alert system will be limited to ensuring the safety of those travelling
within the monitored vehicle. By focusing on detecting potential hazards, accidents involving the
vehicle and the condition of its occupants, the system has the potential to immediately alert
emergency services, draw attention to the accident site and prioritize medical attention for the
most severely injured - thereby reducing accident fatalities and injuries for users of the system.
1.9 Dissertation Structure
This chapter has introduced the topic under study and provided a brief background that provides
a contextual basis for understanding the problem under study and appreciating the justification of
the study. The chapter also outlined the objectives which this study seeks to meet as well
highlighted the limitations and possible solutions thereto the researcher will have to deal with in
the course of the study. Data collection will involve the use of research methods and tools
through review of relevant literature, various engineering journals and engineering design books.
Data analysis will involve the quantitative and qualitative analysis including the comparison of
the existing designs to the proposed one, relating the set operating conditions/standards and the
data collected from various sources.
Chapter 1 has covered the introduction.
Chapter 2 will cover literature review.
Chapter 3 will cover methodology.
Chapter 4 will cover results and evaluation.
Chapter 5 will cover the conclusion.
17
Gant Chart
A Gantt chart is a popular project management tool that provides a visual representation of a
project schedule. It is a bar chart that shows the start and end dates of tasks, as well as their
duration and dependencies. Gantt charts are useful for planning, scheduling, and tracking
projects of all sizes and complexities. One of the key benefits of a Gantt chart is that it helps
project managers and team members stay organized and on track. By breaking down a project
into smaller tasks and assigning specific deadlines, Gantt charts enable project stakeholders to
understand the timeline of the project and ensure that all tasks are completed on time. This
makes it easier to identify potential issues or delays and take corrective action. Gantt charts are
also useful for communicating project progress to stakeholders. They provide a clear and concise
way to showcase progress and identify potential issues or delays. This makes it easier for project
managers to keep stakeholders informed and engaged throughout the project lifecycle. Overall,
Gantt charts are an essential tool for effective project management.

18
Figure 3: Month of Completion

19
CHAPTER II
2.1 Literature Review
Accident detection and alert systems have become increasingly important in ensuring timely
medical attention and reducing fatalities resulting from road accidents. Zimbabwe, like many
other countries, has experienced a rising number of road accidents, and there is a need for
effective accident detection and alert systems to improve emergency response times and
ultimately save lives. With the advancements in technology and the widespread availability of
affordable hardware such as the Arduino microcontroller, designing such systems has become
easier and more accessible. In this literature review, we will explore the existing research on the
design and development of accident detection and alert systems using Arduino in different parts
of the world to provide insights and recommendations for designing an effective system for
Zimbabwe.
Road traffic accidents are a major cause of deaths and injuries globally, with an estimated 1.35
million fatalities and up to 50 million injuries each year (WHO, 2021). The timely detection of
accidents and prompt response by emergency services can save lives and reduce the severity of
injuries. In recent years, there has been an increasing interest in using Arduino-based systems for
accident detection and alerting, due to their low cost, flexibility, and ease of use.
Several existing studies have explored the use of Arduino for accident detection and alerting,
using different sensors and technologies, such as GPS, image processing, and vibration sensors
(Goud et al., 2014; Jayashree et al., 2019; Paki et al., 2019). These studies have shown promising
results in terms of accuracy and timeliness of accident detection. However, there are also
limitations and challenges that need to be addressed, such as false alarms, limited coverage in
areas with weak or no signals, and complex hardware and software requirements (Ghosh et al.,
2015; Akter et al., 2016).
To address these limitations and challenges, future research can explore ways to optimize the use
of Arduino-based systems for accident detection and alerting. This can be achieved through the
development of more robust and reliable sensors and algorithms, the integration of multiple
sensors and technologies, and the simplification of the system's usability for broader adoption.
2.2 Background
Accident detection systems are designed to detect accidents and alert emergency services to
respond quickly to the scene of the accident. These systems use different sensors and algorithms
to detect accidents. The following are the different types of accident detection systems:
1. GPS-Based Accident Detection Systems: This type of accident detection system uses GPS
technology to detect accidents. The system uses the location data from the GPS to determine if a
vehicle has been involved in an accident. If the system detects an accident, it sends an alert to the
emergency services with the location of the accident.
2. Accelerometer-Based Accident Detection Systems: This type of accident detection system
uses an accelerometer to detect sudden changes in acceleration or deceleration. The system is

20
designed to detect accidents by measuring the change in speed and direction of the vehicle. If the
system detects an accident, it sends an alert to the emergency services.
3. Camera-Based Accident Detection Systems: This type of accident detection system uses
cameras to detect accidents. The system uses image recognition technology to identify objects on
the road, such as other vehicles, pedestrians, and obstacles. If the system detects an accident, it
sends an alert to the emergency services.
4. Radar-Based Accident Detection Systems: This type of accident detection system uses radar
technology to detect accidents. The system uses radio waves to detect objects on the road, such
as other vehicles, pedestrians, and obstacles. If the system detects an accident, it sends an alert to
the emergency services.
5. Infrared-Based Accident Detection Systems: This type of accident detection system uses
infrared technology to detect accidents. The system uses infrared sensors to detect heat
signatures from objects on the road, such as other vehicles, pedestrians, and obstacles. If the
system detects an accident, it sends an alert to the emergency services.
6. Vibration-Based Accident Detection Systems: This type of accident detection system uses
vibration sensors to detect accidents. The system is designed to detect accidents by measuring
the vibrations caused by an accident. If the system detects an accident, it sends an alert to the
emergency services.
7. Hybrid Accident Detection Systems: This type of accident detection system combines two or
more sensors to detect accidents. For example, a hybrid system may combine GPS and
accelerometer sensors to detect accidents. If the system detects an accident, it sends an alert to
the emergency services.
2.3 Related Studies
Accident detection systems have been developed to detect and alert emergency services to
respond quickly to the scene of an accident. These systems use different sensors and algorithms
to detect accidents. This paper summarizes previous studies on accident detection systems. GPS-
Based Accident Detection Systems have been studied extensively in previous research. These
systems use GPS technology to detect accidents and send an alert to emergency services. The
accuracy of these systems is dependent on the quality of the GPS signal, which can be affected
by factors such as weather conditions, tall buildings, and tunnels.
A study by compared the accuracy of GPS-based accident detection systems with accelerometer-
based systems. The study found that GPS-based systems had a higher false positive rate than
accelerometer-based systems but were more accurate in detecting accidents. Accelerometer-
Based Accident Detection Systems have also been extensively studied. These systems use an
accelerometer to detect sudden changes in acceleration or deceleration. The system is designed to
detect accidents by measuring the change in speed and direction of the vehicle. A study by S.
Gao et al. (2019) proposed an accelerometer-based accident detection system that used machine
learning algorithms to improve the accuracy of accident detection. The study found that the
system had a high accuracy rate in detecting accidents.
21
Camera-Based Accident Detection Systems have been studied for their effectiveness in
identifying objects on the road, such as other vehicles, pedestrians, and obstacles. A study by J.
Liu et al. (2019) proposed a camera-based accident detection system that used deep learning
algorithms to identify objects on the road. The study found that the system had a high accuracy
rate in detecting accidents. Radar-Based Accident Detection Systems have been studied for their
effectiveness in detecting objects on the road, such as other vehicles, pedestrians, and obstacles.
A study by (Khan & Khan, 2018) proposed a radar-based accident detection system that used
machine learning algorithms to improve the accuracy of accident detection. The study found that
the system had a high accuracy rate in detecting accidents.
Infrared-Based Accident Detection Systems have been studied for their effectiveness in detecting
heat signatures from objects on the road, such as other vehicles, pedestrians, and obstacles. A
study by (IoT based framework for Vehicle Over-speed detection, 2018) proposed an infrared-
based accident detection system that used machine learning algorithms to improve the accuracy
of accident detection. The study found that the system had a high accuracy rate in detecting
accidents. Vibration-Based Accident Detection Systems have been studied for their effectiveness
in detecting accidents by measuring the vibrations caused by an accident.
A study by H. Li et al. (2018) proposed a vibration-based accident detection system that used
machine learning algorithms to improve the accuracy of accident detection. The study found that
the system had a high accuracy rate in detecting accidents. Hybrid Accident Detection Systems
have been studied for their effectiveness in combining two or more sensors to detect accidents. A
study by S. Gao et al. (2017) proposed a hybrid accident detection system that combined
accelerometer and GPS sensors to improve the accuracy of accident detection. The study found
that the system had a high accuracy rate in detecting accidents. Overall, previous studies have
shown that different types of accident detection systems have their advantages and disadvantages.
The choice of the type of accident detection system to use depends on the specific application
and the environment in which it will be used. Future research should focus on developing more
accurate and reliable accident detection systems that can be used in a variety of environments
and weather conditions.
GPS-based accident detection and alert system: This system uses GPS and GSM modules along
with Arduino to detect accidents and send alerts. The strength of this system is its accuracy in
detecting the accident location (Goud et al., 2014). However, its weakness is that it may not
detect accidents that occur in areas with weak or no GPS signals (Ghosh et al., 2015). Future
researchers can explore ways to improve the system's reliability in such situations.
Smartphone-based accident detection and alert system: This system uses the accelerometer in
smartphones to detect accidents and send alerts to emergency contacts. Its strength is that it is
highly accessible since most people carry smartphones. However, its weakness is that it may not
be as accurate as other systems in detecting accidents (Akter et al., 2016). Future researchers can
investigate ways to improve the accuracy of detection.
Image processing-based accident detection and alert system: This system uses cameras and
image processing technologies along with Arduino to detect accidents and send alerts. The
22
strength of this system is its accuracy in detecting accidents (Jayashree et al., 2019). However, its
weakness is that it may require more complex hardware and software, which can be expensive.
Future researchers can explore ways to optimize the system without compromising on accuracy.
Microcontroller-based accident detection and alert system: This system uses a microcontroller
like Arduino to collect and analyse signals from sensors to detect accidents and send alerts. The
strength of this system is its flexibility and ease of customization (Long et al., 2016). However,
its weakness is that it may require a higher level of technical understanding, which may not be
accessible to all users. Future researchers can explore ways to simplify the system's usability.
Vibration sensor-based accident detection and alert system: This system uses vibration sensors
along with Arduino to detect and send alerts in case of accidents. The strength of this system is
its sensitivity in detecting accidents (Paki et al., 2019). However, its weakness is the potential for
false alarms due to other sources of vibrations. Future researchers can investigate ways to
improve the sensor's specificity to minimize false alarms.
2.4 Technologies Used in Accident Detection Systems
Accident detection systems use various sensors and data analytics techniques to detect and alert
emergency services to respond quickly to the scene of an accident. The most common sensors
used in these systems are GPS, accelerometers, cameras, radar, infrared, and vibration sensors.
GPS-based systems use GPS technology to detect accidents and send an alert to emergency
services. Accelerometer-based systems use an accelerometer to detect sudden changes in
acceleration or deceleration. Camera-based systems use deep learning algorithms to identify
objects on the road, such as other vehicles, pedestrians, and obstacles.
Radar-based systems use machine learning algorithms to improve the accuracy of accident
detection by detecting objects on the road. Infrared-based systems detect heat signatures from
objects on the road, such as other vehicles, pedestrians, and obstacles. Vibration-based systems
measure the vibrations caused by an accident to detect it. Hybrid systems combine two or more
sensors to improve the accuracy of accident detection. Data analytics techniques are used in
these systems to analyse sensor data and detect patterns that indicate an accident has occurred.
These techniques include machine learning algorithms, deep learning algorithms, and statistical
analysis. Overall, these technologies are used to develop accurate and reliable accident detection
systems that can be used in a variety of environments and weather conditions.
2.5 Case Studies
In order to reduce the likelihood of an accident, Barş Guksa and Burcu Erkmen, B. (2017) have
designed a system that would not only alert users to accidents but also determine whether the
driver is feeling tired and hence is not fit to drive. The suggested device makes use of a
smartphone with a front camera to monitor the driver's posture. The program opens with a
request for a photo from the user. The face's situation is established in the image. When the face's
position is determined, only the face is chopped once, and the system saves it as a replacement
shot. The technology then stores the number of gaps and closed eyelids in a single minute. The
motive force regulates himself by making him hear the warning message speech "are you

23
sleepy?" If there is more or less of an eye gap and shutting in a very minute that is completely
different from the norm.
A front camera, an ALS (Ambient Light Sensor), a gyro detector integrated with a measurement
system, and a receiving IC (Integrated Circuit) are all necessary for the smartphone to process
GPS data. The author's suggested system might be effective at preventing accidents. Given that
this system relies on smartphone sensors for detection, it is essential that the driver has a
smartphone. Although smartphones are widely used today and could be useful in this system, if
the driver forgets to bring his smartphone or chooses not to carry one, the system may become
ineffective as a result. Air bags and ABS are examples of the types of accident prevention
systems that are already present in cars.
The projected system relies on the thought that the accident is detected by vibration and rotating
mechanism sensors once a close review of current systems and literature surveys, and a message
is straight away sent to the emergency contact numbers victimization the GSM module beside
the situation found by the GPS module. Vibrations are produced if the car is in a head-on
collision. Vibrations are recognized and handled as a serious accident situation if they reach a
certain threshold. The car can be detected by the gyro detector if it has tilted or overturned at an
unusual angle. The technology can predict ten seconds in all circumstances. If the button is
pressed by the driver within ten seconds, the system determines that the collision wasn't
significant and returns to normal operation.
In this method, the heart rate sensors can only detect the speed of the driver if an accident has
taken place. The hospitals can understand the status of the driver through the use of this data, and
as a result, they can respond to help the driver. They need to conduct experiments by
implementing the system in a very toy automobile and determine that the system is functioning
properly. This is by far the best and most efficient as well as cost friendly approach. The
program. If the value exceeds the threshold value then GPS will generate the current location and
GSM will send the alert message to respective authorities with the help of Arduino. Vibration
sensor is used to detect the accident.
One of the major gaps with this system is that it doesn’t provide any solution to a minor accident
situation where there isn’t any serious damage or any casualties. So in such cases if the system
doesn’t provide a solution to this problem this will ultimately result in waste of resources and
time. Also, this system doesn’t provide any medical history of the victim which eventually
results in the delay which will ultimately hinder the cause.
The HD Co-pilot Android app by Bruno Fernandes, Vitor Gomes, Joaquim Ferreira, and Arnaldo
Oliveira, A. (2016) is a system that combines accident detection with multimodal signal
distribution. In order to utilize the app, get road hazard signals from nearby vehicles, and
terminate countdown procedures if a false accident is detected, an android phone is also used.
The problem was the same: smartphone damage or signal loss that renders the system worthless.
IT2S ITS-G5, GPS, two radio frequency (RF) modules, a field programmable gate array, and
USB make up the software used. A DENM alert is sent to all nearby vehicles when an accident is
detected, along with SMS and voice calls to the emergency number.
24
They demonstrated this system using an Android smartphone, ODB-II data, and vehicular
communications, all of which were integrated with the e-Call platform. However, the biggest
issue faced was the same that is breakage of smartphone/loss of signal which renders the system
ineffective. Hossam M. Sherif, M. Amer Shedid, and Samah A. S. A. (2014, August) proposed a
solution in which the accident report is facilitated by three essential components, namely the
Node algorithm, Router algorithm, and Coordinator algorithm. The Real Time Traffic Accident
Detection System (RTTADS) can intelligently alert the accident site via a wireless interface
during a traffic accident. Additionally, it will alert the proper authorities.
It will not only inform you of the number of fatalities but also the nature of the emergency
services required. The system's hardware consists of RFID sensors, an RF module, a wireless
module, a crash sensor, a rollover sensor, a fire alarm sensor, a weight sensor, and a
microprocessor. The proposed system would be able to recognize an accident in real time and
notify the supervisory program of the accident site, vehicle speed (before the impact sensors are
activated), the number of passengers inside the car, the front, rear, right side, and left side crash
sensors that have been activated, the status of the rollover sensor, and the status of the fire alarm
sensor.
The rule-based system checks whether or not a 5-fire truck is needed, as well as the expected
number of ambulance cars needed for injured patients. We loved the idea of employing three
different algorithms to organize the transmission of a message, but a GPS and GSM module can
easily implement it, and false alarms can be prevented using modern technology like the
fingerprint sensor utilized in our proposed system. In order to enhance healthcare emergency
decision making, which is incredibly complicated and varied, Ms. Sharmila S. S. S. (2008, April)
suggests an agent-based paradigm.
It underlines the importance of deploying mobile agents rather than merely theories to assist in
the real-time deployment of an emergency service. A mobile agent is an autonomous program
that can move across network nodes totally under its own control while conveying the
information and execution status necessary to continue the execution process on the destination
host from where it left off on the source host. As a result, this agent decides when and where to
go as well as how to carry out the execution without continually consulting the user. In addition
to being mobile, they are also capable of dynamic and intelligent inference jobs throughout their
execution, making them a wonderful method in a variety of contexts, from military to
educational to circumstances requiring immediate medical assistance.
2.6 Types of Accident Detection System Based on Design
2.6.1 Sensor-Based Accident Detection Systems
Sensor-based accident detection systems use various types of sensors to detect accidents. These
sensors can be installed on vehicles, on the road infrastructure, or at the side of the road. The
sensors can detect sudden changes in speed, direction, or location, which may indicate the
occurrence of an accident. Common types of sensors used in accident detection systems include
accelerometers, gyroscopes, pressure sensors, and GPS sensors (Al-Azzawi et al., 2020).

25
One of the most well-known sensor-based accident detection systems is the OnStar system
developed by General Motors. The OnStar system uses sensors installed in the vehicle to detect
accidents and automatically alert emergency services (GM Authority, 2021). The sensors detect
sudden changes in speed, direction, or location, and the system uses this information to
determine whether an accident has occurred. If an accident is detected, the system automatically
alerts emergency services and provides them with the vehicle's location and other vital
information.
Another example of a sensor-based accident detection system is the iNEMO inertial module
developed by STMicroelectronics (2021). This system uses a combination of accelerometers,
gyroscopes, and magnetometers to detect the occurrence of an accident. The system can detect
changes in linear and angular acceleration, which may indicate the occurrence of an accident. If
an accident is detected, the system can send an alert to emergency services, providing them with
the location and other relevant information.
Sensor-based accident detection systems have several advantages. They can quickly detect
accidents, even if the driver is unconscious or unable to call for help. Additionally, they do not
require a direct line of sight to the accident, making them useful in urban areas or areas with
limited visibility. However, the effectiveness of sensor-based systems may depend on the quality
of the sensors and the accuracy of the detection algorithms.
2.6.2 Camera-Based Accident Detection Systems
Camera-based accident detection systems use cameras to detect accidents. These cameras can be
installed on vehicles, on the road infrastructure, or at the side of the road. The cameras capture
images or videos of the accident, and image processing algorithms are used to detect the
occurrence of an accident (Chen et al., 2018).
One example of a camera-based accident detection system is the Mobileye Shield+ system,
which uses a combination of cameras and algorithms to detect potential collisions in real-time
(Mobileye, 2021). The system can detect vehicles, pedestrians, and cyclists and can warn the
driver of potential collisions or take automatic action to avoid collisions.
Camera-based accident detection systems have several advantages. They can provide visual
evidence of the accident, which can be useful for insurance claims or legal proceedings.
Additionally, they can detect a wide range of potential collision scenarios, including those
involving pedestrians or cyclists. However, camera-based systems may be limited by visibility
and weather conditions, and they may require significant processing power to analyse the images
or videos. Below is a representation of the camera-based accident detection system.

26
Figure 4:On camera-based accident detection system
2.6.3 Machine Learning-Based Accident Detection Systems
Machine learning-based accident detection systems use data from various sources, such as
sensors, cameras, and GPS, to train machine learning algorithms to detect accidents. These
algorithms can detect patterns or anomalies in the data that may indicate the occurrence of an
accident. The accuracy of these systems can be improved with more data and better algorithms
(Liu et al., 2020).
One example of a machine learning-based accident detection system is the Smart Road Accident
Detection System (SRADS) developed by researchers at the University of Malaya (Soomro et al.,
2020). The SRADS uses data from GPS sensors, accelerometers, and machine learning
algorithms to detect accidents and alert emergency services. The system can detect different
types of accidents, including single-vehicle accidents, multi-vehicle accidents, and rollover
accidents.
Machine learning-based accident detection systems have several advantages. They can detect a
wide range of accident scenarios, including those that may be missed by other types of systems.
Additionally, they can adapt to changing road conditions and traffic patterns, improving their
accuracy over time. However, machine learning-based systems may require large amounts of
data to train the algorithms and may be prone to false alarms if the algorithms are not well-
trained.

27
Figure 5: On machine learning based accident detection system
2.6.4 Acoustic-Based Accident Detection Systems
Acoustic-based accident detection systems use microphones to detect the sound of an accident,
such as the sound of a collision or the sound of a vehicle skidding. These systems have been
shown to be effective in detecting accidents, particularly in noisy environments (Zhu et al., 2021).
One example of an acoustic-based accident detection system is the AcciMap system developed
by researchers at the University of California, Berkeley (Zhang et al., 2018). The system uses
microphones installed at the side of the road to detect the sound of accidents and alert emergency
services.
Acoustic-based accident detection systems have several advantages. They can be effective in
detecting accidents in noisy environments, such as city streets or highways. Additionally, they
can detect accidents even if there is no visible evidence of the accident. However, these systems
may require careful placement of the microphones to ensure that the sound of the accident is
captured accurately.

28
Figure 6: On acoustic based accident detection and alert system
2.6.5 Vibration-Based Accident Detection Systems
Vibration-based accident detection systems use sensors to detect the vibrations caused by an
accident. These sensors can be installed on vehicles or on the road infrastructure. The sensors
can detect sudden changes in vibration that may indicate the occurrence of an accident. One
example of a vibration-based accident detection system is the Vibration Analysis-based Accident
Detection System (VAADS) developed by researchers at the Indian Institute of Technology
Roorkee (Srinivasan et al., 2020). The system uses a combination of vibration sensors and
machine learning algorithms to detect accidents and alert emergency services.
Vibration-based accident detection systems have several advantages. They can detect accidents
even in low visibility conditions or when other types of sensors are not effective. Additionally,
they can detect accidents in real-time, providing rapid response times. However, these systems
may be prone to false alarms if the sensors are not well-calibrated or if the road surface is uneven.
2.7 Performance Evaluation Metrics
Performance evaluation metrics are essential in measuring the effectiveness of accident detection
systems. The metrics used to evaluate the performance of these systems can vary depending on
the type of system and the application. The most commonly used metrics include accuracy,
precision, and recall. In this section, we will discuss how these metrics can be used to evaluate
the effectiveness of accident detection systems.
2.7.1 Accuracy
Accuracy is a common metric used to evaluate the performance of accident detection systems. It
is defined as the fraction of correctly classified accidents out of the total number of accidents
detected. In other words, accuracy measures how well the system can classify accidents as either
true positives or true negatives. The formula for accuracy is as follows:
Accuracy = (TP + TN) / (TP + TN + FP + FN)

29
Where TP represents true positives (correctly detected accidents), TN represents true negatives
(correctly classified non-accidents), FP represents false positives (non-accidents classified as
accidents), and FN represents false negatives (accidents not detected by the system).
Accuracy is a useful metric for evaluating the overall effectiveness of an accident detection
system. However, it may not be the best metric to use if the number of accidents is significantly
lower than the number of non-accidents, as the system may achieve high accuracy by simply
classifying most observations as non-accidents.
2.7.2 Precision
Precision is another important metric used to evaluate the effectiveness of accident detection
systems. It is defined as the fraction of correctly detected accidents out of the total number of
accidents detected by the system. In other words, precision measures the ability of the system to
correctly identify accidents, without falsely classifying non-accidents as accidents. The formula
for precision is as follows:
Precision = TP / (TP + FP)
Where TP and FP are defined as before.
Precision is a critical metric for accident detection systems as it measures the system's ability to
minimize false alarms and false positives. False alarms can lead to unnecessary emergency
responses and increased costs, while false positives can reduce the system's reliability and
efficiency.
2.7.3 Recall
Recall is a metric that measures the system's ability to detect all actual accidents. It is defined as
the fraction of correctly detected accidents out of the total number of actual accidents. In other
words, recall measures the system's ability to detect all accidents, including those that may be
missed by other systems. The formula for recall is as follows:
Recall = TP / (TP + FN)
Where TP and FN are defined as before.
Recall is an important metric for accident detection systems as it measures the system's ability to
detect all accidents and minimize false negatives. False negatives can result in delayed
emergency responses and can increase the risk of further accidents and injuries.
2.7.4 F1 Score
The F1 score is a metric that combines precision and recall into a single value. It is defined as the
harmonic mean of precision and recall, and provides a balance between the two metrics. The F1
score can be calculated using the following formula:
F1 score = 2 * (precision * recall) / (precision + recall)
The F1 score is a useful metric for accident detection systems as it provides a single value that
summarizes the system's performance in terms of both precision and recall.

30
2.7.5 Receiver Operating Characteristic (ROC) Curve
The ROC curve is a graphical representation of the performance of a binary classifier (such as an
accident detection system) as the discrimination threshold is varied. The ROC curve plots the
true positive rate (TPR) against the false positive rate (FPR) for different threshold values. The
TPR is the fraction of correctly detected accidents out of the total number of actual accidents,
while the FPR is the fraction of non-accidents that are incorrectly classified as accidents. The
area under the ROC curve (AUC) is a useful metric that measures the overall performance of the
system across different threshold values. The AUC ranges from 0 to 1, with a value of 0.5
indicating random classification and a value of 1 indicating perfect classification.
2.7.6 Mean Time to Detect (MTTD)
The mean time to detect (MTTD) is a metric that measures the average time taken by the system
to detect an accident. It is an important metric for accident detection systems as it measures the
system's ability to provide rapid response times. The MTTD can be calculated as follows:
MTTD = (t1 + t2 + ... + tn) / n
where t1, t2, ..., tn are the times taken by the system to detect each of the n accidents.
2.7.7 Mean Time Between Failures (MTBF)
The mean time between failures (MTBF) is a metric that measures the average time between
system failures. It is an important metric for accident detection systems as it measures the
system's reliability. The MTBF can be calculated as follows:
MTBF = T / N
where T is the total time of operation and N is the number of failures during that time.
2.8 Challenges and Limitations
Implementing an accident detection system can present several challenges and limitations that
need to be addressed to ensure the system's effectiveness and reliability. These challenges and
limitations can range from technical issues to ethical concerns. In this section, we will discuss
some of the challenges and limitations associated with implementing an accident detection
system.
2.8.1 Data Privacy
One of the main challenges associated with implementing an accident detection system is data
privacy. The system requires access to a significant amount of data to effectively detect accidents
and respond promptly. This data can include location data, vehicle information, and other
personal information, which raises concerns about data privacy and security. Collecting and
processing this data can pose a significant risk to individuals' privacy if not handled
appropriately. To address these concerns, it is essential to implement appropriate data privacy
and security measures to protect individuals' personal information. These measures can include
data anonymization, data encryption, and data access controls to ensure that only authorized
personnel have access to sensitive data.

31
2.8.2 System Reliability
Another critical challenge associated with implementing an accident detection system is system
reliability. The system must be reliable and operate consistently to ensure that accidents are
detected promptly and emergency services are notified as quickly as possible. A system failure
or malfunction can lead to delayed responses and potentially catastrophic consequences. To
ensure system reliability, it is essential to implement appropriate testing and validation
procedures to identify and address potential issues before the system is deployed. These
procedures can include rigorous testing and evaluation of the system's hardware and software
components, as well as continuous monitoring and maintenance to identify and address any
issues that arise during operation.
2.8.3 False Alarms
False alarms are a significant limitation of accident detection systems and can lead to
unnecessary emergency responses and increased costs. False alarms can occur due to various
factors, including environmental factors, system errors, and user errors. For example, a sudden
change in weather conditions, such as heavy rain or fog, may trigger false alarms, even if there is
no actual accident. To mitigate the risk of false alarms, it is essential to implement appropriate
algorithms and machine learning techniques to accurately identify and distinguish between actual
accidents and other events that may trigger false alarms. Additionally, it is essential to provide
appropriate training to system operators and emergency responders to help them distinguish
between actual accidents and false alarms.
2.8.4 Limited Coverage
Another limitation of accident detection systems is limited coverage. These systems typically
rely on sensors and other devices to detect accidents, which can limit their coverage to certain
areas or roadways. This can be a significant limitation in rural or remote areas, where there may
be limited access to technology and infrastructure. To address this limitation, it is essential to
explore alternative technologies and approaches, such as satellite-based systems and mobile
applications, that can expand the system's coverage and provide more comprehensive accident
detection capabilities.

2.8.5 High Cost


The cost of implementing an accident detection system can be a significant barrier to adoption,
especially for smaller organizations or communities. The cost of hardware, software, and
maintenance can be substantial, and there may be additional costs associated with data
processing and analysis. These costs can limit the accessibility and scalability of accident
detection systems, making it difficult to implement them on a broad scale. To address this
challenge, it is essential to explore cost-effective approaches to implementing accident detection
systems. These approaches may include leveraging existing infrastructure and technologies, such
as mobile applications and cloud computing, to reduce hardware and software costs. Additionally,

32
partnerships and collaborations between public and private organizations can help to share costs
and resources, making accident detection systems more accessible and scalable.
2.8.6 Ethical and Legal Concerns
Implementing an accident detection system also raises ethical and legal concerns related to
privacy, data ownership, and liability. For example, who owns the data collected by the system,
and how is it used and shared? What are the legal implications of false alarms or delayed
responses? Addressing these concerns requires careful consideration of legal and regulatory
frameworks, as well as ethical principles and best practices. To address these concerns, it is
essential to establish clear policies and guidelines for data collection, storage, and usage.
Additionally, it is important to establish appropriate legal and regulatory frameworks to govern
the use of accident detection systems, including liability and responsibility for false alarms or
delayed responses.
2.8.7 Human Factors
Finally, human factors can also present a significant challenge when implementing an accident
detection system. These systems rely on human operators and emergency responders to interpret
and respond to alerts generated by the system. Human error or misinterpretation can lead to
delayed responses or incorrect actions, which can have significant consequences. To address
these challenges, it is essential to provide appropriate training and support to system operators
and emergency responders. This training should include clear guidelines and procedures for
responding to alerts generated by the system, as well as appropriate communication channels to
ensure that information is transmitted accurately and efficiently.
2.9 Conclusion
Accident detection systems are designed to detect accidents and alert emergency services to
respond quickly to the scene of the accident. These systems are crucial in reducing the number of
fatalities and injuries resulting from road accidents. Over the years, researchers have developed
various accident detection systems that use different sensors and algorithms to detect accidents.
However, despite the progress made in this area, there are still gaps in the research that need to
be addressed. One of the gaps in the research on accident detection systems is the lack of
standardization in the sensors and algorithms used.
There is no standard sensor or algorithm that can be used universally for accident detection
systems. This makes it difficult to compare the performance of different accident detection
systems and determine which one is more effective. Standardization of sensors and algorithms
would make it easier to compare different systems and determine which one is best suited for a
particular application. Another gap in the research on accident detection systems is the lack of
real-world testing. Most studies on accident detection systems are conducted in controlled
environments such as laboratories or simulations.
While these studies provide useful insights into the performance of different systems, they do not
reflect the real-world conditions in which these systems will be used. Real-world testing would
provide more accurate data on the performance of accident detection systems and their
effectiveness in reducing the number of fatalities and injuries resulting from road accidents.
33
Furthermore, there is a lack of research on the integration of accident detection systems with
other technologies such as autonomous vehicles and smart transportation systems. The
integration of accident detection systems with these technologies would enhance their
effectiveness in preventing accidents and reducing the severity of injuries resulting from
accidents.
For example, an accident detection system integrated with an autonomous vehicle could
automatically take control of the vehicle and bring it to a safe stop in the event of an accident.
Another gap in the research on accident detection systems is the lack of consideration for human
factors. Human factors such as driver behaviour, fatigue, distraction, and impairment can
significantly affect the performance of accident detection systems. Therefore, it is important to
consider human factors in the design and development of these systems to ensure that they are
effective in real-world conditions. In addition, there is a lack of research on the effectiveness of
accident detection systems in different weather and lighting conditions.
Most studies on accident detection systems are conducted under ideal weather and lighting
conditions. However, accidents can occur in various weather and lighting conditions, and it is
important to determine the effectiveness of these systems in such conditions. Finally, there is a
lack of research on the cost-effectiveness of accident detection systems. While these systems are
effective in reducing the number of fatalities and injuries resulting from road accidents, they can
be expensive to install and maintain. Therefore, it is important to determine the cost-
effectiveness of these systems and their return on investment.
In conclusion, while significant progress has been made in the development of accident detection
systems, there are still gaps in the research that need to be addressed. These gaps include the lack
of standardization in sensors and algorithms, the lack of real-world testing, the lack of research
on the integration with other technologies, the lack of consideration for human factors, the lack
of research on effectiveness in different weather and lighting conditions, and the lack of research
on cost-effectiveness. Addressing these gaps would enhance the effectiveness of accident
detection systems and contribute to reducing the number of fatalities and injuries resulting from
road accidents.

34
CHAPTER III
3.1 Introduction

Figure 7: VDI 22O6 design methodology (Schramm, 2012)

This chapter describes the procedures taken to build a design that best fits the objectives
specified. To build an accident detection and alert system, a multidisciplinary approach
combining mechanical engineering, electrical engineering, and information technology was
necessary. As a result, it was necessary to develop a practical guideline for the systematic design
of such an automated system. The researcher employed the VDI2206 guideline, "Design
methodology for mechatronic systems," as the cross-domain technique in this project. The entire
design process is simplified and logically organized, allowing for the recovery of unavoidable
defects. The VDI2206 approach's solution is claimed to be more likely to be both economically
and technically sound (Motte, Damien, 2015). This methodology was specifically linked to the
project's goal of making it easier to locate the optimal and best solution by conducting a
complete and exhaustive search in a structured and systematic manner. In today's world, with the
increase in the number of vehicles on the road, accidents have become a major concern. These
incidents often result in severe injuries and even the loss of lives. With the proliferation of
Internet of Things (IoT) devices, it is now possible to develop a system that detects and alerts to
accidents in real-time. Such systems would not only help reduce response times but also save
lives. This paper presents an IoT-based accident detection and alert system methodology that
utilizes various sensors and communication technologies to detect and alert accidents.

The proposed system can be installed in any vehicle and can continuously monitor the
surroundings for potential accidents. Once an accident is detected, the system automatically
sends an alert to the emergency services and the concerned people, providing them with the
35
location of the incident. This paper presents the design, implementation, and testing of the
proposed system, along with the results obtained. The system's effectiveness is further evaluated,
and its potential applications and limitations are also discussed. The methodology begins with a
list of user and system requirements, from which the system is developed to meet the specified
objectives (goals). The design shows the mechanical, electronic, and information technology
domains. The V model is depicted in the figure above. These engineering design processes
include, but are not limited to, goal and standard setting, synthesis, analysis, construction, testing,
and evaluation. Compare the evaluation results to see if the system's requirements and objectives
were met. The entire design process is reduced to a rational and understandable exercise that
allows for the recovery of unavoidable faults. The body of this approach consists of the user
requirements, system requirements, conceptual design, and finally the detailed design. The
model leaves room for iterations between every step, making the problem-solving process
recursive in nature.

3.2 System Design Process

During the system design stage, efforts were focused on creating the cross-domain solution
design, which defines the basic physical and logical properties of the robotic system. The
system's overall function was divided into sub-functions, each of which was assigned appropriate
operating principles and/or solution elements to perform the functions in the context of the
overall system. The phases of requirements design, functional design, principle design, and
finally architectural design were followed to arrive at the principle solution.

3.3 Design Requirements

The requirements or needs design process involves developing requirements for the accident
detection and alarm system, and these requirements provide basic information about what is
required to make this system a reality. Requirements are one or more properties or behaviors of a
system that must always be met. Some of the requirements were discovered from an assessment
of current state-of-the-art traffic light management systems. The requirements design is built
using Pahl and Beitz's (Pahl, 2007) requirements checklist and defined classifications such as
geometry, energy, material, ergonomics, and so on. The requirements were refined even more.
Other criteria emerged as a result of the further development of one of the demands. Each
subsystem (or component), the overall system, and the link between two subsystems were all
subject to the standards. They were then further subdivided into requirements, resulting in a
requirement hierarchy. This aids in the formulation and clarification of design tasks as well as
the verification and validation of the design. Based on the narrative needs, a preliminary
requirements list was created. An accident detection and alert system that continuously analyzes
vehicle conditions and is accurate, dependable, and capable of sending real-time alerts is
required. It should be scalable, flexible, and user-friendly, with minimal power consumption and
the capacity to interface with emergency services.

36
3.4 System requirements

The system requirements for an accident detection and alert system can vary depending on the
specific implementation and the desired functionality. However, here are the requirements for the
system:

 Sensors: The system needs to have sensors that can detect an accident. Examples of sensors
that can be used include accelerometers, gyroscopes, and GPS sensors.

 Communication Interface: The system needs to be able to communicate with a central server
or emergency response team. This can be done using wireless technologies such as Wi-Fi,
cellular network, or satellite communication.
 Power supply: The system needs a reliable power source to function properly. This can be
achieved using a rechargeable battery or by connecting the system to the vehicle's power
supply.
 Processing power: The system needs to be able to process the sensor data and make a
decision about whether an accident has occurred. This can be achieved using a
microcontroller or a small computer such as a Raspberry Pi.
 Alert mechanism: The system needs to have an alert mechanism that can notify the driver,
passengers, or emergency response team about the accident. This can be achieved using
visual or auditory alerts.
 Data storage: The system needs to be able to store the sensor data for later analysis. This can
be achieved using a local storage device or by uploading the data to a cloud storage service.
 Robustness and reliability: The system needs to be designed to operate under different
environmental conditions and be resilient to failures or malfunctions.
 Integration: The system should be designed to integrate with the vehicle's existing systems,
such as the airbag deployment system, to improve the accuracy of accident detection.
 Accuracy and speed: The system needs to be able to accurately detect accidents and alert
emergency services quickly to minimize response time.
 User interface: The system should have a user-friendly interface that allows the driver to
easily understand the system's status and operation.
 Regulation compliance: The system should comply with relevant safety regulations and
standards, such as those set by the ZINARA (Zimbabwe National Road Administration.
 Data privacy and security: The system should be designed to protect the privacy and security
of the data it collects, processes, and transmits.
 Integration with emergency services: The system should be able to integrate with emergency
services, such as 911 /211or emergency response teams, to facilitate a quick response.

37
System Requirements
Abbreviation Requirements
R1 The system should accurately monitor vehicle speed, trajectory, brake
pressure, fuel level, blind spot indications and other relevant parameters.
R2 The system should be able to detect potential accident situations based on
changes in these parameters and provide alerts to the driver.
R3 The system should minimize power consumption to extend battery life.
R4 The system should integrate easily with existing vehicle sensors, controllers
and displays.
R5 The system should provide real-time alerts and warnings to the driver about
potential accident risks.
R6 Regular health checks and calibrations of sensors should be performed to
ensure proper system operation.
R7 Standard automotive communication protocols should be used to interface
with vehicle subsystems. Protocols with error detection must be implemented.
R8 The system components should be easy for vehicle mechanics and
technicians to maintain and repair.
R9 The system interface and controls should be intuitive and easy for drivers to
understand and use.
Table 2: System Requirements

3.4.1 System Checklist


Checklists are essential in ensuring the proper functioning and reliability of an accident detection
system. They provide a structured approach to verifying that all components and functionalities
of the system are working correctly. The use of checklists can help prevent accidents caused by
human error, as they serve as a guide for the proper operation and maintenance of the system.
Additionally, checklists can help identify potential issues or defects in the system, allowing for
timely repairs and preventing the system from malfunctioning during critical moments. A
checklist also ensures consistency in the system's operation and maintenance, especially in cases

38
where multiple personnel are involved in the process. Overall, the use of a checklist is a simple
yet effective way to improve the safety and reliability of an accident detection system.

HEADING ABBRV. DESCRIPTION

1. Operability 1C 1. The accident detection system can detect accidents and


alert the necessary personnel of the magnitude of the
danger

2. Power 2C 2. The system is energy-efficient, with a minimum


efficiency rating of 75%.

3. Substance 3C 3. The system is made of corrosion-resistant and


waterproof materials to withstand harsh underwater
conditions.
4. Hazard 4C 4. The wiring is properly insulated and fixed to avoid
control sparking, ensuring safety during operation.
5. Throughput 5C 5. The system can be produced in large quantities without
compromising on quality.
6. Inspection 6C 6. The system requires regular maintenance to ensure
proper functioning.
7. Ergonomics 7C 7. The system components are easy to assemble and
integrate with different AUV designs and operating
systems.
8. Fabrication 8C 8. The system has an easy-to-use interface for
controlling.
9. Expense 9C 9. The system is easy to clean and maintain, with all parts
accessible for cleaning or repairing.
10. Upkeep 10C 10. The system is affordable, with low design,
operational, and maintenance costs.
11. Plan 11C 11. The design schedule is designed to meet the deadline
for timely deployment.

39
Table 3: System Checklist

40
3.4.2 Incident Matrix for List of Requirements
An incident matrix is a vital tool in the development of an accident detection system as it helps to
identify potential failure modes and their corresponding effects. It maps out the relationships
between the system requirements, potential failure modes, and their associated effects, allowing
for a comprehensive evaluation of the system's safety and reliability. By creating an incident
matrix, the system's developers can identify possible failure modes and take measures to mitigate
them before the system is deployed. This helps to ensure that the system meets the required
safety standards and reduces the risk of accidents occurring. The incident matrix also helps to
ensure that all requirements are met, and any potential effects of a failure are considered,
ensuring that the system functions as intended. In summary, an incident matrix is an essential
tool in developing a safe and reliable accident detection system that meets all of the required
safety standards.

R1 R2 R3 R4 R5 R6 R7 R8 R9

Operability 1C X X X X X

Power 2C X

Substance 3C

Hazard control 4C X

Throughput 5C

Inspection 6C X X

Ergonomics 7C X

Fabrication 8C X X X

Expense 9C X

Upkeep 10C X

Plan 11C

Table 4: Incident Matrix for List of Requirements

41
START

Initialize

Read sensor data

Analyze sensors data

Yes

Accident detected
Sudden
change in
velocity

No

Yes

Vibration Accident detected


> than
threshold

No

Yes
Flame
Accident
detected
detected

No

yes
No Change

In Accident detected
orientatio
n

Figure 8: Flow Chart of the Accident Detection System

42
3.5 System Development (Conceptual Design.)
The design process stage where the fundamental solution route is laid out using the elaboration
of the solution principle is known as conceptual design. (Pahl, 2007). The principle solution is
developed through:
• Using abstraction to identify significant challenges
• Creating function structures
• Looking for acceptable working principles
• Combining the above into working structures. As a result, the primary solution is defined in the
diagram below depicts the processes involved in developing the conceptual design.

Figure 9:Steps taken to come up with the principal solution

3.6 Abstraction-Based Identification of Essential Problems


Abstraction-based identification of essential problems involves identifying the key challenges
and issues that need to be addressed in developing an accident detection and alert system. Here
are some essential problems that need to be addressed:
Sensor Selection: Choosing the right sensors that can accurately detect accidents and
distinguish them from other events can be a challenge. Different types of sensors have different
43
strengths and weaknesses, and the selection of sensors should be tailored to the specific use case
and environment.
Data Processing: The system needs to process large amounts of data in real-time to detect
accidents and send alerts. This requires efficient algorithms and software that can analyze the
data quickly and accurately.
Alert Mechanism: The system needs to send alerts to emergency services or designated
contacts in a timely and reliable manner. This requires a robust communication mechanism such
as a GSM or Wi-Fi module and a reliable power supply.
False Alarms: False alarms can be a significant problem, leading to unnecessary alerts and
potentially wasting valuable resources. The system should be able to distinguish between real
accidents and false alarms, and minimize false alarms as much as possible.
3.7 Functional Analysis of the System
The functional analysis or functional decomposition was used in this project as a framework for
describing the system and ensuring that all of the essential components were shown in context.
Through assigning specific elements to a number of interacting sub-functions, the overall
function of the accident detection and alert system was realized. Under the functional
decomposition method, any human-made technological product, regardless of its degree of
complexity, is considered a technical system (Pahl, 2007). The technological system's scope as
well as its location are defined by the system boundary.

Figure 10:Flow chart diagram for functional analysis

44
The flowchart for the suggested functional analysis approach is shown in Figure 3.4, which
depicts all of the activities and how they are connected. The functional tree/hierarchy was
created using the functional criteria listed above, and the components/ functions matrix was
created using the fundamental components of the product tree. The major outputs are the
functional tree and product tree, while the functional block is the secondary output.
3.8 Functional Tree
The product being developed using the functional view is represented by the tree in figure 3.5.
The high-level functions are divided into lower-level functions in this tree, enabling
identification of the basic operations that the future product must perform
A functional tree diagram is a graphical representation of the functions and sub-functions of a
system. Here is an example of a functional tree diagram for an accident detection and alert
system:

Accident detection and alert system

User Intergration with Detect accident


Alert user Power
interface management emergency
services

Display Analyse sensor


data data

Collect
Acquire sensor
sensor
data
data
Generate Transmit
alert alert Filter sensor
data

Calibrate Configure Select


sensor system sensor

Table 1: The component tree diagram

45
The function tree diagram helps designers and developers understand the functions and sub-
functions required to implement the system. It can also help identify potential areas for
optimization or improvement in the system. By using a function tree diagram, designers and
developers can create a clear and comprehensive plan for implementing the system that meets the
needs of the end-users
3.8.1 The Component Tree Diagram
In the design and development perspective, the component tree illustrates the hierarchical
connections among all components that make up the subsystems, and the entire system. A
component tree diagram is a visual representation of the hardware and software components that
make up a system. Here is a component tree diagram for an accident detection and alert system:

Accident detection and alert system

Hardware Software

Alert
triggering User
interface

Communication User
module Sensors interface
Signal data
acquisition
Signal
Power
processin
managemen g
t
-Accelerometer Integration
-Display with
-Gps module -Gps module emergency
-Buttons vehicle
-GSM module -Tilt sensor
-buzzer
-Flame sensor

Figure 11: The Component Tree Diagram

46
The component tree diagram shows the hardware and software components that make up the
accident detection and alert system. The top level of the diagram is the system itself, and it is
divided into two main categories: hardware components and software components. The
component tree diagram can help designers and developers understand the hardware and
software components required to implement the system. It can also help identify potential areas
for optimization or improvement in the system.

System Block Diagram


The system block diagram was developed using the connection matrix and product tree, which
could easily be converted into the physical block diagram. Figure 3.9 shows the system block
diagram, which illustrates the simple connections anticipated between the various subsystems
that make up the automated control system being designed.

47
LCD Buzzer

Gps Push button


module

Flame Microcontroller
sensor Tilt sensor

Vibration
sensor Accelerometer

GSM Power
module supply

Figure 12:The system block diagram

The block diagram shows the major components of the accident detection and alert system and
their interrelationships. The top level of the diagram is the system itself, and it is divided into six
main components: sensor data acquisition, signal processing, alert triggering, user interface,
power management, and integration with emergency services. Sensor data acquisition is
responsible for acquiring data from various sensors, such as accelerometers, gyroscopes, and
GPS modules. Signal processing is responsible for analysing and filtering the sensor data to
detect potential accidents. Alert triggering is responsible for generating and transmitting alerts to
the user interface. The user interface provides a way for users to configure the system and view
alerts. Power management is responsible for managing the power consumption of the system.
Integration with emergency services allows the system to communicate with emergency services
in case of an accident. The block diagram shows the interrelationships between these
components. Sensor data acquisition and signal processing work together to detect potential
48
accidents. Alert triggering depends on the output of signal processing to generate alerts, and the
user interface depends on the alerts generated by alert triggering to display them to the user.
Power management is responsible for managing the power consumption of the entire system,
while integration with emergency services allows the system to communicate with emergency
services in case of an accident. Overall, the block diagram can help designers and developers
understand the major components of the system and their interrelationships. It can also help
identify potential areas for optimization or improvement in the system. By using a block diagram,
designers and developers can create a comprehensive plan for implementing the system that
meets the needs of the end-users.
3.9 Scope of the Design
In the design of accident detection and alert system more research was done in order to come up
with a functional system. The research covered many types of sensors like tilt sensor, vibration
sensor, flame sensor, accelerometer sensor and comparison of these different types of sensors
was made in order to select the most affordable and efficient sensors. Also the study of
microcontrollers to select the right one and how to interface it with other different peripherals
which includes LCD, Push button, GPS module and GSM module.
3.10 DOMAIN SPECIFIC DESIGNS
The design process was subdivided into 3 subdomains in this case which are
 Electrical engineering domain
 Electronic engineering domain
 Mechanical engineering domain

3.10.1 POSSIBLE SOLUTIONS


Concept one: Single Sensor
- Only use one sensor to collect all the necessary data for the project.
Pros: Simple and inexpensive.
Cons: May not provide enough accuracy or coverage, limited to measurements from one location.
Concept two: Multiple Sensors
- Use multiple sensors distributed in appropriate locations to collect data.
Pros: Can provide more accurate and complete measurements by having sensors in multiple
places.
Cons: More complex wiring and data management, higher cost due to using multiple sensors.
Concept three: Wearable Device
- Design a device that users can wear which contains all the necessary sensors.
Pros: Convenient for users, sensors move with the user.
Cons: More complex design, may be uncomfortable to wear, higher cost.
49
3.10.2 Chosen Solution
The chosen solution was multiple sensors:
By using multiple sensors distributed in relevant locations, we are able to measure different
aspects of the system from multiple viewpoints, providing more accurate and complete data than
a single sensor could offer. Though more complex, the benefits of having targeted measurements
from multiple locations outweighed the drawbacks for our project.
The key reasons for choosing this solution were:
 Needed measurements from multiple points in the system that a single sensor could not
provide
 Increased accuracy of measurements by collecting data from locations where specific
phenomena occur
 Ability to cross-reference data from different sensors to identify anomalies or errors
3.11 DEVELOPMENT OF CHOSEN SOLUTION
VDI 2206 methodology is now used to allow for a simultaneous development of the system as a
whole encompassing its mechanical domain, the electrical and electronics domain as well as the
information technology domain. Information from the previous chapters with the original
objectives were also used to come up with a principal solution.

3.11.1 Mechanical Domain


The following are the main things within the mechanical domain of our multiple sensor solution:
1. The sensor housings - The protective casings and mounts for the individual sensors. This
includes things like:
 Enclosures to protect the sensors from environmental factors
 Mounting brackets or stands to secure the sensors in place
 Connectors and wiring to interface with the electrical components
Below is a solid works drawing of a sample black box casing for storing data of the crash,
including some of the electronics components used in the detection and alert of an accident.

50
Figure 13: On A sample black box for safe keeping the electronics hardware
2. Sensor placement - The specific locations where the sensors are installed. This involves:
 Determining the optimal positions for the sensors to accurately measure the necessary
data
 Mechanically securing the sensors in those positions
3. Motion and moving parts - If any of the sensors need to move or rotate to obtain
measurements. This may require:
 Gears or linkages to enable the motion
 Motors or actuators to provide the motive power
 Bearings, slides, and pivots for low friction movement
4. Structures - Any mechanical structures that the sensors mount to. This could be:
 Parts of the system being monitored
 Dedicated sensor platforms or frames
5. Force and pressure sensors - For measuring mechanical forces and pressures. These sensors
will:
 Convert the mechanical input into an electrical signal
 Require a method of applying the force or pressure input
6. Vibration sensors - For measuring vibration levels. These will also:
 Convert mechanical vibrations into an electrical signal
51
 Be securely mounted to pick up vibration from the system
7. Environmental protection - Shielding, potting compounds, etc. to protect sensors from:
 Moisture
 Chemical exposure
 Extreme temperatures
These are the main mechanical considerations for our solution utilizing multiple sensors. The
mechanical domain mostly deals with how the sensors are housed, placed, and interface with the
system being monitored.
3.11.2 Electrical Domain
1. Different sensor types - There will likely be different types of sensors measuring different
physical quantities:
 Temperature sensors - Give an output voltage proportional to temperature
 Force sensors - Give an output voltage proportional to the applied force
 Pressure sensors - Output a voltage based on the measured pressure
 Accelerometers - Output an analog voltage based on acceleration
Each sensor will have different electrical characteristics and output requirements.
2. Amplification - The sensor outputs may need to be amplified to be read by data acquisition
systems. This requires:
 Selecting appropriate amplifier gain for each sensor
 Providing a power supply for the amplifiers
 Considering amplifier noise and bandwidth requirements
3. Signal conditioning - The raw sensor outputs may need to be conditioned through:
 Filters to remove noise
 Adjusting the voltage levels
 Isolation amplifiers for safety
4. Data acquisition - An ADC (analog to digital converter) will be needed to:
 Sample the analog sensor outputs
 Convert to digital values for processing
 Calculate the sampling rate based on sensor response times and required accuracy
5. Wiring - Individual wires will need to connect:
 Each sensor to its associated amplifier/conditioner
 The amplifiers/conditioners to the data acquisition system
 Any required power and ground connections
6. Cable Routing - The sensor wires will need to be:
52
 Organized and secured to avoid noise and interference
 Routed to avoid moving parts, heat sources, and chemical exposure
7. Data transmission - The digital data from the DAQ will need to be transmitted to:
 A data processing/analysis system wirelessly or over a wired connection
 The required bandwidth can be calculated based on the sampling rate and bit depth
8. Power Supply
A power supply management system for an accident detection system is responsible for
managing the power supply to ensure that the system components receive the necessary power
while minimizing power consumption and ensuring the reliability and safety of the system. By
considering the power requirements, power source, voltage regulation, power management
techniques, monitoring and control mechanisms, protection mechanisms, energy harvesting, user
interface, environmental considerations, and safety standards, designers can create a
comprehensive power supply management system that meets the needs of the end-users.
Power management techniques: Implementing power management techniques such as sleep
modes, duty cycling, and voltage scaling can help minimize power consumption when the
system is not in use or when the system is operating at a lower power level. For example, sensors
can be put into sleep mode when not in use, or the micro-controller can operate at a lower clock
frequency to reduce power consumption.
Power source: The power source chosen for the system have a significant impact on the power
supply management system. For example, in our system batteries are used, the power supply
management system may need to include mechanisms to monitor the remaining battery life and
adjust the power management settings accordingly.
Protection mechanisms: Implementing protection mechanisms such as fuses, or over voltage
protection devices can prevent damage to the system components from over voltage, under
voltage, or short circuits.
Environmental considerations: The power supply management system should be designed to
operate in the environmental conditions that the accident detection system will be exposed to,
such as temperature, humidity, and vibration. This can be achieved by using components that are
rated for the appropriate environmental conditions or by including mechanisms such as heat
sinks or fans to dissipate heat.
Safety standards: Ensuring that the power supply management system meets all relevant safety
standards is critical to ensure the safety of the end-users. Designers should consider safety
standards such as IEC 60601 for medical devices or UL 60950 for information technology
equipment when designing the power supply management system.
Energy harvesting: Energy harvesting techniques can be used to generate power from ambient
sources such as light, heat, or motion. This can help extend battery life or reduce the need for

53
3.12 Electronics Domain: Sensors Used
The Arduino Mega is an important component in an accident detection system because it
provides a powerful and flexible platform for controlling and monitoring the system's sensors,
actuators, and communication modules. The Mega is equipped with a wide range of digital and
analog input/output pins, which can be used to interface with various sensors such as
accelerometers, gyroscopes, and GPS modules to detect and measure the impact forces,
orientation, and location of the vehicle during an accident. Additionally, the Mega has multiple
communication interfaces such as USB, UART, SPI, and I2C, which can be used to transmit data
to other devices, such as a central monitoring system or emergency services. The Mega's large
memory and processing capabilities also allow for the implementation of complex algorithms for
real-time signal processing, data fusion, and decision-making, which are essential for accurate
and reliable accident detection and response. Overall, the Arduino Mega is a valuable tool for
building a robust and efficient accident detection system.

Figure 14: Arduino Mega

When an accident is detected by any of the four sensors, an interrupt is triggered. An interrupt
can be triggered to alert the system that an event has occurred. The interrupt can be used to
immediately stop any ongoing processes and start the accident detection and alert system. In
embedded systems, an interrupt is a signal that is sent to the processor to indicate that an event
has occurred and requires immediate attention. When an interrupt is triggered, the processor
stops executing the current process and starts executing the interrupt service routine (ISR)
associated with the interrupt. In the case of an accident detection system, the ISR could be
responsible for analyzing the sensor data, determining the severity of the accident, and triggering
appropriate actions such as sounding an alarm, sending a message to emergency services, or
notifying designated contacts. By using interrupts to trigger the accident detection and alert
system, the response time can be reduced, improving the chances of minimizing damage or
preventing further harm.
54
Figure 15: Accelerometer

Accelerometers: Accelerometers measure changes in velocity or acceleration and are commonly


used in airbag systems to detect a crash and deploy the airbags. They can also be used in accident
detection systems to detect sudden changes in motion that could indicate a crash.

Figure 16: Tilt Sensor

55
Tilt sensor: Tilt sensor measure changes in orientation and can be used to detect rollovers.

Figure 17: GPS Module

GPS: GPS can be used to detect sudden changes in speed or direction that could indicate a crash.
GPS can also be used to track the location of the vehicle and provide that information to
emergency services in the event

Figure 18: Flame Sensor


56
Flame sensor is a sensor that is used to detect the presence of a flame. It is typically used in
industrial applications to monitor furnaces, boilers, and other equipment that uses a flame as a
heat source. The sensor works by detecting the infrared radiation emitted by the flame. In the
context of an accident detection and alert system, a flame sensor may not be directly relevant, as
it is primarily used to detect flames and not accidents. However, if a fire were to break out as a
result of an accident, a flame sensor could be used to detect the fire and trigger appropriate
actions such as sounding an alarm, activating a fire suppression system, or notifying emergency
services. It's worth noting that in the event of an accident, the priority is to detect the accident
and provide assistance to those involved. Once the immediate danger has passed, measures can
be taken to prevent or mitigate secondary hazards such as fires. In this sense, a flame sensor
could be a useful addition to an accident detection and alert system as part of a broader safety
strategy.t of an accident.

Figure 19: Vibration Sensor

Vibration sensor: A vibration sensor is a sensor that is used to detect mechanical vibrations,
such as those caused by moving machinery or structural vibrations. It can be used to monitor the
health of equipment, detect malfunctions or abnormal behavior, and provide early warning of
potential failures. In the context of an accident detection and alert system, a vibration sensor
could be used to detect the impact of a collision or the sudden and abnormal movement of a
vehicle. The sensor could be installed in the chassis or body of the vehicle and would detect the
vibrations caused by a collision or sudden movement. The vibration sensor data could then be

57
analyzed to determine if an accident has occurred and trigger appropriate actions such as
sounding an alarm, sending a message to emergency services, or notifying designated contacts.

Figure 20: Push Button

Push button: A push button can be used in an accident alert system as a manual trigger for the
alert. The push button can be located within reach of the driver or passengers and can be used to
manually trigger the alert in the event of an accident or emergency. The push button provides an
additional layer of safety and security by providing a manual trigger for the accident alert system.
In the event that the sensors do not detect an accident, or if the driver or passengers are unable to
trigger the alert through other means, the push button provides a failsafe option to ensure that
help can be summoned in the event of an emergency. Different sensors are combined to improve
the accuracy of the accident detection system. For example, a combination of accelerometers,
GPS, and cameras can provide a more comprehensive view of the situation and improve the
accuracy of accident detection. Ultimately, the choice of sensor(s) will depend on the specific
requirements of the system, the application, and the level of accuracy needed.

Figure 21: Buzzer

58
A buzzer is an essential component in many electronic systems because it provides audible
feedback for various events, alerts, and warnings. In an accident detection system, a buzzer can
be used to signal the driver and passengers of the vehicle when a crash is detected, prompting
them to take immediate action or brace for impact. The buzzer can also be used to alert
emergency services or other vehicles in the vicinity of the accident, increasing the chances of a
timely response and reducing the risk of further collisions. Furthermore, the tone, frequency, and
duration of the buzzer signal can convey important information about the severity and type of the
accident, aiding in the triage and treatment of the injured. Overall, a buzzer is a simple yet
effective tool for enhancing the safety and functionality of an accident detection system.

Figure 22: 12C LCD Display

12C LCD display is a valuable tool in an engineering research project because it provides a
convenient and interactive way to visualize and analyze data in real-time. The display can be
used to show various parameters such as temperature, pressure, voltage, and current, allowing
the researcher to monitor and control the system's performance. Additionally, the LCD display
can be used to display graphs, charts, and other visualizations, which can help the researcher to
identify trends, patterns, and anomalies in the data. The display can also be used to provide
feedback and instructions to the user, simplifying the operation of the system. Overall, a 12C
LCD display is a versatile and user-friendly interface that can enhance the accuracy, efficiency,
and usability of an engineering research project.

59
Figure 23: GSM Module (Sim 900)

Communication using a SIM 900 GSM module is an important aspect of many research projects
because it enables remote monitoring and control of the system, data acquisition, and
collaboration with other researchers. The GSM module provides a reliable and secure connection
to the internet or a cellular network, allowing real-time transmission of data, commands, and
alerts. This can be particularly useful in remote or hazardous environments where direct access
to the system is limited or unsafe. The module can also be used to send SMS messages or make
phone calls, providing a convenient way to receive notifications or communicate with other
members of the research team. Additionally, the module can be integrated with other sensors and
actuators, such as GPS modules or relays, to enhance the functionality of the system. Overall, the
SIM 900 GSM module is a powerful and versatile tool for enabling wireless communication in
research projects.

60
SCHEMATIC DIAGRAM OF THE COMPLETE SYSTEM

Figure 24 schematic on the complete proteus design

61
CHAPTER IV
TESING AND RESULTS
4.1 Testing and Results
In this project, we designed an accident detection system using various sensors and an Arduino
Uno microcontroller board. The main aim of the system is to automatically detect potential
accidents and alert the supervising authorities. The major components used are:
• Arduino Uno Module
• GSM Module
• Tilt Sensor
• Accelerometer
• Flame Sensor
• Vibration Sensor
• Push Button
• Buzzer
We started the design process by arranging the various components on a breadboard. The
breadboard allows us to easily connect the components using jumper wires without soldering.
The Arduino Uno module acts as the brain of the system. It reads the sensor inputs and triggers
the corresponding outputs. We connected the Arduino to the computer using a USB cable to
program it. The GSM module allows the system to communicate wirelessly using the mobile
network. We connected the GSM module to the Arduino using 4 wires - TX, RX, VCC and GND.
When an accident is detected, the Arduino will send an SMS to preset mobile numbers using the
GSM module.
The tilt sensor detects if the system has tilted beyond a certain angle, indicating a fall or rollover
accident. We connected one pin of the tilt sensor to the VCC of the Arduino and another pin to a
digital input pin. The accelerometer detects sudden acceleration or shock that happens during an
impact. We connected the accelerometer to the Arduino analog input pins. The flame sensor
detects the presence of fire or excessive heat that may indicate a fire accident. We connected one
pin of the flame sensor to the VCC and another to a digital input pin of the Arduino. The
vibration sensor detects violent vibrations that may indicate a vehicular collision. Like the flame
sensor, we connected it to the VCC and a digital pin of the Arduino.
The push button acts as a manual override to stop false alarms. We connected one pin of the push
button to the VCC and another to a digital pin of the Arduino. The buzzer generates an audible
alarm to alert people in the vicinity when an accident is detected. We connected one pin of the
buzzer to the VCC and another to a digital output pin of the Arduino. After connecting all
components to the appropriate Arduino pins, we uploaded a program to the Arduino that will:

62
• Continuously monitor the sensor inputs
• Detect if any sensor crosses its threshold, indicating an accident
• Activate the buzzer to raise alarm
• Send an SMS using the GSM module
• Allow stopping the alarms using the push button
The program first defines the pins used for each component. It then enters a loop where it reads
the sensor values and checks if any indicate an accident. If so, it activates the buzzer and sends
an SMS. It also checks if the push button is pressed, and if yes, stops the alarms. The accident
detection system performs well and is able to detect various types of accidents, raise local alarms
using the buzzer, and alert the authorities using SMS. The push button allows manual override in
case of false alarms. All components are easily connectable using jumper wires, allowing for
easy prototyping and modifications.
4.2 Wiring Diagram
Our accident detection system started out as a prototype on a breadboard, using jumper wires to
connect the various components. While convenient for testing, the breadboard is not robust
enough for a long-term deployment. After proving the concept worked, we decided to design a
printed circuit board (PCB) to house all the components permanently. We first tried making a
Veroboard, which is a pre-fabricated stripboard with exposed copper strips and holes. Veroboard
provides a bit more permanence compared to a breadboard. However, for our system with
multiple components and wires, the Veroboard quickly became unmanageable. It was difficult to
route the copper strips to connect all components without shorts. The Veroboard also did not
provide enough space to neatly accommodate all components.
After these challenges, we decided the best option would be to design a custom single sided PCB.
This would provide a robust, compact and long-lasting base for our system. The first step was to
create the PCB layout design, showing where each component and trace will go on the PCB. We
started the PCB layout using stretch, a free and open-source PCB design software. We first
inserted courtyard outlines to define the PCB boundaries. Within this, we placed the components
on the layout based on their mechanical dimensions. We tried to arrange the components in a
way that reduces wire crossings and keeps related elements closer together. Next, we defined the
tracks for connecting the components. Stretch allows defining signal layers for power, ground
and individual connections. All power and ground connections were routed on their respective
layers. Individual sensor and module connections were defined on other layers and routed to
avoid overlaps.
The next step was to actually assemble the components on the PCB. We started with the Arduino,
which has the most connections. We soldered the Arduino to the PCB based on the layout design.
This involved tinning the Arduino pins and PCB holes with solder, placing the Arduino on the
board, and applying heat from an iron to melt the solder and join the pins to the PCB tracks.
After soldering the Arduino, we continued with other modules and sensors - the GSM shield,
flame sensor, accelerometer, tilt sensor, etc. Each component was first tinned and then attached
63
to the PCB with heat from the soldering iron. After every few components, we checked the
solder joints for any bridges or incomplete connections and corrected them as needed. Finally,
we soldered the 2.1mm DC power connector, push buttons and buzzer. We then visually
inspected all solder joints and tracks under a magnifying glass to ensure there are no solder
bridges, lifted pads or incomplete connections. Any issues were fixed using desoldering braid
and fresh solder. Once assembly was complete, we tested the PCB by applying power and
uploading the code to the Arduino. All components powered up correctly and the system was
able to detect simulated accidents and send alerts. This confirmed our PCB design and assembly
was successful.

64
4.3 Accident Detection System (PCB Design)

Figure 25: PCB after Etching

65
We designed the PCB layout ourselves using Proteus, a free and open-source PCB design
software. We started by defining the PCB dimensions and outline to determine the board size.
Within the outline, we placed the components based on their mechanical specifications,
arranging them in a way that minimizes track crossings and keeps related elements closer
together. After placing components, we defined the traces to connect them. We assigned
different net classes for power, ground and individual signals and routed the traces on the
appropriate net. We routed all power and ground traces on their respective copper pours to
minimize resistance.
Once the layout was finalized in Proteus, we exported it to print the PCB artwork on an A4 sheet
using a laser printer. The printed artwork shows the copper traces and pad locations in black,
while the silkscreen and component designators in blue. We then used the printed artwork to
make the PCB using the traditional photo-etching method. We first coated both sides of a copper
clad laminate sheet with photo-resistant etch cream. We placed the printed artwork on one side
and exposed it to UV light to polymerize the exposed copper areas. After removing the artwork
and etching cream, we placed the board in Ferric Chloride solution to etch away the unexposed
copper. The solution etched the copper while leaving the polymerized areas intact.

Figure 26: PCB Design on Proteus

66
Figure 27: PCB After being run under water
Once etching was complete, we thoroughly washed the board to remove any remnants of etch
cream and excess Ferric Chloride. We then drilled holes at the pad locations using a drill bit of
appropriate size. With the basic PCB ready, we finally used a soldering gun to place and solder
all the components based on their designators on the silkscreen. Each component was first placed
correctly and then soldered at their pads and connected traces. After soldering all components,

67
we inspected the PCB under a magnifying glass to ensure there are no bridges, lifted pads or
poor solder joints. Any issues were corrected using desoldering braid and fresh solder.
We then applied power to the PCB and tested all connections. The complete self-designed and
self-fabricated PCB worked as intended, successfully detecting various accidents. This
traditional PCB creation process allowed us to fully understand and control every step of
designing and making our own PCB, without relying on external fabrication services.

Figure 28: Finished PCB with mount Arduino Board

68
4.4 Testing the Accident Detection System
After assembling our accident detection system on the custom PCB, the next step was to
thoroughly test it to ensure it works as intended in real world scenarios. We started by
conducting basic tests where we simulated the various sensor inputs to confirm the Arduino code
was working properly. We applied power to the tilt sensor and confirmed the system sent an
SMS when the sensor was tilted beyond the threshold angle. Similarly, we tested the flame
sensor by exposing it to a flame and the accelerometer by shaking it. The system correctly
detected the sensor activations and sent appropriate alerts each time.

Figure 29: Bluetooth Vehicle


These initial tests confirmed the basic wiring and code logic was functioning. However, to
properly test the system in realistic accident situations, we needed to mount it on an actual
vehicle. We chose to use a Bluetooth controlled toy car for this purpose. We securely attached
our PCB with all components to the toy car using adhesive tape. The sensors were positioned
such that they aligned with potential hazards - the tilt sensor at the roof, flame sensor near the
front, accelerometer and vibration sensors near critical parts. The buzzer and GSM antenna were
mounted externally. After mounting the system, we tested it by placing the toy car on an incline
and tilting it beyond the sensor threshold. As expected, the tilt sensor activated, triggering the
buzzer and sending an SMS. We received the text on our phone with details of the accident - "
accident detected".
69
To test the flame sensor, we placed the toy car near an actual flame and ensured the sensor was
exposed to the heat. Within a few seconds, the flame sensor activated and the system sent a text
stating "accident detected". For testing the accelerometer, we controlled the car's speed and
braking using a Bluetooth app on our phone. We started with normal driving and then suddenly
applied hard brakes, simulating a collision. The accelerometer detected the high deceleration and
the system activated, sending a text saying "Impact accident detected". To test the vibration
sensor, we nudged the toy car gently to produce low level vibrations. No alert was generated,
indicating the sensor threshold was set correctly. We then bumped the car against an object to
produce high vibrations, triggering the sensor and activating the system with the text "Collision
accident detected".
During all these tests, the buzzer turned on whenever an accident was detected and continued
ringing until we pressed the push button to reset the system. This showed the manual override
function was working properly. Overall, the testing process on the toy car closely mimicked real
world scenarios and allowed us to identify issues like false positives, sensor placement, threshold
calibration and code optimizations. We were able to improve the system based on the test results
to make it more reliable and effective. Finally, after resolving all issues observed during testing,
we concluded that our accident detection system is functioning as intended and is ready for real
world deployments. The GSM alerts will help notify authorities of accidents, while the buzzer
can raise awareness locally. Thorough testing under realistic conditions is critical to validate the
performance of any designed system. Mounting our PCB on an actual vehicle allowed testing the
accident detection system in a robust yet cost-effective manner. The end result is a working
prototype that can be further improved and commercialized.
Below is a screenshot on the sms alert sent to the authorities or family members after an accident
has occurred with gps coordinated that pin point the exact location of the accident.

70
Figure 30: On sms alert after an accident occurs

4.5 Evaluation of Testing and Results


Overall, testing the accident detection system mounted on a vehicle provided useful insights and
allowed improving the design before real world deployment. In this report, we will evaluate
different aspects of the testing process and results. Advantages:
Real world scenarios: Mounting the system on an actual vehicle allowed testing it under
conditions that closely mimic real accidents. This helped identify issues that may not have
surfaced during simple simulated testing on a bench. The vehicle testing captured corner cases
and outliers that make the system more robust. Thus, below is a diagram showing the systems
integration with multiple sensors being used in this project.

71
Figure 31: Mounting of the whole detection and alert system

Easy control: Using a Bluetooth controlled toy car for testing provided full control over how the
vehicle moved and stopped, allowing us to simulate different accident scenarios on demand. This
level of control would have been difficult with a real car.
Quick iteration: Since the toy vehicle is inexpensive, we could conduct multiple testing cycles
and modify our system with each iteration. Any issues identified during one test could be fixed
and retested quickly. This rapid iteration helped optimize parameters like sensor thresholds and
code logic.
Calibration: Testing on a moving vehicle helped fine-tune various sensors by determining their
ideal placement, alignment and sensitivity. The calibration process reduced false alarms and
improved the system's accuracy. This would not have been possible with static testing.
Limitations:
Speed limitations: Since we used a toy car for testing, we could not simulate high speed
accidents. The vehicle's maximum speed was around 10-15 kmph. However, for low-speed
scenarios like parking lot accidents, the testing was representative.
Simplified impact: Impacts produced by bumping the toy car were much softer compared to real
collisions. The vibrations and deceleration were not as severe. While sufficient to activate
sensors, the impacts were not identical to high energy collisions between actual vehicles.

72
No causalities: Since no people were present during testing, we could not fully validate aspects
like response time and reliability under life threatening scenarios. However, sensor detections
were validated to the extent possible.
High degree of control: The full control we had over the toy car's movements meant accidents
could only be simulated rather than occur naturally. This reduced the realism of some tests.
However, it allowed isolating individual sensors for focused testing. Despite some limitations,
vehicle-based testing provided several key advantages that significantly improved our accident
detection system. The insights gained from calibrating sensors, optimizing code and resolving
issues outweighed the constraints of using a toy car. Overall, the testing process validated that
our custom PCB, component arrangement and sensor configurations can effectively detect
accident conditions. With further improvements and testing on actual vehicles, the system has
the potential to enhance road safety.

73
CHAPTER V
CONCLUSION AND RECOMMENDATIONS
5.1 Financial
The research and development of the accident detection system using various sensors and an
Arduino microcontroller has successfully produced a working prototype. However, to fully
implement the system in real world environments, some recommendations must be considered.
Major cost items for a full-scale implementation would include:
ITEM QUANTITY COST (USD) TOTAL COST
(USD)
PCB Board 1 12 12
Arduino Uno Board 1 20 20
GSM Module 1 5 5
Tilt Sensor 1 5 5
Accelerometers 1 5 5
Flame Sensors 1 5 5
Vibration Sensors 1 5 5
Buzzers 1 5 5
Bluetooth Vehicle 1 30 30
Batteries 1 15 15
Cables 50 0.1 5
TOTAL 112

Apart from component costs, expenses will be involved in mass producing the custom PCB, 3D
printing enclosures and finally deploying the systems. Overall project cost for 10 systems could
be around $1000.
5.2 Recommendations
Robustness: The current prototype needs to be made more robust to withstand environmental
factors like dust, moisture and vibration during long term use in vehicles. This may involve
encapsulating electronic components, using conformal coatings and rugged enclosures.
Testing: Extensive field testing of the system deployed in actual vehicles is required to identify
issues not uncovered in initial tests. Parameters like sensor thresholds, response time and latency
need to be optimized based on real world usage.

74
Security: Proper authentication and encryption protocols should be implemented to prevent
unauthorized access to the GSM module and sent alerts. This will make the system secure from
potential threats.
Expansion: The current accident detection capabilities can be expanded to include features like
geo-tagging of location, automatic accident recording using cameras and triggering of airbags.
Cloud connectivity can also improve response times.
5.3 Future Work of Accident Detection Systems
Accident detection systems have the potential to significantly reduce loss of life and damage
from road and vehicular mishaps. While our prototype works well for proof of concept, further
development is needed to make it commercially viable and impactful at scale. Here are some
areas for future work:
Expand Sensing Capabilities - The current system senses basic hazards like tilt, impact, fire
and vibrations. However, more sensors can be incorporated to detect a wider range of accident
scenarios. This includes ultrasonic sensors for obstacle detection, proximity sensors for lane
departure warning, and cameras for computer vision-based accident analysis. Environmental
sensors like temperature and humidity monitors could also identify hazardous conditions.
Improve Machine Learning Models - Machine learning algorithms can be trained on data
collected from deployed systems to identify complex accident patterns. This can improve
accuracy, reduce false alarms and suggest timely preventive actions. Models could detect
anomalies in driving behaviour, vehicle health and infrastructure issues that indicate potential
dangers.
Add Location Tracking - Geotagging systems can provide the exact location of accidents to
responding authorities. This helps emergency services reach the spot faster. Technologies like
GPS, 5G and Bluetooth beacons can identify vehicle positions with high accuracy. Location data
also assists with accident analysis and avoidance of dangerous areas.
Connect to The Cloud - Cloud connectivity allows data from multiple deployed systems to be
collected and analysed centrally. This data-driven approach can identify areas with high accident
rates, common causes and problems specific to vehicle models. The cloud can also optimize
thresholds, models and predictions for individual systems based on accident patterns.
Include Preventive Actions - Beyond detection and alerts, the system can take preventive
actions like slowing down the vehicle, activating brakes or deploying airbags. Automated actions
can potentially mitigate damage from imminent accidents. Advanced driver assistance systems
(ADAS) technologies like automatic emergency braking can also be incorporated.
Commercialize the Product - To make an impact at scale, the accident detection system will
need to be commercialized as a product. This involves steps like refining the design, creating
mass producible PCBs, obtaining required certifications, setting up a supply chain and marketing
the product to fleet operators and insurers. Commercialization can make the system accessible to
a large number of vehicles. There are numerous avenues for enhancing current accident detection
prototypes to make them truly effective and impactful. The future work highlighted here - from
75
sensing capabilities to preventive actions - can transform such basic projects into commercial
products that improve safety, reduce losses and potentially save many lives on the road.
Enclosure
We have designed an electronic enclosure for our system which houses various electronic
components including microcontroller boards, sensors, actuators, and power supplies. The
enclosure serves to protect the electronics from environmental threats like dust, moisture and
physical impacts. The outer cover of the enclosure is made of ABS plastic which is a durable,
impact-resistant and UV-stabilized thermoplastic. It has robust clips and latching mechanisms to
securely fasten the cover to the base. Circular cable glands have been implemented to route
power and signal cables in and out of the enclosure in a sealed manner. The enclosure base
contains sturdy mounting rails to securely fix the internal electronics.
Heatsinks have been attached to heat-generating components like voltage regulators to dissipate
heat to the ambient air inside the enclosure. Ventilation slots have been provided to allow airflow
and prevent a buildup of heat within the enclosure. Conformal coating has been applied to all
exposed PCBs for additional moisture protection. All internal wiring has been performed with
insulated wiring harnesses to prevent short circuits. As a recommendation for future work, there
is a need to fortify a highly critical component within the system that would allow it to withstand
the effects of an accidental explosion or impact. Such accidents can occur due to a number of
factors like human error, electrical faults, vehicle collisions etc. To future-proof the system
against accidents, a component like the microcontroller unit needs to be shielded within a
hardened subsystem.
This hardened subsystem could consist of an explosion-proof inner enclosure made of a thicker
gauge of metal like steel or a high-strength alloy. The internal volume of the inner enclosure
would contain only the critical component, leaving enough space to mitigate the effects of an
explosion. The metal enclosure would act as a faraday cage shielding the critical electronics from
electromagnetic pulses that may occur during an explosion. Rubber grommets could be used to
route wiring into the inner enclosure in an isolated manner. Hermetically sealed feed-through
connectors may be required for signal and power cables. An overpressure rupture disk would be
implemented to relieve excess pressure buildup within the inner enclosure in a controlled manner,
protecting the critical component from damage.
The inner enclosure would be mechanically decoupled from the outer enclosure using vibration
isolation mounts. This would absorb the effects of a physical impact, protecting the internal
component. Encapsulation of the critical component in shock-absorbing material like silicone
rubber or urethane foam could provide additional impact protection. Fortifying critical
components within an explosion-proof and shock-hardened inner subsystem would help make
our electronic system robust and resilient to accidental damage. Such redundancies and safety
features are vital to ensure high reliability and longevity of our system in real-world operating
conditions.

76
77
REFERENCES
Akter, S., Zaman, R.U., & Al-Mamun, M.A. (2016). Smartphone-Based Accident Detection
and Notification System. Proceedings of the 19th International Conference on Computer and
Information Technology (ICCIT), pp. 84-89.
Al-Azzawi, H. M., Al-Waisy, A. S., & Kadhim, M. A. (2020). Accident detection system
using smartphone sensors: A review. Journal of Physics: Conference Series, 1469(1), 012091.
Baka, E., & Kondyli, A. (2017). Intelligent transportation systems for improving road safety:
A review of technologies, challenges, and opportunities. Journal of Advanced Transportation,
2017, 1-16.
Chen, C., Chen, H., & Chang, Y. (2018). Image-based accident detection system using
convolutional neural networks. IEEE Transactions on Intelligent Transportation Systems,
19(12), 3882-3891.
Chen, C., Chen, H., & Chang, Y. (2018). Image-based accident detection system using
convolutional neural networks. IEEE Transactions on Intelligent Transportation Systems,
19(12), 3882-3891.
Chen, C., Chen, H., & Chang, Y. (2018). Image-based accident detection system using
convolutional neural networks. IEEE Transactions on Intelligent Transportation Systems,
19(12), 3882-3891.
Fawcett, T. (2006). An introduction to ROCanalysis. Pattern Recognition Letters, 27(8), 861-
874.
Fernandes, B., Alam, M., Gomes, V., Ferreira, J., & Oliveira, A. (2016). Automatic accident
detection with multi-modal alert system implementation for ITS. Vehicular Communications,
3, 1-11.
Gaikwad, S. S. (2008, April). Mobile Agents in Heterogeneous Database Environment for
Emergency Healthcare System. In Fifth International Conference on Information Technology:
New Generations (itng 2008) (pp. 1220-1221). IEEE
Gao, S., Zhou, Z., Zhang, Y., Deng, K., & Feng, L. (2019). High-resolution micro-grating
accelerometer based on a gram-scale proof mass. Optics express, 27(23), 34298-34311.
García, S., Fernández, A., Luengo, J., & Herrera, F. (2010). Advanced nonparametric tests
for multiple comparisons in the design of experiments in computational intelligence and data
mining: Experimental analysis of power. Information Sciences, 180(10), 2044-2064.
García, S., Fernández, A., Luengo, J., & Herrera, F. (2010).Advanced nonparametric tests for
multiple comparisons in the design of experiments in computational intelligence and data
mining: Experimental analysis of power. Information Sciences, 180(10), 2044-2064.

78
Ghosh, S., Mukhopadhyay, S., & Saha, H.N. (2015). Arduino Based Accident Alert and
Vehicle Tracking System. Proceedings of the 2nd International Conference on Electrical,
Computer and Communication Technologies (ICECCT), pp. 1-6.
GM Authority. (2021). OnStar Automatic Crash Response. Retrieved from
https://gmauthority.com/blog/gm/general-motors-technology/onstar/onstar-automatic-crash-
response/
Goud, K.S., Kumar, B.P., Prasad, C.S.K., & Prasad, B. (2014). GPS and GSM Based
Accident Detection and Alert System. International Journal of Electrical, Electronics and
Computer Science Engineering, 3(6), pp. 101-105
Guksa, B., & Erkmen, B. (2017, April). Smart phone application for drowsiness detection
during driving. In 2017 2nd International Conference on Frontiers of Sensors Technologies
(ICFST) (pp. 218-221). IEEE.
Huang, Y., Li, Y., & Li, Y. (2020). A review of accident detection systems based on sensors
and smartphone. IEEE Access, 8, 108
Kaplan, B., & Litewka, S. (2008). Ethical challenges of telemedicine and telehealth.
Cambridge Quarterly of Healthcare Ethics, 17(4), 401-416.
Khan, M. A., & Khan, S. F. (2018, April). IoT based framework for Vehicle Over-speed
detection. In 2018 1st International Conference on Computer Applications & Information
Security (ICCAIS) (pp. 1-4). IEEE.
Li, H., Pang, F., Wang, X., Du, Y., & Chen, H. (2018). Free vibration analysis for composite
laminated doubly-curved shells of revolution by a semi analytical method. Composite
Structures, 201, 86-111.
Li, Y., & Wang, B. (2015). A novel accident detection algorithm based on vehicle dynamics
and wireless sensor networks. IEEE Transactions on Intelligent Transportation Systems,
16(2), 578-586.
Li, Y., & Wang, B. (2015). A novel accident detection algorithm based on vehicle dynamics
and wireless sensor networks. IEEE Transactions on Intelligent Transportation Systems,
16(2), 578-586.
Li, Y., & Wang, B. (2017). Collaborative accident detection and identification based on
vehicle-to-infrastructure (V2I) communication. IEEE Transactions on Intelligent
Transportation Systems, 18(10), 2637-2646.
Li, Y., & Wang, B. (2017). Collaborative accident detection and identification based on
vehicle-to-infrastructure (V2I) communication. IEEE Transactions on Intelligent
Transportation Systems, 18(10), 2637-2646.

79
Liu, J., Hainen, A., Li, X., Nie, Q., & Nambisan, S. (2019). Pedestrian injury severity in
motor vehicle crashes: an integrated spatio-temporal modeling approach. Accident Analysis
& Prevention, 132, 105272.
Liu, Y., Wang, L., & Jin, Z. (2020). A survey of machine learning-based accident detection
and analysis systems. Applied Sciences, 10(4), 1292.
Ma, J., Peng, Y., & Sun, Y. (2018). A novel accident detection method based on deep
learning. IEEE Transactions on Intelligent Transportation Systems, 19(4), 1127-1136.
Ma, J., Peng, Y., & Sun, Y. (2018). A novel accident detection method based on deep
learning. IEEE Transactions on Intelligent Transportation Systems, 19(4), 1127-1136.
Mobileye. (2021). Shield+. Retrieved from https://www.mobileye.com/our-
technology/collision-avoidance-systems/shield-plus/
Reddy, K. R., & Meikandasivam, S. (2018). Load flattening and voltage regulation using
plug-in electric vehicle's storage capacity with vehicle prioritization using anfis. IEEE
Transactions on Sustainable Energy, 11(1), 260-270.
Sherif, H. M., Shedid, M. A., & Senbel, S. A. (2014, August). Real time traffic accident
detection system using wireless sensor network. In 2014 6th International Conference of Soft
Computing and Pattern Recognition (SoCPaR) (pp. 59-64). IEEE.
Soomro, S., Memon, S. A., & Shah, S. I. A. (2020). Smart Road Accident Detection System
(SRADS) using GPS and accelerometer sensors. International Journal of Advanced
Computer Science and Applications, 11(10), 244-248.
Srinivasan, A., Gupta, A., & Singh, V. K. (2020). Vibration analysis-based accident detection
system (VAADS) for smart cities. Journal of Vibration Engineering & Technologies, 8(6),
867-883.
Wang, H., Yu, H., & Zhang, X. (2015). A novel accident detection system based on vehicular
ad hoc networks. IEEE Transactions on Intelligent Transportation Systems, 16(2), 587-597.
Wang, H., Yu, H., & Zhang, X. (2015). A novel accident detection system based on vehicular
ad hoc networks. IEEE Transactions on Intelligent Transportation Systems, 16(2), 587-597.
Zhang, L., Li, Y., & Shafiei, M. (2018). AcciMap: Acoustic-based accident detection and
mapping in urban areas. Transportation Research Part C: Emerging Technologies, 95, 23-41.
Zhang, W., Zhu, W., & Guan, X. (2017). Real-time accident detection algorithm for
intelligent transportation systems. IEEE Transactions on Intelligent Transportation Systems,
18(10), 2580-2589.
Zhang, W., Zhu, W., & Guan, X. (2017). Real-time accident detection algorithm for
intelligent transportation systems. IEEETransactions on Intelligent Transportation Systems,
18(10), 2580-2589.

80
Zhu, Z., Liu, Y., & Zheng, J. (2021). Acoustic-based vehicle collision detection under noisy
environments. Applied Acoustics, 180, 108096.

81
APPENDICIES
Appendix A: Additional Pictures

Figure 32: On 3D PCB layout in proteus

Figure 33: On testing of the flame sensor as part of accident detection

82
Figure 34: On the black box design

83
Appendix B: PCB Design

Figure 35: Proteus Schematic

Figure 36: 3D PCB Layout

84
Figure 37: PCB Vertical View

Figure 38: PCB Horizontal View

85
Figure 39: PCB Layout

86
Appendix C: Arduino Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_ADXL345_U.h>
#include <TinyGPS.h>
#include <SoftwareSerial.h>
#define PHONE "+263714769467"

SoftwareSerial gsmSerial(6,7);//rx,tx
SoftwareSerial gpsSerial(50,48);//rx,tx
SoftwareSerial bluetoothSerial(10,9);
TinyGPS gps;
LiquidCrystal_I2C lcd(0x27, 16, 2);

const int Tilt_1 = 2;


const int Tilt_2 = 3;
const int Tilt_3 = 4;
const int Tilt_4 = 5;
const int accelerometer_SDA = 20;
const int accelerometer_SCL = 21;
const int vibration_Sensor = A0;
const int buzzer_Pin = 42;
const int flame = 51;
const int switch_Pin = 53;
int red_led = 36;
int green_led = 38;
int blue_led = 40;

87
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);

int vibration_status = 0;
int timer = 0u;
int Tilt1_status = LOW;
int Tilt2_status = LOW;
int Tilt3_status = LOW;
int Tilt4_status = LOW;
long lat,lon;
bool switch_status = LOW;
bool flame_status = HIGH;
int count = 3;
void countDown();

void setup() {
pinMode(buzzer_Pin, OUTPUT);
pinMode(red_led, OUTPUT);
pinMode(green_led, OUTPUT);
pinMode(blue_led, OUTPUT);
pinMode(vibration_Sensor, INPUT);
pinMode(Tilt_1, INPUT);
pinMode(Tilt_2, INPUT);
pinMode(Tilt_3, INPUT);
pinMode(Tilt_4, INPUT);
pinMode(flame, INPUT);
pinMode(switch_Pin, INPUT);
Serial.begin(9600);
gpsSerial.begin(9600);

88
gsmSerial.begin(9600);

while (!accel.begin()) {
Serial.println("Could not find a valid ADXL345 sensor, check wiring!");
delay(500);
}
accel.setRange(ADXL345_RANGE_16_G);
accel.setDataRate(ADXL345_DATARATE_100_HZ);

Wire.begin();
lcd.backlight();
lcd.init();
lcd.begin(16, 2);
lcd.print("ACCIDENT ");
lcd.setCursor(0,1);
lcd.print("DETECTION SYSTEM");
delay(500);
lcd.clear();
}

void loop()
{

while(gpsSerial.available())
{ // check for gps data
if(gps.encode(gpsSerial.read())){ // encode gps data
gps.get_position(&lat,&lon); // get latitude and longitud gps.get_position(&lat, &lon); // get
latitude and longitude

89
Serial.print("Position: ");
Serial.print((lat * 0.000001), 6);
Serial.print(",");
Serial.println((lon * 0.000001), 6);
}
}

switch_status = digitalRead(switch_Pin);
sensors_event_t event;
accel.getEvent(&event);
float x = event.acceleration.x;
float y = event.acceleration.y;
float z = event.acceleration.z;
float acceleration = sqrt(x*x + y*y + z*z);
digitalWrite(green_led, HIGH);

vibration_status = pulseIn(vibration_Sensor, HIGH);


flame_status = digitalRead(flame);
Tilt1_status = digitalRead(Tilt_1);
Tilt2_status = digitalRead(Tilt_2);
Tilt3_status = digitalRead(Tilt_3);
Tilt4_status = digitalRead(Tilt_4);
switch_status = digitalRead(switch_Pin);

Serial.println("acceleration is:");
Serial.println(acceleration);
Serial.println("flame status is:");
Serial.println(flame_status);

90
Serial.println("tilt1 status is:");
Serial.println(Tilt1_status);
Serial.println("tilt2 status is:");
Serial.println(Tilt2_status);
Serial.println("tilt3 status is:");
Serial.println(Tilt3_status);
Serial.println("tilt4 status is:");
Serial.println(Tilt4_status);
Serial.println("vibrations units is:");
Serial.println(vibration_status);
Serial.println("Switch status is:");
Serial.println(switch_status);

if(acceleration > 25||acceleration < 7) // Change this threshold value to suit your needs
{
lcd.print("Acceleration ACC");
lcd.setCursor(0, 1);
lcd.print("Detected");
delay(500);
lcd.clear();
lcd.print("Timer Start");
countDown();
SendMessage();
locationfind();

while(1)
{

91
digitalWrite(buzzer_Pin, HIGH);
digitalWrite(red_led, HIGH);
delay(100);
digitalWrite(red_led, LOW);
delay(100);
digitalWrite(green_led, HIGH);
delay(100);
digitalWrite(green_led, LOW);
delay(100);
digitalWrite(blue_led, HIGH);
delay(100);
digitalWrite(blue_led, LOW);
delay(100);

}
delay(100);
}

// Accident detected by vibration sensor


if (vibration_status > 20000) {

digitalWrite(buzzer_Pin, HIGH);
lcd.clear();
lcd.print("Crash Accident");
lcd.setCursor(0, 1);
lcd.print("Detected");
delay(500);

92
lcd.clear();
lcd.print("Timer Start");
countDown();
lcd.clear();
SendMessage();
locationfind();

while(1)
{
digitalWrite(buzzer_Pin, HIGH);
digitalWrite(red_led, HIGH);
delay(100);
digitalWrite(red_led, LOW);
delay(100);
digitalWrite(green_led, HIGH);
delay(100);
digitalWrite(green_led, LOW);
delay(100);
digitalWrite(blue_led, HIGH);
delay(100);
digitalWrite(blue_led, LOW);
delay(100);

}
delay(1000);
}

93
if (flame_status == LOW) {

digitalWrite(buzzer_Pin, HIGH);
lcd.clear();
lcd.print("Flame Accident");
lcd.setCursor(0, 1);
lcd.print("Detected");
delay(500);
lcd.clear();
lcd.print("Timer Start");
countDown();
lcd.clear();
SendMessage();
locationfind();

while(1){
digitalWrite(buzzer_Pin, HIGH);
digitalWrite(red_led, HIGH);
delay(100);
digitalWrite(red_led, LOW);
delay(100);
digitalWrite(green_led, HIGH);
delay(100);
digitalWrite(green_led, LOW);
delay(100);
digitalWrite(blue_led, HIGH);
delay(100);

94
digitalWrite(blue_led, LOW);
delay(100);

}
delay(1000);
}

if (Tilt1_status == HIGH||Tilt2_status == HIGH||Tilt3_status == HIGH||Tilt4_status == HIGH)


{

lcd.clear();
lcd.print("Tilt Accident");
lcd.setCursor(0, 1);
lcd.print("Detected");
delay(500);
lcd.clear();
lcd.print("Timer Start");
countDown();
lcd.clear();
SendMessage();
locationfind();

while(1){
digitalWrite(buzzer_Pin, HIGH);
digitalWrite(red_led, HIGH);
delay(100);
digitalWrite(red_led, LOW);

95
delay(100);
digitalWrite(green_led, HIGH);
delay(100);
digitalWrite(green_led, LOW);
delay(100);
digitalWrite(blue_led, HIGH);
delay(100);
digitalWrite(blue_led, LOW);
delay(100);
}

else {
lcd.setCursor(0,0);
lcd.print("Driver is ok");
}

void locationfind()
{
while(gpsSerial.available())
{ // check for gps data
if(gps.encode(gpsSerial.read())){ // encode gps data
gps.get_position(&lat,&lon); // get latitude and longitud gps.get_position(&lat, &lon); // get
latitude and longitude
96
Serial.print("Position: ");
Serial.print((lat * 0.000001), 6);
Serial.print(",");
Serial.println((lon * 0.000001), 6);
SendMessage();
}
}
}

void SendMessage()
{
String sms_data = "Accident detected .\r";
sms_data += "http://maps.google.com/maps?q=loc:" + String(lat, 6) + "," + String(lon, 6);

// Set the SMS mode to text mode


gsmSerial.print("AT+CMGF=1\r");
delay(1000);

// Send the SMS message


gsmSerial.print("AT+CMGS=\"" + String(PHONE) + "\"\r");
delay(1000);
gsmSerial.print(sms_data);
delay(100);
gsmSerial.write(0x1A); // Send Ctrl+Z to terminate the message
delay(1000);
Serial.println("SMS Sent Successfully.");
lcd.setCursor(0,1);
lcd.print("SMS Sent Successfully.");

97
}

void countDown(){
while(count > -1){
Wire.begin();
lcd.backlight();
lcd.init();
lcd.begin(16, 2);
lcd.print("Count Initialized");
lcd.setCursor(8,1);
lcd.print(count);

if (switch_status == HIGH) {
noTone(buzzer_Pin);
digitalWrite(blue_led, HIGH);
lcd.clear();
lcd.print("Driver Ok");
lcd.setCursor(0,1);
lcd.print("stop message");
delay(500);

} else if(count == 0){


locationfind();
break;
}
delay(1000);
count--;

98
}
}

99
Appendix D: Final Results of the
System

Figure 40

100
Figure 41

101
Figure 42

102
Figure 43

103
Figure 44

104
Figure 45

105
Figure 46

106
Figure 47

107
Figure 48

108

You might also like