0% found this document useful (0 votes)
77 views

MINOR BTP Report - Arduino Based Vehicle Accident Alert System Using GPS, GSM and Accelerometer

This document describes an Arduino-based vehicle accident alert system that uses an accelerometer, GPS module, and GSM module. When an accident is detected by the accelerometer, the system will use the GPS module to get the location of the accident and then send an alert SMS message with the location to registered phone numbers using the GSM module. The goal is to automatically detect vehicle accidents and notify emergency services as quickly as possible of the accident location to help direct medical assistance.

Uploaded by

deepak kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

MINOR BTP Report - Arduino Based Vehicle Accident Alert System Using GPS, GSM and Accelerometer

This document describes an Arduino-based vehicle accident alert system that uses an accelerometer, GPS module, and GSM module. When an accident is detected by the accelerometer, the system will use the GPS module to get the location of the accident and then send an alert SMS message with the location to registered phone numbers using the GSM module. The goal is to automatically detect vehicle accidents and notify emergency services as quickly as possible of the accident location to help direct medical assistance.

Uploaded by

deepak kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 40

ARDUINO BASED VEHICLE ACCIDENT ALERT

SYSTEM USING GPS, GSM AND ACCELEROMETER


A Minor Project
Report

Submitted by__
In partial fulfilment for the award of the Degree
Of

BACHELOR OF TECHNOLOGY
In
ELECTRONICS & COMMUNICATION
ENGINEERING

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


(Department of Electronics and Communication Engineering)

Page | 1
ABSTRACT

Nowadays we are able to track vehicles using many applications


which help in securing personal vehicles, public vehicles, feet units
and others. Furthermore there is a rapid increase in the occurrence of
the Road accident. This paper is about a system which is developed to
automatically detect an accident and alert the nearest hospitals and
medical services about it. This system can also locate the place of the
accident so that the medical services can be directed immediately
towards it. The goal of this paper is to build up a Vehicle accidental
monitoring system using MEMS, GPS and GSM Technology. The
system comprises of accelerometer, MCU, GPS & GSM Module
support in sending message. The accelerometer is used to detect fall
and Threshold Algorithm are used to detect accident. Short Message
will contain GPS [Latitude, Longitude] which helps in locating the
vehicles.

~o~o~o~

Page | 2
Chapter No. TABLE OF CONTENTS

1. TITLE
2. ABSTRACT Page No.
INTRODUCTION 4
PROCESS AND REQUIREMENT SPECIFICATION 6
3.
4. • HARDWARE REQUIREMENT 7

5. BLOCK DIAGRAM 7

6. BLOCK DIAGRAM EXPLANATION 17


CIRCUIT DIAGRAM 17-18
7.
HARDWARE IMPLEMENTATION 19

PROGRAMMIG AND EXPLANATION 20


8.
21
• PROGRAMMING FLOW CHART
24
9. • EXPLANATION OF FLOW CHART
10. OUTPUT 33

11. ADVANTAGES 34
12. FUTURE SCOPE 35
13. CONCLUSION 39
BIBLIOGRAPHY 39
40
41

~o~o~o~

Page | 5
1. INTRODUCTION

In present days the rate of accidents can be increased rapidly. Due to


employment the usage of vehicles like cars, bikes can be increased,
because of this reason the accidents can be happened due to over
speed. People are going under risk because of their over speed, due to
unavailability of advanced techniques, the rate of accidents can’t be
decreased. To reduce the accident rate in the country this paper
introduces an optimum solution. 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 at a city, the
message is sent to the registered mobile through GSM module in less
time. Arduino is the heart of the system which helps in transferring the
message to different devices in the system. Vibration sensor will be
activated when the accident occurs and the information is transferred
to the registered number through GSM module. GPS system will help
in finding the location of the accident spot. The proposed system will
check whether an accident has occurred and notifies to nearest medical
centers and registered mobile numbers about the place of accident
using GSM and GPS modules. The location can be sent through
tracking system to cover the geographical coordinates over the area.
The accident can be detected by a vibration sensor which is used as
major module in the system.
Here in this project, we are going to build Arduino based
vehicle accident alert system using GPS, GSM and accelerometer.
Accelerometer detects the sudden change in the axes of vehicle and
GSM module sends the alert message on your Mobile Phone with the
location of the accident. Location of accident is sent in the form of
Google Map link, derived from the latitude and longitude from GPS
module. The Message also contains the speed of vehicle in knots. This
Vehicle Accident alert project can also be used as a Tracking System
and much more, by just making few changes in hardware and
software.

~o~o~o~

Page | 4
2. PROCESS AND REQUIREMENT SPECIFICATION

HARDWARE REQUIREMENTS
S Compo Qua Specifications
l nents ntity
.
N
o
.
1 Arduino 1 _
Uno
2 GSM 1 (SIM900A)
Module
3 GPS 1 (NEO 6M)
Module
4 Accelero 1 (ADXL335)
meter
5 16x2 LCD 1 _
6 As _
Connectin
g Wires
Req
d.
7 10 K-POT 1 _
8 Breadboar _ _
d or PCB
9 1

Power
supply

12V, 1 Amp
1 1
DC motor 12V, 0.055 Amp
0

1 . Arduino Uno: -

Page | 5
Arduino is an open-source electronics platform based on easy-to-use hardware
and software. Arduino boards are able to read inputs - light on a sensor, a finger
on a button, or a Twitter message - and turn it into an output - activating a motor,

Page | 6
turning on an LED, publishing something online. You can tell your board what
to do by sending a set of instructions to the microcontroller on the board. To do
so you use the Arduino programming language (based on Wiring), and the
Arduino Software (IDE), based on Processing. Over the years Arduino has been
the brain of thousands of projects, from everyday objects to complex scientific
instruments. A worldwide community of makers - students, hobbyists, artists,
programmers, and professionals - has gathered around this open-source platform,
their contributions have added up to an incredible amount of accessible
knowledge that can be of great help to novices and experts alike. Arduino was
born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping,
aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to
adapt to new needs and challenges, differentiating its offer from simple 8-bit
boards to products for IoT applications, wearable, 3D printing, and embedded
environments. All Arduino boards are completely open-source, empowering
users to build them independently and eventually adapt them to their particular
needs. The software, too, is open-source, and it is growing through the
contributions of users worldwide.

2. GSM Module: -

Page | 7
GSM/GPRS module is used to establish communication between a computer and
a GSM-GPRS system. Global System for Mobile communication (GSM) is an
architecture used for mobile communication in most of the countries.

The SIM900 is a complete Quad-band GSM/GPRS Module which can be


embedded easily used by customer or hobbyist. SIM900 GSM Module provides
an industry-standard interface. SIM900 delivers GSM/GPRS
850/900/1800/1900MHz performance for voice, SMS, Data with low power
consumption. It is easily available in the market.

• SIM900 designed by using single-chip processor integrating AMR926EJS


core
• Quad - band GSM/GPRS module in small size.
• GPRS Enabled

AT Command:

AT means ATTENTION. This command is used to control GSM module. There


are some commands for calling and messaging that we have used in many of our
previous GSM projects with Arduino. For testing GSM Module we used AT
command. After receiving AT Command GSM Module respond with OK. It
means GSM module is working fine. Below is some AT commands we used
here in this project:

ATE0 For echo off


AT+CNMI=2,2,0,0,0 <ENTER> Auto opened message Receiving. (No need to open
message)
ATD<Mobile Number>; <ENTER> making a call (ATD+919610126059;\r\n)
AT+CMGF=1 <ENTER> Selecting Text mode
AT+CMGS=”Mobile Number” <ENTER> Assigning recipient’s mobile number
>>Now we can write our message
>>After writing message
Ctrl+Z send message command (26 in decimal).
ENTER=0x0d in HEX

Page | 8
3. GPS Module: -

GPS stands for Global Positioning System and used to detect the Latitude and
Longitude of any location on the Earth, with exact UTC time (Universal Time
Coordinated). GPS module is used to track the location of accident in our
project. This device receives the coordinates from the satellite for each and every
second, with time and date. We have previously extracted $GPGGA string in
Vehicle Tracking System to find the Latitude and Longitude
Coordinates.
GPS module sends the data related to tracking position in real time, and it sends
so many data in NMEA format (see the screenshot below). NMEA format
consists several sentences, in which we only need one sentence. This sentence
starts from $GPGGA and contains the coordinates, time and other useful
information. This GPGGA is referred to Global Positioning System Fix Data.

Page | 9
We can extract coordinate from $GPGGA string by counting the commas in the
string. Suppose you find $GPGGA string and stores it in an array, then Latitude
can be found after two commas and Longitude can be found after four commas.

Now, this latitude and longitude can be put in other arrays.

Below is the $GPGGA String, along with its description:


$GPGGA,104534.00,7791.038172,N,06727.4434,E,1,08,0.9,510.4,M,43.9,M,,*47

$GPGGA,HHMMSS.SSS,latitude,N,longitude,E,FQ,NOS,HDP,altitude,M,height,M,,checksum
data

Identifier Description

$GPGGA Global Positioning system fix data

HHMMSS.SSS Time in hour minute seconds and milliseconds format.

Latitude Latitude (Coordinate)

N Direction N=North, S=South

Longitude Longitude(Coordinate)

E Direction E= East, W=West

FQ Fix Quality Data

NOS No. of Satellites being Used

HDP Horizontal Dilution of Precision

Page | 10
Altitude Altitude (meters above from sea level)

M Meter

Height Height

Checksum Checksum Data

4. Accelerometer: -

An accelerometer is an electromechanical device that will measure acceleration


force. It shows acceleration, only due to cause of gravity i.e. g force.

The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with
signal conditioned voltage outputs. The product measures acceleration with a

Page | 11
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.

Pin Description of accelerometer:


1. VCC 5 volt supply should connect at this pin.
2. X-OUT This pin gives an Analog output in x direction
3. Y-OUT This pin give an Analog Output in y direction
4. Z-OUT This pin gives an Analog Output in z direction
5. GND Ground
6. STThis pin used for set sensitivity of sensor

5. 16 x 2 LCD Display: -

Page | 12
LCD stands for liquid crystal display. Character and graphical LCD’s are most
common among hobbyist and DIY electronic circuit/project makers. Since their
interface serial/parallel pins are defined so it’s easy to interface them with many
microcontrollers. They are used to show status of the product or provide
interface for inputting or selecting some process. Character LCD come in many
sizes 8x1, 8x2, 10x2, 16x1, 16x2, 16x4, 20x2, 20x4, 24x2, 30x2, 32x2, 40x2 etc.
We have used 16x2 LCD for our project.

6. Standard 10k Potentiometer: -

A potentiometer is a manually adjustable variable resistor with 3 terminals. Two


terminals are connected to both ends of a resistive element, and the third
terminal connects to a sliding contact, called a wiper, moving over the resistive
element. The position of the wiper determines the output voltage of the
potentiometer.

Page | 13
7. DC Motor: -

A DC motor is any of a class of rotary electrical motors that converts direct


current electrical energy into mechanical energy. The most common types rely
on the forces produced by magnetic fields. Nearly all types of DC motors have
some internal mechanism, either electromechanical or electronic; to periodically
change the direction of current in part of the motor.

DC motors were the first form of motor widely used, as they could be powered
from existing direct-current lighting power distribution systems. A DC motor's
speed can be controlled over a wide range, using either a variable supply voltage
or by changing the strength of current in its field windings. Small DC motors are
used in tools, toys, and appliances. The universal motor can operate on direct
current but is a lightweight brushed motor used for portable power tools and
appliances. Larger DC motors are currently used in propulsion of electric
vehicles, elevator and hoists, and in drives for steel rolling mills. The advent of
power electronics has made replacement of DC motors with AC motors possible
in many applications.

Page | 14
8. Printed Circuit Board: -

A printed circuit board (PCB) mechanically supports and electrically connects


electrical or electronic components using conductive tracks, pads and other
features etched from one or more sheet layers of copper laminated onto and/or
between sheet layers of a non-conductive substrate. Components are generally
soldered onto the PCB to both electrically connect and mechanically fasten them
to it.

Printed circuit boards are used in all but the simplest electronic products. They
are also used in some electrical products, such as passive switches.

~o~o~o~

3. BLOCK DIAGRAM

Page | 15
4. BLOCK DIAGRAM EXPLANATION

In this project, Arduino is used for controlling whole the process with a
GPS Receiver and GSM module. GPS Receiver is used for detecting
coordinates of the vehicle, GSM module is used for sending the alert SMS with
the coordinates and the link to Google Map. Accelerometer namely ADXL335
is used for detecting accident or sudden change in any axis. And an optional
16x2 LCD is also used for displaying status messages or coordinates. We have
used GPS Module Neo 6M and GSM Module SIM900A.
When we are ready with our hardware after programming, we can install it
in our vehicle and power it up. Now whenever there is an accident, the car gets
tilt and accelerometer changes his axis values. These values read by Arduino and

Page | 16
checks if any change occurs in any axis. If any change occurs then Arduino reads
coordinates by extracting $GPGGA String from GPS module data (GPS working
explained above) and send SMS to the predefined number to the police or
ambulance or family member with the location coordinates of accident place.
The message also contains a Google Map link to the accident location, so that
location can be easily tracked. When we receive the message then we only need
to click the link and we will redirect to the Google map and then we can see the
exact location of the vehicle. Speed of Vehicle, in knots (KPH), is also sent in
the SMS and displayed on the LCD panel.

Here in this project, we can set the sensitivity of Accelerometer by


putting min and max value in the code.

Here in the project, we have used given values:

#define minVal -50

#define MaxVal 50

~o~o~o~

5. CIRCUIT DIAGRAM

Page | 17
Fig: Circuit Diagram of Accident Alert System.

Circuit Connections of this Vehicle Accident Alert System Project is simple.


Here Tx pin of GPS module is directly connected to digital pin number 3 of
Arduino. By using SoftwareSerial Library here, we have allowed serial
communication on pin 3 and 4, and made them Rx and Tx respectively and left
the Rx pin of GPS Module open. By default Pin 0 and 1 of Arduino are used for
serial communication but by using the SoftwareSerial library, we can allow
serial communication on other digital pins of the Arduino. 12 Volt supply is used
to power the GPS Module. GSM module’s Tx and Rx pins of are directly
connected to pin D2 and D3 of Arduino. For GSM interfacing, here we have also
used software serial library. GSM module is also powered by 12v supply. An
optional LCD’s data pins D4, D5, D6, and D7 are connected to pin number 10,
11, 12, and 13 of Arduino. Command pin RS and EN of LCD are connected with
pin number 8 and 9 of Arduino and RW pin is directly connected with ground. A
Potentiometer is also used for setting contrast or brightness of LCD. An
Accelerometer is added in this system for detecting an accident and its x, y and
z-axis ADC output pins are directly connected to Arduino ADC pin A2, A1, and
A0.

Page | 18
6. HARDWARE IMPLEMENTATION

7. PROGRAMMING AND EXPLANATION

Complete Program has been given below in Code section; here we are
explaining its various functions in brief.

Page | 19
Page | 20
First we have included all the required libraries or headers files and declared
various variables for calculations and storing data temporary.

After this, we have created a function void initModule(String cmd, char *res,
int t) to initialize the GSM module and checking its response using AT
commands.

void initModule(String cmd, char *res, int t)

{ while(1

Serial.println(cmd);

Serial1.println(cmd);

delay(100);

while(Serial1.available()>0)

{ if(Serial1.find(res))

Serial.println(res);

delay(t); return; }

else

Serial.println("Error");
After this, in void setup() function, we have initialized hardware and software

} }

delay(t);

serial communication, LCD, GPS, GSM module and accelerometer.

void setup()

Serial1.begin(9600);
Serial.begin(9600);
lcd.begin(16,2);
lcd.print("Accident Alert

");

");
lcd.setCursor(0,1);

lcd.print(" System

delay(2000);
lcd.clear(); ...
. ......

Accelerometer calibration process is also done in setup loop. In this, we have


taken some samples and then find the average values for the x-axis, y-axis, and
z-axis. And store them in a variable. Then we have used these sample values to
read changes in accelerometer axis when vehicle gets tilt (accident).

lcd.print("Callibrating ");
lcd.setCursor(0,1);

Page | 22
lcd.print("Acceleromiter");

for(int i=0;i<samples;i++)

{ xsample+=analogRead(x);

ysample+=analogRead(y);

zsample+=analogRead(z);

xsample/=samples;

ysample/=samples;

zsample/=samples;

Serial.println(xsample);

Serial.println(ysample);

Serial.println(zsample);

After this, in the void loop() function, we have read accelerometer axis values
and done a calculation to extract changes with the help of samples that are taken
in Calibration. Now if any changes are more or less then defined level then
Arduino sends a message to the predefined number.
void loop()

int value1=analogRead(x);

int value2=analogRead(y);
int value3=analogRead(z);
int xValue=xsample-

value1; int

yValue=ysample-value2;

int zValue=zsample-

value3;

Serial.print("x=");

Serial.println(xValue);

Serial.print("y=");

Serial.println(yValue);

Serial.print("z=");

Serial.println(zValue);

..... .....

........ ...

Here we have also created some other function for various purposes like void
gpsEvent() to get GPS coordinates, void coordinate2dec() for extracting
coordinates from the GPS string and convert them into Decimal values, void
show_coordinate() for displaying values over serial monitor and LCD, and
finally the void Send() for sending alert SMS to the predefined number.

Programming: -
#include<SoftwareSerial.h>
SoftwareSerial Serial1(2,3); //make RX arduino line is pin 2, make
TX arduino line is pin 3.
SoftwareSerial gps(4,5);
#include<LiquidCrystal.h>
LiquidCrystal lcd(8,9,10,11,12,13);

#define x A2
#define y A1
#define z A0

Page | 24
int xsample=0;
int ysample=0;
int zsample=0;
#define buzzerAlert 6 // Buzzer Alert OFF
#define engineMotor 7 // Engine Motor ON

#define samples 10

#define minVal -50


#define MaxVal 50

int i=0,k=0; int


gps_status=0;
float latitude=0;
float logitude=0;
String Speed="";
String gpsString="";
char *test="$GPRMC";

void initModule(String cmd, char *res, int t)


{ while(1)
{
Serial.println(cmd);
Serial1.println(cmd);
delay(100);
while(Serial1.available()>0)
{ if(Serial1.find(res))
{
Serial.println(res);
delay(t); return; }

else
{
Serial.println("Error");
}
}
delay(t);
}
}

void setup()
{
pinMode(engineMotor, OUTPUT);
pinMode(buzzerAlert, OUTPUT);
digitalWrite(engineMotor, LOW); // ON
digitalWrite(buzzerAlert, HIGH); // OFF
Serial1.begin(9600);
Serial.begin(9600);

Page | 25
lcd.begin(16,2); lcd.print("
Smart Accident ");
lcd.setCursor(0,1);
lcd.print(" Alert System ");
delay(3000); lcd.clear();
lcd.print("Initializing");
lcd.setCursor(0,1);
lcd.print("Please
Wait..."); delay(1000);

Serial.println("Initializing....");
initModule("AT","OK",1000);
initModule("ATE1","OK",1000);
initModule("AT+CPIN?","READY",1000);
initModule("AT+CMGF=1","OK",1000);
initModule("AT+CNMI=2,2,0,0,0","OK",1000);
Serial.println("Initialized
Successfully"); lcd.clear();
lcd.print("Initialized");
lcd.setCursor(0,1);
lcd.print("Successfully"); delay(2000);
lcd.clear(); lcd.print("Calibrating ");
lcd.setCursor(0,1);
lcd.print("Accelerometer"); for(int
i=0;i<samples;i++)
{ xsample+=analogRead(x);
ysample+=analogRead(y);
zsample+=analogRead(z);
}

xsample/=samples;
ysample/=samples;
zsample/=samples;

Serial.println(xsample);
Serial.println(ysample);
Serial.println(zsample);
delay(1000);

lcd.clear();
lcd.print("Waiting For GPS");
lcd.setCursor(0,1);
lcd.print(" Signal ");
delay(2000);
gps.begin(9600);
get_gps();
show_coordinate();
delay(2000); lcd.clear();

Page | 26
lcd.print("GPS is
Ready");
delay(1000);
lcd.clear();
lcd.print("System Ready");
Serial.println("System Ready..");
}

void loop()
{ int value1=analogRead(x);
int value2=analogRead(y);
int value3=analogRead(z);

int xValue=xsample-value1;
int yValue=ysample-value2;
int zValue=zsample-value3;

Serial.print("x=");
Serial.println(xValue);
Serial.print("y=");
Serial.println(yValue);
Serial.print("z=");
Serial.println(zValue);

if(xValue < minVal || xValue > MaxVal || yValue < minVal ||


yValue > MaxVal || zValue < minVal || zValue > MaxVal)
{ digitalWrite(engineMotor, HIGH); // Engine Motor OFF
digitalWrite(buzzerAlert, LOW); // Buzzer Alert ON
lcd.clear();
lcd.print("Accident Detectd");
delay(4000); get_gps();
show_coordinate();
lcd.clear();
lcd.print("Sending SMS");

Page | 27
Serial.println("Sending SMS"); // Engine Motor ON
delay(2000); // Buzzer Alert OFF
Send();
lcd.clear();
lcd.print("SMS Sent");
Serial.println("SMS Sent");
delay(2000);
}
else
{ digitalWrite(engineMotor, LOW);
digitalWrite(buzzerAlert, HIGH);
lcd.clear();
lcd.print("System Ready");
delay(2000); //Serial incoming data from
}
}

void gpsEvent()
{ gpsString=""; //store incoming data
while(1)
{ while
(gps.available()>0)
GPS
{ char inChar =
//check for right
(char)gps.read(); gpsString+=
inChar;
from GPS to temparary string str[] i+
+;
Serial.print(inChar);
if (i < 7)
{ if(gpsString[i-1] != test[i-1])
string
{ i=0;
gpsString="";
}
}
if(inChar=='\r')
{ if(i>60
)
{ gps_status=1;
break; } else
Page | 28

Page | 29
{ i=0;
}
}
}
if(gps_status)
break;
}
}

void get_gps()
{ lcd.clear();
lcd.print("Getting GPS Data");
lcd.setCursor(0,1);
lcd.print("Please Wait.....");
delay(2000); gps_status=0; int
x=0; while(gps_status==0)
{ gpsEvent(); int
str_lenth=i;
coordinate2dec();
i=0;x=0;
str_lenth=0;
}
}

void show_coordinate()
{ lcd.clear();
lcd.print("Lat:");
lcd.print(latitude);
lcd.setCursor(0,1);
lcd.print("Log:");
lcd.print(logitude);
Serial.print("Latitude:");
Serial.println(latitude);
Serial.print("Longitude:");
Serial.println(logitude);
Serial.print("Speed(in knots)=");
Serial.println(Speed);
delay(2000); lcd.clear();
lcd.print("Speed(Knots):");
lcd.setCursor(0,1);
lcd.print(Speed);
}

void coordinate2dec()
{
String lat_degree="";
for(i=19;i<=20;i++)
lat_degree+=gpsString[i];

String lat_minut="";
for(i=21;i<=28;i++)
lat_minut+=gpsString[i];

Page | 30
String log_degree="";
for(i=32;i<=34;i++)
log_degree+=gpsString[i];

String log_minut="";
for(i=35;i<=42;i++)
log_minut+=gpsString[i];

Speed="";
for(i=46;i<=49;i++) //extract longitude from string
Speed+=gpsString[i];

float minut= lat_minut.toFloat();


minut=minut/60;
float degree=lat_degree.toFloat();
latitude=degree+minut;

minut= log_minut.toFloat();
minut=minut/60;
degree=log_degree.toFloat();
logitude=degree+minut;
}

void Send()
{
Serial1.println("AT");
delay(500);
serialPrint();
Serial1.println("AT+CMGF=1");
delay(500); serialPrint();
Serial1.print("AT+CMGS=");
Serial1.print('"');
Serial1.print("7205159093"); //mobile no. for SMS alert
Serial1.println('"');
delay(500); serialPrint();
Serial1.println("Accident Detected! ");
Serial1.print("Latitude:");
Serial1.println(latitude);
delay(500); serialPrint();
Serial1.print(" longitude:");
Serial1.println(logitude);
delay(500); serialPrint();
Serial1.print(" Speed:");
Serial1.print(Speed);
Serial1.println("Knots")
; delay(500);
serialPrint();
Serial1.print("http://maps.google.com/maps?&z=15&mrt=yp&t=k&q=");
Serial1.print(latitude,6);
Serial1.print("+"); //28.612953, 77.231545
//28.612953,77.2293563

Page | 31
Serial1.print(logitude,6);
Serial1.write(26);
delay(2000);
serialPrint();
}

void serialPrint()
{ while(Serial1.available()>0)
{
Serial.print(Serial1.read());
}
}

~o~o~o~

8. FLOW CHART

START

Page | 32
CHECK CONNECTIVITY AND
RESPONSE OF SENSORS

OBSERVE FOR ANY ACCIDENT


THROUGH SENSORS

No
ACCIDENT
OCCURS?

Yes

TRIGGER ALARM AND SEND


MESSAGE TO RESCUE TEAM

No Yes
FALSE
ALARM?

FLOW CHART EXPLANATION

• So overall, the flow chart starts with checking the connectivity and
response of all the sensors.
• Now when the vehicle starts, all the sensors will be activated and these
sensors will be observing for any accidents to occur.

Page | 33
• If sensors detect accident, it will first check whether accident really
occurred or it is a false alarm.

• If the alarm is false, then the sensors will continue to observe for any kind
of accidents.

• Now if an accident is detected then the sensors will trigger an alarm and
GSM module will send message to the rescue team.

• The message that is sent will contain all the information about the
accident like location, co-ordinates, speed of the vehicle and a Google
map link of the location of the accident.

~o~o~o~

9. OUTPUT

• In this below figure, when the vehicle starts, all the sensors starts to calibrate
themselves. When these sensors are calibrated and the connectivity and
response of all sensors are good then our vehicle alert system will become
ready.
• The figure shows that our system is ready-

Page | 34
• In this below figure it can be seen that the system is
calibrating the accelerometer-

• After the calibration of the accelerometer the GPS gets initialized –

Page | 35
• After the initialization, it looks for the co-ordinates of the place –

Page | 36
• After getting the location, it looks for the speed in knots-

• After the accident is detected, the device sends message to that mobile phone
whose number is registered in our device –

Page | 37
~o~o~o~

10. ADVANTAGES

• Isolates both GSM&GPM


• Alerts police and medical units about accidents  Simple design and can be
interfaced with other systems.
• Easy to operate by the user.
• Reliable system.
• Easy to operate.
• Monitors hazards and threats.
• Sophisticated security.
• Simple and Reliable Design

11. FUTURE SCOPE

Page | 38
A wireless webcam can be added in this for capturing the images which will
help in providing driver`s assistance. This can also be bettered by locking all the
brakes automatically in case of accident. Mostly in accidents, it becomes serious
as the drivers lose control and fail to stop the vehicle. In such cases, the
vibration sensor will be triggered because of the vibrations received and also
processed by the processor. The processor has to be linked to the devices which
can lock the brakes when triggered. With this improvement, we can stop the
vehicle and can weaken the impact of the accident. This system can also be
utilized in fleet management, food services, traffic violation cases, rental vehicle
services etc.

~o~o~o~

12. CONCLUSION

Our idea is used to detect accident and automate emergency assistance services.
As a result, system is sending SMS to the nearest Emergency assistance service
provider from accident location. 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. This design is a
system which can detect accidents in significantly less time and sends the basic
information. 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 and the message is sent through the GSM module

~o~o~o~

Page | 39
13. BIBLIOGRAPHY

• https://circuitdigest.com/sites/default/files/inlineimages/Arduino-Vehicle-
Accident-Alert-System-with-GPS-GSM-and-Accelerometer.jpg

• http://ijitee.org/wp-content/uploads/papers/v8i4s2/D1S0048028419.pdf

• https://www.hackster.io/TechnicalEngineer/accident-detection-
andmessaging-system-using-gsm-and-gps-21fb76

• https://www.analog.com/media/en/technical-documentation/datasheets/
ADXL335.pdf

• https://www.sparkpcb.com/images/watermarked/1/detailed/2/NEO-
6M_GPS_Module.jpg

• https://cdnmedia.itead.cc/media/catalog/product/cache/1/image/
9df78eab33525d08d
6e5fb8d27136e95/i/m/im120525010_8_1.jpg

Page | 40

You might also like