Automatic Vehicle Accident Detection and
Automatic Vehicle Accident Detection and
B.Sc. Project
By
Kh.Azizul Hakim
ID #152093006
Md.Mehedi Hasan
ID#152093011
Surma Akter
ID#152093020
A project submitted in partial fulfillment of the requirements for the award of the
degree of Bachelor of Science in Electrical & Electronic Engineering (EEE) from
City University
SPRING-2019
Certificate
This is to certify that the project entitled “Automatic Vehicle accident detection and
messaging system using GSM and GPS module”, being submitted by Kh. Azizul
Hakim, ID#152093006, Md Mehedi Hasan, ID#152093011, and Surma Akter,
ID#152093020 for partial fulfillment of the requirements for the award of the degree
of Bachelor of Science in Electrical and Electronic Engineering, from City University.
This report has been carried out under my guidance and is record of bona-fide work
carried out successfully.
Signature of Supervisor
Page | ii
Declaration
We hereby do solemnly declare that the work presented in this project has been
carried out by us and has not been previously submitted to any other university for an
academic degree.
This project being submitted as a particular fulfillment of the requirement for the
degree of Bachelor of Science in Electrical and Electronic Engineering commenced
from of City University is the result of our own project work. That no part of this
project consists of materials copied or plagiarized from other published or
unpublished source have either been put under quotation or duly acknowledged with
full reference in appropriate places.
Signature of Author’s
…………………………
Kh.Azizul Hakim
ID #152093006
Bachelor of Science in Electrical & Electronic Engineering
City University, Dhaka, Bangladesh
…………………………
Md.Mehedi Hasan
ID#152093011
Bachelor of Science in Electrical & Electronic Engineering
City University, Dhaka, Bangladesh
…………………………
Surma Akter
ID#152093020
Bachelor of Science in Electrical & Electronic Engineering
City University, Dhaka, Bangladesh
Page | iii
Approval
This project titled “Automatic Vehicle accident detection and messaging system
using GSM and GPS module” has been submitted to the following respected
members of the Board of Examiners of the Faculty of Engineering in partial
fulfillment of the requirements for the degree of Bachelor of Electrical & Electronics
Engineering on Spring, 2019 has been accepted as satisfactory.
Supervisor
MIRZA ASIF HAIDER
Lecturer,
Department of EEE,
City University, Dhaka, Bangladesh
Page | iv
Acknowledgement
First of all we would like to pay my sincerest gratitude to the almighty Allah for
keeping us in sound mind and health during the work and giving me the ability to
work hard successfully. Specially, we would like to thanks Prof. Dr. Md. Shakawat
Ali Khan, Dean, Faculty of Science & Engineering, and City University for allowing
us to do the projects. His constant supervision, constructive criticism, valuable advice,
Scholarly guidance and encouragement at all stage of our work have made it possible
to complete this project. We shall be grateful to Md. Humayun Kabir Khan, Head
(Acting) for his contribution and support.
We would like to thank our honorable supervisor Mirza Asif Haider, Lecturer,
Department of Electrical and Electronic Engineering, City University, for continuous
supervision and support. We are grateful to him for his kind advices. He helped us by
suggesting various notions our work especially about the problems that we were
unable to solve by ourselves. We also would like to thanks all the teachers of the
department of Electrical & Electronic Engineering for their constructive criticism and
valuable advices and cordial co-operation during study in the University. Specially
thank to my family members who gave us huge support and inspiration during our
whole B.Sc. Course in EEE.
In this connection, we also thank to the officers and staffs to the university of their
co-operation and to all others not stated here for their help and co-operation. Science
& Engineering, City University (Bangladesh) who is supported us in any case with his
kind and all the time during our project.
Finally, we would like to give thank to our course mates, friends and well wishers
who gave us huge support inspiration and their friendly and lovely company during
our project.
Page | v
Abstract
The Rapid growth of technology and infrastructure has made our lives easier. The
advent of technology has also increased the traffic hazards and the road accidents take
place frequently which causes huge loss of life and property because of the poor
emergency facilities. Our project will provide an optimum solution to this draw back.
An accelerometer can be used in a car alarm application so that dangerous driving can
be detected. It can be used as a crash or rollover detector of the vehicle during and
after a crash. With signals from an accelerometer, a severe accident can be
recognized. According to this project when a vehicle meets with an accident
immediately Vibration sensor will detect the signal or if a car rolls over, and Micro
electro mechanical system (MEMS) sensor will detects the signal and sends it to
ARM controller. Microcontroller sends the alert message through the GSM MODEM
including the location to police control room or a rescue team. So the police can
immediately trace the location through the GPS MODEM, after receiving the
information. Then after conforming the location necessary action will be taken. If the
person meets with a small accident or if there is no serious threat to anyone`s life,
then the alert message can be terminated by the driver by a switch provided in order to
avoid wasting the valuable time of the medical rescue team. This paper is useful in
detecting the accident precisely by means of both vibration sensor and Micro electro
Mechanical system (MEMS) or accelerometer. As there is a scope for improvement
and as a future implementation we can add a wireless webcam for capturing the
images which will help in providing driver`s assistance.
Page | vi
Contents
Name of Content Pages No
CERTIFICATE II
DECLARATION III
APPROVAL IV
ACKNOWLEDGEMENT V
ABSTRACT VI
CONTENTS VII
LIST OF FIGURES X
LIST OF TABLES XI
ABBREVIATION XII
CHAPTER I: INTRODUCTION
1.1 INTRODUCTION 1
1.2 BACKGROUND STUDY 1
1.4 OBJECTIVES 2
1.5 JUSTIFICATION OF STUDY 2
1.6 PROJECT BOOK OUTLINE 2
3.1 INTRODUCTION 7
3.2 ACCIDENT DETECTION MODULE 7
3.3 METHODOLOGY 7
3.3.1 Waterfall Model of Methodology 8
3.3.2 Description of Methodology 8
3.4 REQUIREMENT ANALYSIS 9
3.5 HARDWARE REQUIREMENTS 9
3.6 SOFTWARE REQUIREMENTS 9
3.7 ARDUINO UNO 9
3.7.1 Specifications 10
3.7.2 Microcontroller (AT mega 328P) 11
3.7.3 Specifications 11
3.7.4 Key parameters 11
3.8 GSM MODULE (SIM800L) 12
3.8.1 Features of GSM Module: 12
3.8.2 Specification 13
3.8.3 Set includes 13
3.9 GPS MODULE (NEO-6M) 14
Page | vii
3.9.1 Feature 14
3.10 ACCELERATOR SENSOR (ADXL335) 14
3.10.1 Pin Description 15
3.11 ULTRASONIC SENSOR (HC-SR04) 15
3.11.1 Features: 16
3.11.2 Pin Description 17
3.12 VIBRATION SENSOR (SW-18010P) 17
3.12.1 Features 18
3.13 TRANSFORMER 18
3.14 VOLTAGE REGULATOR (LM7805) 19
3.14.1 Pin Description 19
3.15 BUZZER 20
3.15.1 Features 20
3.15.2 Pin Description 21
3.16 LC D DISPLAY (16×4) 21
3.16.1 Characters of LCD Display 16x4 21
3.16.2 Interface Pin Function 22
3.16.3 Features of 16×4 LCD Module 22
3.17 LED BULB 22
3.17.1 Working Principle: 23
3.18 RESISTOR 23
3.29 JUMP WIRE 24
4.1 INTRODUCTION 25
4.2 BLOCK DIAGRAM 25
4.3 CIRCUIT DIAGRAM 26
4.3.1 WORKING PRINCIPLE 26
4.4 SYSTEM DESCRIPTION 27
4.6 FLOW CHART OF THE SYSTEM 28
4.6.1 Description of Flow Chart 28
5.1 INTRODUCTION 29
5.2 RESULTS AND DISCUSSIONS 29
5.3 LIMITATIONS OF THE SYSTEM 29
5.4 ANGLE OF ROTATION VIBRATION SENSOR (ADXL335) 29
5.3.1 Angles calculation of Vibration Sensor (ADXL335) 30
5.4 FREQUENCY RESPONSE OF VIBRATION SENSOR (ADXL335) 31
5.4.1 The Vibration Sensor or Shake Switch 31
5.5 ULTRASONIC DISTANCE MEASUREMENT SENSOR 32
5.6 HARDWARE RESULT 32
5.7 ADVANTAGES OF THE SYSTEM 33
5.8 APPLICATIONS OF THE SYSTEM 34
5.9 ESTIMATED COST OF THE SYSTEM 34
Page | viii
CHAPTER VI: CONCLUSION AND FUTURE WORK
6.1 CONCLUSION 35
6.2 FUTURE WORKS 35
REFERENCES 36
APPENDIX 38
Page | ix
List of Figures
Figure No Figure Contain Page No
Page | x
List of Tables
Tab. No Table Contain Page No
Page | xi
Abbreviation
Abbreviation Meaning
GSM Global System for Mobile Communication
GPS Global Positioning System
SMS Short Message Service
AC Alternating Current
DC Direct Current
IC Integrated Circuit
VCC Voltage at the common collector
GND Ground
LED Light Emitting Diode
EEPROM Electrically Erasable Programmable Read-Only
Memory
TX Transmitter
RX Receiver
PCB Printed Circuit Board
CT Current Transformer
BSS Base Station System
BPS Bits Per Second
MEMS Microelectromechanical systems
SIM Subscriber Identity Module
LCD Liquid Crystal Display
Page | xii
Chapter I
Introduction
1.1 Introduction
The high demand of automobiles has also increased the traffic hazards and the road
accidents. Life of the people is under high risk. This is because of the lack of best
emergency facilities available in our country. An automatic alarm device for vehicle
accidents is introduced in this paper. This design is a system which can detect
accidents in significantly less time and sends the basic information to first aid center
within a few seconds covering geographical coordinates, the time and angle in which
a vehicle accident had occurred. This alert message is sent to the rescue team in a
short time, which will help in saving the valuable lives. A Switch is also provided in
order to terminate the sending of a message in rare case where there is no casualty,
this can save the precious time of the medical rescue team. When the accident occurs
the alert message is sent automatically to the rescue team and to the police station.
The message is sent through the GSM module and the location of the accident is
detected with the help of the GPS module. The accident can be detected precisely
with the help of both Micro electro mechanical system (MEMS) sensor and vibration
sensor. The Angle of the rolls over of the car can also be known by the message
through the MEMS sensor. This application provides the optimum solution to poor
emergency facilities provided to the roads accidents in the most feasible way.
Page | 1
1.4 Objectives
The main objective of this work is to design and develop an automatic accident
detection and notification systems. Total work can be summarized as:
• An ultrasonic sensor is used in a car alarm application so that vehicle in a
dangerous region can be detected.
• An accelerometer and vibration sensors are used to detect the accident
precisely with the rapid change of acceleration and vibration of the vehicle.
• When a vehicle meets with an accident immediately vibration sensor will
detect the signal or if a car rolls over, accelerometer sensor will detect the
signal and sends it to microcontroller.
• Microcontroller sends the alert message through the GSM MODEM including
the location to police control room or a rescue team.
This chapter mainly covered the vehicle accident detection system and prevention
system, review of the related works is also described in this chapter.
This chapter we represent about in this project theory, description of hardware part
and also describe every hardware parts feature and working principle with pin
description. The working methodology of the system is described here.
In this chapter covered the practical implementation of component and describe the
system design, fabrication, and working principle of the whole project. Making the
flow chart and circuit diagram of the project are briefly described here.
This chapter is about the result and discussion, advantage of the system, limitation,
application and cost estimation has been discussed in this chapter.
Page | 2
Chapter VI (Conclusion)
Finally, we conclude this work by writing in their conclusion and future works.
Page | 3
Chapter II
Literature Review
Page | 4
vehicles in the U.S and European countries but not available in all vehicles in other
countries. Besides, the maintenance or upgrading process of this system is an
expensive operation.
In the E-call system has explored the possibility of implementing an automatic crash
detection and notification service for portable devices Smartphone[3]. This system
has used the cellular network to communicate between the portable device and the
Server Center. The main limitation of the system is the E-call system has used
Smartphone built-in accelerometer sensor as a crash sensor and the E-call system
subjects to high rates of false positives emerging while the user is outside the vehicle.
In the authors at the University of Baghdad Iraq have developed a system which made
use of the accelerometer, GPS and microphone to detect accidents. Upon detection of
an accident sends an emergency notification to the web server and also sent an SMS
to the emergency contacts, emergency responders have to access the web server to
find out an accident[4]. Their system made use of the same sensors and hardware that
the algorithm presented in this research work except for a few features. The main
issue with this system is that the notifications are sent to a web server and responders
needs to check the web server for accident notification, there is no system for
individual responder that responded to the emergency to track victim’s location and
also the system lacked the functionality to send emergency notification to the nearest
emergency center in case there is more than one emergency center in the area.
In the authors have developed a system called Wreck Watch which involves reading
data from the accelerometer and acoustic data from the microphone to detect
accidents[1]. If an incident has occurred, the application contacts nearby emergency
services and provides GPS-coordinates of the accident location.
In the authors have developed Difference analysis of GPS data base sources based on
vehicle location system[5]. GPS technology can achieve an extremely high degree of
precision and it is widely applied to many military and civilian. This paper specifies
the database for the GPS data obtained from the error to make a specific analysis and
introduction, so that GPS information can eliminate the error better and more quickly,
and thus the data obtained from GPS, the accuracy of the database has further
improved the database system, which further improving the accuracy of GPS so that it
can be better in the vehicle positioning.
In the authors developed Review of Automatic Speed Control of Vehicle using RFID
Technology to reduce the rate of road accident they are propose a system which
controls the speed of vehicle automatically in any critical zone, without major
inconvenience to driver[6]. Here, there is review a model based on RFID technology.
One RFID reader inside the vehicle reads the RFID tag placed either at speed limit
signboard or at traffic light. A controlling module in the vehicle then takes the
decision and control the speed accordingly.
In the authors developed GPS and Map matching based vehicle accident detection
system[7]. this paper proposes to detect an accident from the map matched position of
a vehicle by utilizing the GPS speed data and map matching algorithm and send
accident location to an Alert Service Center. The GPS provides speed and position in
every 0.1 second. The position data will be used in the map matching algorithm to
locate the vehicle on the road. The present speed will be compared with the previous
speed in every 0.1 second through a Microcontroller Unit. Whenever the speed will be
falling below the safe calculated threshold speed, the system will generate an accident
situation. It will check the vehicle location from map matching module and generate
an accident situation if the vehicle is found outside the road network. This will reduce
the false accident detection drastically. The map matched accident location is then
Page | 5
sent by utilizing the GSM network. The proposed system will save many accident
victims with timely rescue.
In the authors developed Traffic-incident detection-algorithm based on nonparametric
regression[8]. This paper proposes an improved nonparametric regression (INPR)
algorithm for forecasting traffic flows and its application in automatic detection of
traffic incidents.
In the authors developed Impacts of an automatic emergency call system on accident
consequences[9]. The aim of this study was to estimate the impacts of an automatic
emergency call system on accident consequences in Finland. The main results
indicated that eCall could very probably have prevented 4.6% of the fatalities in
accidents involving motor-vehicle occupants.
In the authors developed Wireless vehicular Accident Detection and Reporting
System[10]. Accident Detection and Reporting System (ADRS) which can be placed
in any vehicle uses a sensor to detect the accident. The sensor output is monitored and
processed by the PIC16F877A microcontroller.
In the authors developed by Using an Ultrasonic Sensor to Monitor Position, Transfer
Control Commands and Work Information [11].
Page | 6
Chapter III
Theory of the Project
3.1 Introduction
Consider a busy city scenario, where we have peak morning and evening hours. In
peak hours, half of the city population rush to/from workplaces using public or private
transportations or a highway scenario with different speed lanes. In each scenario, it is
important to detect an accident if it occurs and report to an emergency alert center
about an incident with additional information of the location.
• Collision: A vehicle can collide with other vehicle or any other solid object, as
a result driver or passenger inside the vehicle can get injuries.
• Roll-over: A vehicle may roll-over when an incident occurs. This is one of the
dangerous events that may end-up with the several injuries or death of
passengers including drivers.
• Speed: If accident happens, the vehicle would stop suddenly. In normal
situation, if brakes are applied on the vehicle, it takes a certain amount of time
and travel few feet before coming to the stationary position depending upon
the speed of the vehicle.
3.3 Methodology
We have divided our whole project work with seven phases of our project. Using the
Waterfall model, we have completed our project very readily. The waterfall model is
a sequential process to solve any problem to develop any system it should arrange the
whole work in the segment so that accuracy can be provided. We used the waterfall
model in our system because it is seven stage attributes and feedback opportunity
system the characteristics of our workflow is it can return to previous steps. If we
want to modify our system at any point according to equipment so we will do it
depends on our requirement. In this workflow, each phase must be completed
completely before the next steps may begin.
Page | 7
3.3.1 Waterfall Model of Methodology
This project has been completed by following strategy, which is given below:
Full work has been divided into seven parts. The work is done part by part.
• Project Planning: We seek for some problems in our real life. Then we found
this problem and planned to solve the problem.
• Gather Information: We read some research papers related to accident
detection problem. We search on the internet to find solutions.
• Requirement Analysis: We use Arduino Uno, GPS, GSM, Accelerometer,
ultrasonic sensor, LCD Display, transformer, voltage regulator IC, Buzzer,
Vero board, capacitor, Diode, resistor, etc.
• Learn Required Skill: To complete the project, we learned C++ language,
Arduino Uno language, hardware connection.
• Design and Development: We developed a device which the system
communicates with the web server through GPS communication via a GSM. It
will send the vehicle location’s latitude and longitude data to the web server
upon user request or after detection of the accident.
• Testing and Debugging: Final module testing aims to demonstrate
correctness, whereas testing during debugging is primarily aimed at locating
errors.
• Maintenance: Hardware project maintenance presents the full scope and
understanding how to function should operate and be managed in an
implementation area. Actions necessary for retaining or restoring a piece of
equipment, machine, or system to the specified operable condition to achieve
its maximum useful life. It includes corrective maintenance and preventive
maintenance.
Page | 8
3.4 Requirement Analysis
Requirements analysis also called requirements engineering, is the process of
determining user expectations for a new or modified product. These features, called
requirements, must be quantifiable, relevant and detailed. In software engineering,
such requirements are often called functional specifications. Requirements analysis is
an important aspect of project management.
Page | 9
connect it to a computer with a USB cable or power it with a AC-to-DC adapter or
battery to get started. You can tinker with your UNO without warring too much about
doing something wrong, worst case scenario you can replace the chip for a few dollars
and start over again. "Uno" means one in Italian and was chosen to mark the release
of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software
(IDE) were the reference versions of Arduino, now evolved to newer releases. The
Uno board is the first in a series of USB Arduino boards, and the reference model for
the Arduino platform; for an extensive list of current, past or outdated boards see the
Arduino index of boards.Arduino is an open-source platform used for building
electronics projects. Arduino consists of both a physical programmable circuit board
(often referred to as a microcontroller) and a piece of software, or IDE (Integrated
Development Environment) that runs on your computer, used to write and upload
computer code to the physical board. The Arduino IDE uses a simplified version of
C++, making it easier to learn to program. Finally, Arduino provides a standard form
factor that breaks out the functions of the micro-controller into a more accessible
package.
3.7.1 Specifications
Table 1 Arduino Uno Specifications
Name Specification
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage 7-12V
(recommended)
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by
boot loader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 Hz
Page | 10
3.7.2 Microcontroller (AT mega 328P)
3.7.3 Specifications
The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory
with read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose
I/O lines, 32 general purpose working registers, three flexible timer/counters with
compare modes, internal and external interrupts, serial programmable USART, a
byte-oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit A/D converter
(8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with
internal oscillator, and five software selectable power saving modes. The device
operates between 1.8-5.5 volts. The device achieves throughput approaching 1 MIPS
per MHz.
Parameter Value
CPU type 8-bit AVR
Flash memory 32 kB
SRAM 2 kB
EEPROM 1 kB
28 or 32 pin: PDIP-28, MLF-28, TQFP-32,
Pin count
MLF-32[2]
Maximum operating frequency 20 MHz
Page | 11
Maximum I/O pins 23
External interrupts 2
USB Interface No
USB Speed –
GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in
1970. It is widely used mobile communication system in the world. GSM is an open
and digital cellular technology used for transmitting mobile voice and data services
operates at the 850MHz, 900MHz, 1800MHz and 1900MHz frequency bands.GSM
system was developed as a digital system using time division multiple access
(TDMA) technique for communication purpose. A GSM digitizes and reduces the
data, then sends it down through a channel with two different streams of client data,
each in its own particular time slot. The digital system has an ability to carry 64 kbps
to 120 Mbps of data rates. There are various cell sizes in a GSM system such as
macro, micro, Pico and umbrella cells. Each cell varies as per the implementation
domain. There are five different cell sizes in a GSM network macro, micro, Pico and
umbrella cells. The coverage area of each cell varies according to the implementation
environment.
Page | 12
• High-quality speech
• Uses encryption to make phone calls more secure
• Short message service (SMS)
3.8.2 Specification
• SIM800L module
• gold pin headers
• wire antenna
• PCB antenna with pigtail and IPX connector
• RING (not marked on PBC, first from top, square) - LOW state while
receiving call
• DTR - sleep mode. Default in HIGH state (module in sleep mode, serial
communication disabled). After setting it in LOW the module will wake up.
• MICP, MICN - microphone (P + / N -)
• SPKP, SPKN - speaker (P + / N -)
• NET – antenna
• VCC - supply voltage
• RESET – reset
• RXD - serial communication
• TXD - serial communication
• GND – ground
Page | 13
3.9 GPS Module (NEO-6M)
The NEO-6 module series is a family of stand-alone GPS receivers featuring the high-
performance u-box 6 positioning engine. These flexible and cost-effective receivers
offer numerous connectivity options in a miniature 16 x 12.2 x 2.4 mm package. Their
compact architecture and power and memory options make NEO-6 modules ideal for
battery operated mobile devices with very strict cost and space constraints. The 50-
channel u-box 6 positioning engine boasts a TimeTo-First-Fix0(TTFF) of under 1
second. The dedicated acquisition engine, with 2 million correlate’s, is capable of
massive parallel time/frequency space searches, enabling it to find satellites instantly.
Innovative design and technology suppresses jamming sources and mitigates
multipath effects, giving NEO-6 GPS receivers excellent navigation performance
even in the most challenging environments. For more details, check the datasheet
here.
3.9.1 Feature
Page | 14
The ADXL335 is a small, thin, low power, a complete 3-axis accelerometer with
signal conditioned voltage outputs. The product measures acceleration with a
minimum full-scale range of ±3 g. It can measure the static acceleration of gravity in
tilt-sensing applications, as well as dynamic acceleration resulting from motion,
shock, or vibration. The user selects the bandwidth of the accelerometer using the CX,
CY, and CZ capacitors at the XOUT, YOUT, and ZOUT pins. Bandwidths can be
selected to suit the application, with a range of 0.5 Hz to 1600 Hz for the X and Y
axes, and a range of 0.5 Hz to 550 Hz for the Z axis. The ADXL335 is available in a
small, low profile, 4 mm × 4 mm × 1.45 mm, 16-lead, plastic lead frame chip scale
package.
Number
Configuration
of Pin
This is VCC pin and is used for power on the ADLX 335
1
accelerometer. It is connected with 3.3V dc power source
This is ground pin and is used for supplying ground to this ADLX
2
335 accelerometer. It is connected with source ground.
3 This is X pin and is used for analog input in x axis dimension.
4 This is Y pin and is used for analog input in y axis dimension.
5 This is Z pin and is used for analog input in Z axis dimension.
Figure
Figure 3.7 Ultrasonic Sensor IC (HC-SR04) [18]
The ultrasonic sensor uses sonar to determine the distance to an object like bats do. It
offers excellent non-contact range detection with high accuracy and stable readings in
an easy-to-use package. From 2cm to 400 cm or 1” to 13 feet. Its operation is not
affected by sunlight or black material like sharp rangefinders are (although
acoustically soft materials like cloth can be difficult to detect). It comes complete
Page | 15
with an ultrasonic transmitter and receiver module.It emits an ultrasound at 40 000 Hz
which travels through the air and if there is an object or obstacle on its path It will
bounce back to the module. Considering the travel time and the speed of the sound
you can calculate the distance.
3.11.1 Features:
In order to generate the ultrasound, you need to set the Trig on a High State for 10 µs.
That will send out an 8 cycle sonic burst which will travel at the speed sound and it
will be received in the Echo pin. The Echo pin will output the time in microseconds
the sound wave traveled.
Page | 16
For example, if the object is 10 cm away from the sensor, and the speed of the sound
is 340 m/s or 0.034 cm/µs the sound wave will need to travel about 294 u seconds.
But what you will get from the Echo pin will be double that number because the
sound waves needs to travel forward and bounce backward. So in order to get the
distance in cm, we need to multiply the received travel time value from the echo pin
by 0.034 and divide it by 2.
Sensors for vibration are sensors that operate according to different mechanical or
optical principles to detect vibrations of an observed system. The measurement of
vibrations can be done using various types of sensors. Although there are no direct
vibration sensors, vibrations can be measured indirectly, deducing values from classic
mechanical or optical quantities. These sensors differ in some features. Among other
things they can be divided based on active and passive behavior, there are sensors that
measure relative and others absolute. Other distinctive features are frequency range,
signal dynamics and the quality of the measurement data. The following sensors
shown here were first structured in a contacting and a non-contacting group and
within these in the sub items path, velocity and acceleration measurement.
Page | 17
3.12.1 Features
• Battery Powered: Batteries supply the main power for the device operation.
This is not for backup supply.
• Corrosion Resistant: Corrosion-resistant alloys can be formulated for a wide
range of aggressive well bore conditions. However, cost generally determines
the viability of any particular completion design. Alloys with high chrome
content are commonly used for tubing string
• Event Triggered: Device can be set to capture/log data when an event happens.
• Self Test / Diagnostics / Self Calibrating: The instrument has self-test or
diagnostic ability.
• Self Generating: The device requires no external power supply for operation.
3.13 Transformer
A 230/12V step down transformer is used to convert the 230 V AC to 12V AC. A
bridge rectifier circuit is a common part of the electronic power supplies. Many
electronic circuits require rectified DC power supply for powering the various
electronic basic components from available AC mains supply. We can find this
rectifier in a wide variety of electronic AC power devices like home appliances, motor
controllers, a modulation process, welding applications, etc.The bridge rectifier circuit
diagram consists of various stages of devices like a transformer, Diode Bridge,
filtering, and regulators. The first stage of the circuit is a transformer which is a step-
down type that changes the amplitude of the input voltage. Most of the projects use
a230/12V transformer to step-down the AC mains 230V to 12V AC supply. Next
stage is a diode-bridge rectifier which uses four or more diodes depending on the type
of bridge rectifier. Choosing a particular diode or any other switching device for a
corresponding rectifier needs some considerations of the device like Peak Inverse
Voltage (PIV), forward current If, voltage ratings, etc. It is responsible for producing
unidirectional or DC current at the load by conducting a set of diodes for every half
cycle of the input signal.
Page | 18
Figure 3.9.1 Output Waveforms of 220V/12V rectifier [22]
Since the output after the diode bridge rectifiers is of pulsating nature, and for
producing it as a pure DC, filtering is necessary. Filtering is normally performed with
one or more capacitors attached across the load, as you can observe in the below
figure wherein smoothing of the wave is performed. This capacitor rating also
depends on the output voltage.
Page | 19
2 Ground (0V) Ground
3 Regulated output; 5V (4.8V-5.2V) Output
3.15 Buzzer
3.15.1 Features
Page | 20
3.15.2 Pin Description
Table 6 Buzzer Pin Description
A 16 x 4 character LCD display with white text on a vivid blue backlit LCD. The
pictures don't do justice to the bright blue background with clear white text of these
display.4 lines of 16 characters. Standard Hitachi HD44780 compatible interface for
easy connection to microcontrollers.
Dimensions
Page | 21
3.16.2 Interface Pin Function
Table 7 LCD Interface Pin description
Pin No. Symbol Description
1 Vss Ground
2 VDD Power supply for logic
3 Vo Contrast Adjustment
4 Rs Data/ Instruction select signal
5 R/W Read/Write select signal
6 E Enable signal
7-14 DB0~DB7 Data bus line
15 A Power supply for B/L +
16 K Power supply for B/L -
As is evident from its name, LED (Light Emitting Diode) is basically a small light
emitting device that comes under “active” semiconductor electronic components. It’s
quite comparable to the normal general purpose diode, with the only big difference
being its capability to emit light in different colors. The two terminals (anode and
cathode) of a LED when connected to a voltage source and the correct polarity may
produce lights of a different color, as per the semiconductor substance used inside it.
Page | 22
3.17.1 Working Principle:
3.18 Resistor
Where I is the current through the conductor in units of amperes, V is the potential
difference measured across the conductor in units of volts, and R is the resistance of
the conductor in units is (ohms). The ratio of the voltage applied across a resistor's
terminals to the intensity of current in the circuit is called its resistance, and this can
be assumed to be a constant (independent of the voltage) for ordinary resistors
working within their ratings
Page | 23
3.29 Jump Wire
A wire is a single, usually cylindrical, flexible strand. Wires are used to bear carry
electricity and telecommunications signals. Standard sizes are determined by various
wire gauges. The term wire is also used more loosely to refer to a bundle of such
strands, as in 'multi-stranded wire', which is more correctly termed a wire rope in
mechanics, or a cable in electricity. Although usually circular in cross-section, the
wire can be made in square, hexagonal, flattened rectangular or other cross-sections,
either for decorative purposes or for technical purposes such as high-efficiency voice
coils in loudspeakers. Edge-wound coil springs, such as the Slinky toy, are made of
special flattened wire.
Page | 24
Chapter IV
System Design and Fabrication
4.1 Introduction
In this chapter fully discuss about the project design and fabrication. A general block
diagram has been developed and implement according diagram. Here we described
overall project description, implementation procedure and working principle. Total
project flow chart is also available in this chapter.
4.2Block Diagram
Power
Supply
Microcontroller
Ultrasonic
Sensor GSM Module
Acceleration
Sensor Hospital/Police Station/
Service Center
Vibration
Sensor
Buzzer
GPS Module
Page | 25
4.3 Circuit Diagram
Page | 26
4.4 System Description
Accident Detection:
An accelerometer sensor senses the accident when the vehicles are fallen down
detection x, y, z. initially the angle of the vehicle is zero degree and it could be
increase 360 degrees towards any axis. If the angle of the vehicle rises in any
direction exceeds our threshold value, the accelerometer considers the situation as an
accident. The threshold value in X and Y axis are 320 and 320, respectively. The
sensor has sent the signal to the microcontroller. We have used two ultrasonic sensors
in front and back of the vehicle. Ultrasonic sensor is always turn on when any object
reaches within 5 cm of the vehicle which sometimes create false prediction of
collision.
Location Tracking:
The GPS sensor can detect the current location of the vehicle. In our proposed system
we use the GPS device to find the exact accident location. When microcontroller
receives any signal of accident it requests for current location of accident spot to the
GPS. The GPS sends the location of accident spot to the microcontroller.
Sending Notification:
With accident location link GSM sends text message to the hospital and police control
room. The hospital and police control room will get a message along with the map
link which will contain the exact latitude and longitude details of the location. In the
same time, nearest police station receives an accident occurs message with link
Google map. With the help of these details, the ambulance can take the shortest route
to the accident location and reduce the time to save the victim.3.4.1System
Description Model
Page | 27
4.6 Flow Chart of the System
First thing first, our system being started after that all of the machenism will be
initialized that means all the functionality is being started. After the initialization of
the sytem, all of the sensor data will be collected. Here we used three different types
of sensor, those are perform different task. First of all, the ultrasonic sensor get the
object distance that come forword to the vehcile and buzzer will be on otherwise it
will go back to the system. After that, our system will check that the vehcile is shaked
or not and it will measure by the accelerometer sensor. If the vehcile shake much then
the system make sure that the accident is detected. After accident detection, our
system will pass signal through the GSM module and GSM send SMS and the
location where the accident occure to the saved numbers. If not shake the system will
follow normally. The vibration sensor response by any kind of stroke. If vehcile get
stroke strongly, the vibration sensor make sure that the accident occurred. Similarly,
our system will generate signal and will pass through the GSM module and GSM send
SMS and the location where the accident occure to the saved number.
Page | 28
Chapter V
Result and Discussion
5.1 Introduction
This chapter contains the results obtained and discussion about the full project. We
have also covered discussions about advantages, limitation, application and estimated
cost of the current version of the vehicle accident detection.
Page | 29
5.3.1 Angles Calculation of Vibration Sensor (ADXL335)
• Angle of inclination means by how much angle the device is tilted from its
plane of surface.
• Angle of inclination is shown in below figure.
• To calculate angle of inclination of X, Y, Z axis from its reference, we need to
use below formulas.
We can calculate angle of inclination or tilt by using X, Y, Z’s value. Also, we can
calculate Roll, Pitch and Yaw angles with respect to X, Y and Z axis. So first we need to
convert 10-bit ADC values into g unit. As per ADXL335 datasheet maximum voltage
level at 0g is 1.65V and sensitivity scale factor of 330m.V/g.
Above formula gives us acceleration values in g unit for X, Y and Z axis as,
Axout = (((X axis ADC value * Vref) / 1024) – 1.65) / 0.330
Ayout = (((Y axis ADC value * Vref) / 1024) – 1.65) / 0.330
Azout = (((Z axis ADC value * Vref) / 1024) – 1.65) / 0.330
Page | 30
5.4 Frequency response of vibration sensor (ADXL335)
Sensor is made up of a small spring mechanism, which makes the contact ON when
the applied vibration force is at above a certain threshold. It has two legs coming out
of it. Normally the two terminals are insulated by a resistance value more than
10MOhm. When someone applies vibratory force on the switch, spring inside the
switch vibrates and makes a momentary short circuit between the two terminals.
Internal spring mounted system to detect vibration. As spring system moves it
contacts with the outer wall and generates output voltage.
The internal spring mounted system moves when the sensor is acted upon by external
stimuli. The resultant movement within the Vibration Sensor or Shake switches
results in a change in electrical voltage. This change in voltage can be measured by
any micro-controller unit such as an Arduino Uno.
Page | 31
5.5 Ultrasonic Distance Measurement Sensor
The timing diagram of HC-SR04 is shown. To start measurement, Trig of SR04 must
receive a pulse of high (5V) for at least 10us, this will initiate the sensor will transmit
out 8 cycle of ultrasonic burst at 40kHz and wait for the reflected ultrasonic burst.
When the sensor detected ultrasonic from receiver, it will set the Echo pin to high
(5V) and delay for a period (width) which proportion to distance. To obtain the
distance, then we get sound in buzzer.
Page | 32
Step2: Power supply into the device and showing Automatic Vehicle Accident
Detection and messaging system using GPS and GSM module ready.
Page | 33
• Efficient and low-cost design
• Low power consumption
• The programming of the Arduino is easy.
• Can be modified easily.
Page | 34
Chapter VI
Conclusion and Future Work
6.1 Conclusion
This project presents vehicle accident detection and alert system with SMS to the
user defined mobile numbers. The GPS tracking and GSM alert based algorithm is
designed and implemented. The proposed vehicle accident detection system can track
geographical information automatically and sends an alert SMS regarding accident.
The system is successfully implemented and tested. After the detailed experiment, it is
observed that this system is efficient and reliable.
Page | 35
References
[3] S. R. Sontakke and A. Gawande, "Crash Notification System for Portable Devices,"
INTERNATIONAL JOURNAL OF ADVANCE COMPUTER TECHNOLOGY, vol. 2,
no. 3, pp. 33-38, 2013.
[4] H. M. Ali and Z. S. Alwan, "Car accident detection and notification system using
smartphone". LAP LAMBERT Academic Publishing Saarbrucken, 2017.
[5] W. Linli, "Difference analysis of GPS data base sources based on vehicle location
system," in 2011 3rd International Conference on Computer Research and
Development, 2011, vol. 1: IEEE, pp. 421-425.
[6] J. A. Soni Kumari, M. Ghosh, and G. Ghosh, "Review of Automatic Speed Control of
Vehicle using RFID Technology," International Journal of Advanced Research in
Electronics and Communication Engineering (IJARECE) Volume, vol. 5.
[12] Wikipedea (5 February 2014. Retrieved 11August 2014) Watterfall model [Online]
Avalaible: https://en.wikipedia.org/wiki/Waterfall_model
Page | 36
[15] Electro Digital Craft(10 September 2019) GSM Module [Online] Available: https
://www.edcph.com/index.php?route=product/product&product_id=92
[16] Future Electronic (05 September 2019) GPS Module [Online] Available:
https://store.fut-electronics.com/products/ublox-neo-6m-gps-module
[19] Coulton (10 September 2019) Functional block diagram of a typica Ultrasonic Level
Transsmitter [Online] Available:https://www.coulton.com/beginners_guid /e_to_u
ltrasonic_ level_ transmitters.html
[21] Elprocus (10 October 2019) VibrationSensor Working and Applications [Online]
Available:https://www.elprocus.com/vibration-sensor-working/
[23] Electrical 4 U (02 August 2019) Voltage Regulator [Online] Available: https://www
electrical4u.com/voltage-regulator-7805/
[24] Tindie (09 August 2019) Buzzer [Online] Available: https:// www.tindie.com/
products/blinkingsilver/passive-buzzer-module-for-arduino/
[25] Last Minute Engineer (02 August 2019) [Online] Available: https:// Last minute
engineers .com /arduino-1602-character-lcd-tutorial/
[26] Wikipedia ( 02 August 2019) LED Bulb [Online] Available : https ://en.wikipedia
.org/wiki/Light-emitting_diode
[28] Wikipedia (24 December 2019) Jump Wire [Online] Available : https:// en.wikipedia
.org/wiki/Jump_wire
[30] Electrons ( 05 September 2019) Vibration sensor switch shake [Online] Available:
http://www.electroons.com/blog/sw18020p-vibration-switch-shake-switch-testing/
Page | 37
Appendix
Arduino UNO code for accident detection:
#include <TanyGPS,h>
#include <SoftwareSerial,h>
#include <LiquidCrystal,h>
// LCD module connections (RS, E, D4, D5, D6, D7)
LiquidCrystal lcd(13, 12, 11, 10, 9, 8)
SoftwareSerial Gsm(7, 6);
char phone_no[] = "+8801758513017"; //replace with phone no. to get sms
char phone_no2[] = "+8801758513017"; //replace with phone no. to get sms
char phone_no3[] = "+8801758513017"; //replace with phone no. to get sms
const int xpin = A0;
const int ypin = A1;
const int zpin = A2;
TinyGPS gps; //Creates a new instance of the TinyGPS object
int trigPin1=5
int echoPin1=4
int trigPin2=A3
int echoPin2=A4
int vibr = A5
int led1 =3
int led2 =2
float duration
float cm
void setup()
{
Serial.begin(9600)
Gsm.begin(9600)
lcd.begin(16, 2)
pinMode(trigPin1, OUTPUT)
pinMode(echoPin1, INPUT)
pinMode(trigPin2, OUTPUT)
pinMode(echoPin2, INPUT)
pinMode(led1,OUTPUT)
pinMode(led2,OUTPUT)
}
void loop()
{
int vibration=analogRead(vibr);
int x = analogRead(xpin);
delay(10);
int y = analogRead(ypin);
delay(10);
int z = analogRead(zpin);
//delay(10);
Page | 38
lcd.setCursor(0, 0);
lcd.print("P1: ");
lcd.print(phone_no);
lcd.setCursor(0, 4);
lcd.print("P2: ");
lcd.print(phone_no2);
//delay(5000);
lcd.setCursor(0, 4);
lcd.print("P3: ");
lcd.print(phone_no3);
bool newData = false;
unsigned long chars;
unsigned short sentences, failed;
// For one second we parse GPS data and report some key values
for (unsigned long start = millis(); millis() - start < 100;)
Serial.println(x);
Serial.print("\t");
//delay(400);
Serial.println(y);
Serial.print("\t");
Serial.println(z);
Serial.print("\n");
Serial.print("Vibration: ");
Serial.print(vibration);
Serial.print("\n");
{
while (Serial.available())
{
char c = Serial.read();
Serial.print(c);
if (gps.encode(c))
newData = true;
}
}
if (vibration>500)
{Serial.println ("Aler");
smsvibe();
delay(3000);
smsvibe1();
delay(3000);
smsvibe2();}
{
float flat, flon;
unsigned long age;
lcd.clear();
lcd.setCursor(0, 0);
Page | 39
lcd.print("Sending msg");
gps.f_get_position(&flat, &flon, &age);
Gsm.print("AT+CMGF=1\r");
delay(40000);
//Message p1
Gsm.print("AT+CMGS=\"");
Gsm.print(phone_no);
Gsm.println("\"");
delay(300);
Gsm.print("Accident occurred\nAlert Location P1:\n");
Gsm.print("http://maps.google.com/maps?q=");
// Gsm.print("Latitude = ");
Gsm.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
//Gsm.print(" Longitude = ");
Gsm.print(",");
Gsm.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
delay(200);
Gsm.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);
Gsm.println();
delay(3000);
//Message p2
Gsm.print("ART+CMGF=1\r");
delay(4000);
Gsm.print("ART+CMGS=\"");
Gsm.print(phone_no2);
Gsm.println("\"");
delay(300);
Gsm.print("Accident occurred\nAlert Location P2:\n");
Gsm.print("http://maps.google.com/maps?q=");
// Gsm.print("Latitude = ");
Gsm.print(flat == TinyRGPS::GRPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
//Gsm.print(" Longitude = ");
Gsm.print(",");
Gsm.print(flon == TinyGPS::GPRS_INVALID_F_ANGLE ? 0.0 : flon, 6);
delay(200);
Gsm.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);
Gsm.println();
delay(3000);
//Message p3
Page | 40
Gsm.print("ART+CMGF=1\r");
delay(400);
Gsm.print("ART+CMGS=\"");
Gsm.print(phone_no3);
Gsm.println("\"");
delay(300);
Gsm.print("Accident occurred\nAlert Location P3:\n");
Gsm.print("http://maps.google.com/maps?q=");
// Gsm.print("Latitude = ");
Gsm.print(flat == TinyGRPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
//Gsm.print(" Longitude = ");
Gsm.print(",");
Gsm.print(flon == TinyGPS::RGPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
delay(200);
Gsm.println((char)26); // End ART command with a ^Z, ASCII code 26
delay(200);
Gsm.println();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("messege send");
Serial.println("messege send");
delay(10);
}
delay(10);
Serial.println(failed);
// if (chars == 0)
// Serial.println("* No characters received from GPS: check wiring *");
ulta ();
}
void ulta() {
long duration1, distance1;
digitalWrite(trigPin1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin1, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin1, LOW);
duration1 = pulseIn(echoPin1, HIGH);
distance1 = (duration1/2) / 29.1;
Page | 41
if((distance1<=100))
{
digitalWrite(led1, HIGH);
}
else if(distance1>100)
{
digitalWrite(led1, LOW);
}
}
delay(10);
long duration2, distance2;
digitalWrite(trigPin2, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin2, HIGH);
delayMicroseconds(10); // Added this line
digitalWrite(trigPin2, LOW);
duration2 = pulseIn(echoPin2, HIGH);
distance2= (duration2/2) / 29.1;
delay(10);
if((distance2<=100))
{
digitalWrite(led2, HIGH);
}
else if(distance2>100)
{
digitalWrite(led2, LOW);
}
}
//delay(1000);
}
void smsvibe()
{
float flat, flon;
unsigned long age;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Sending msg");
Serial.println("Sending msg");
Page | 42
gps.f_get_position(&flat, &flon, &age);
Gsm.print("ART+CMGF=1\r");
delay(400);
//Message p1
Gsm.print("ART+CMGS=\"");
Gsm.print(phone_no);
Gsm.println("\"");
delay(300);
Gsm.print("Vehichle is in trouble \nAlert Location P1:\n");
Gsm.print("http://maps.google.com/maps?q=");
// Gsm.print("Latitude = ");
Gsm.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
//Gsm.print(" Longitude = ");
Gsm.print(",");
Gsm.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
delay(200);
Gsm.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);
Gsm.println();
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("messege send");
Serial.println("messege send");
}
void smsvibe1()
{
float flat, flon;
unsigned long age;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Sending msg");
Serial.println("Sending msg");
gps.f_get_position(&flat, &flon, &age);
Gsm.print("AT+CMGF=1\r");
delay(400);
//Message p1
Gsm.print("AT+CMGS=\"");
Gsm.print(phone_no2);
Gsm.println("\"");
delay(300);
Gsm.print("Vehichle is in trouble \nAlert Location P2:\n");
Gsm.print("http://maps.google.com/maps?q=");
// Gsm.print("Latitude = ");
Page | 43
Gsm.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
//Gsm.print(" Longitude = ");
Gsm.print(",");
Gsm.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
delay(200);
Gsm.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);
Gsm.println();
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("messege send");
Serial.println("messege send");
}
void smsvibe2()
{
float flat, flon;
unsigned long age;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Sending msg");
Serial.println("Sending msg");
gps.f_get_position(&flat, &flon, &age);
Gsm.print("AT+CMGF=1\r");
delay(400);
//Message p1
Gsm.print("AT+CMGS=\"");
Gsm.print(phone_no3);
Gsm.println("\"");
delay(300);
Gsm.print("Vehichle is in trouble \nAlert Location P3:\n");
Gsm.print("http://maps.google.com/maps?q=");
// Gsm.print("Latitude = ");
Gsm.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
//Gsm.print(" Longitude = ");
Gsm.print(",");
Gsm.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
delay(200);
Gsm.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(200);
Gsm.println();
delay(1000)
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("messege send");
Serial.println("messege send");
}
Page | 44