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

Arduino Based Vehicle Accident Alert System Using GPS

This project builds a vehicle accident alert system using an Arduino, GPS module, GSM module, and accelerometer. The accelerometer detects sudden changes in movement that could indicate an accident. The GPS module then gets the location coordinates from satellites. The Arduino sends an alert SMS message via the GSM module to predefined phone numbers. The message includes the accident location coordinates as a Google Maps link. This allows emergency responders to quickly locate the vehicle in need of assistance.

Uploaded by

Mxolisi Mtn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

Arduino Based Vehicle Accident Alert System Using GPS

This project builds a vehicle accident alert system using an Arduino, GPS module, GSM module, and accelerometer. The accelerometer detects sudden changes in movement that could indicate an accident. The GPS module then gets the location coordinates from satellites. The Arduino sends an alert SMS message via the GSM module to predefined phone numbers. The message includes the accident location coordinates as a Google Maps link. This allows emergency responders to quickly locate the vehicle in need of assistance.

Uploaded by

Mxolisi Mtn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Arduino Based Vehicle Accident Alert System

using GPS, GSM and Accelerometer

Here in this project, we are going to build a 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
Components Required:
Arduino Uno
GSM Module (SIM900A)
GPS Module (SIM28ML)
Accelerometer (ADXL335)
16x2 LCD
Power Supply
Connecting Wires
10 K-POT
Breadboard or PCB
Power supply 12v 1amp

GPS Module and Its Working:


GPS stands for Global Positioning System (http://circuitdigest.com/article/what-is-gps) 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. GPS module sends the data related to
tracking position in real time, and it sends so many data in NMEA format. 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. 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.000,7791.0381,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

Altitude Altitude (meters above from sea level)


M Meter

Height Height

Checksum Checksum Data

GSM Module:

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 AMR926EJ-S core
Quad - band GSM/GPRS module in small size.
GPRS Enabled

AT Command:

AT means ATTENTION. This command is used to control GSM module. 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

Accelerometer:

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. ST This pin used for set sensitivity of sensor

Circuit Explanation:
Circuit Connections of this Vehicle Accident Alert System Project is simple. Here Tx pin of GPS
module is directly connected to digital pin number 10 of Arduino , we have allowed serial
communication on pin 10 and 11, 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
Software Serial 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 6, 7, 8, and 9 of
Arduino. Command pin RS and EN of LCD are connected with pin number 4 and 5 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 A1, A2, and A3
Circuit diagram

Working 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 SIM28ML 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 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 (1.852 KPH), is also sent in the SMS and
displayed on the LCD pane
BLOCK DIAGRAM

Here in this project, we can set the sensitivity of Accelerometer by putting min and max value in the
code.

Here in the demo have used given values:

But for better results you can use 200 in place of 50, or can set according to your requirement
Programming Explanation:
Complete Program has been given below in Code section; here we are explaining its various
functions in brief.

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.
After this, in void setup() function, we have initialized hardware and software serial communication,
LCD, GPS, GSM module and accelerometer.

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).
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

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

You might also like