You are on page 1of 55



In todays world there is a severe increase in the use of vehicles. Such heavy automobile usage
has increased traffic and thus resulting in a rise in road accidents. This takes a toll on the
property as well as causes human life loss because of unavailability of immediate safety
facilities. Complete accident prevention is unavoidable but at least repercussions can be
reduced. Proposed system makes an effort to provide the emergency facilities to the victims in
the shortest time possible. In big organizations the drivers make illegal use of the vehicles thus
resulting in financial, time loss of the organization, Apart from these purposes the system can
be used for tracking of stolen vehicles or travelling luggage, fleet management and vehicular
sales etc. The system incorporates a single-board embedded system that contains GPS and
GSM modems connected with a microcontroller. The entire set-up is installed in the vehicle. A
vibration sensor is used. It measures the vibration at the location it is placed. The signal is then
compared with the standard values which further confers the accident of the car, unnecessary
shock or vibration produced by machines, tilt of the car with respect to the earths axis can be
identified with the level of acceleration. Global Positioning System (GPS) is used to identify
is used to inform the exact vehicular location to the prerecorded numbers. Message will give
longitude and latitude values. From these values location of accident can be determined. GSM
modem provides a two way communication by using a SIM card. Such a module works the
same as a regular phone. The project aims at intelligent security system providing situational
awareness and agile safety.

1.1 Why This Project?

It is often observed that due to unavailability of rescue or help facilities. The victim loses his
life due to poor response time. It needs a man driven effort to make the concerned authorities
aware about the situation and the urgency of help. In high densely populated area such delay
has adverse affects as number of vehicles plying on roads are considerably large. This system
inherits delay which brings fatal consequences due to late arrival of the ambulance and related
facilities. It has now become need to introduce such automated system that can signal itself to
the immediate authorities without need of human intervention to propose a call for help.

Figure 1.1 Histogram representation of road accidents and deaths


Table 1.1 Number of accidents and fatal injuries due to severe accident

1.2 Automatic Accident Detection and Reporting System Using GSM and
Application of our project can significantly shorten the response time of accident. This is a
platform for emergency rescue which will operate optimally in order to reduce the golden time
of arrival of rescuers in case of road accidents, when every microsecond counts. Our project
aims to present a technology automatically detecting the accident and a hardware tracking
device based on GSM/GPS technology informing at the occurrence of accident with sufficient
details like exact location and time at which accident happened. This project will establish a
communication between the control station and the unit installed in vehicles. Vehicles will
have GPS/GSM enabled tracking modules and will be tracked in real time using cellular
networks. The software embedded in the microcontroller will control the various operations of

the device by monitoring waveform from the vibration sensor. In case of accident the device
will send an alert message along with location data from GPS module to control station using
GSM network. It is a comprehensive and effective solution to the poor rescue response in case
of accident. The accident reporting can automatically find a traffic accident, search for the spot
and then send the basic information to the rescue agency covering geographical coordinates
and the time and circumstances in which a traffic accident took place. At the server end, a
control function will extract relevant data and store it in a database, to which accident
information from prototypes will be polled in real time. Our system combines advanced
hardware design and sophisticated control technology into a compact, reliable package. The
ability to accurately detect a vehicles location and its status is the main goal of automobile
trajectory monitoring systems. These systems are implemented using several hybrid
techniques that include: wireless communication, geographical positioning and embedded
applications. The vehicle tracking systems are designed to assist corporations with large
number of automobiles and several usage purposes. The main goals of this project is to design
and develop an economical model, which requires less power with less complex in structure,
easy to implement. An additional setting could be implemented to interface the system to the
cars alarm to alert the owner on his cell phone if the alarm is set off. The automobiles airbag
system can also be wired to this system to report severe accidents to immediately alert the
police and ambulance service with the location of the accident.

1.3 Methodology Involved

The whole system consists of following steps :

Detection of an accident
Sounding an alarm
Waiting for confirmation that if the person needs medical assistance.
Receiving the GPS data.
Sending the location through GSM to concerned authority (hospital).
Creating call to others for help.
Responding via MIC and speaker.

1.4 Hardware and Software Requirements

This hardware required for this project are:
1. Microcontroller ATMEGA 328P (Arduino based)
4. Shock Sensor
5. Printed Circuit Board(PCB)
6. Buzzer
7. Male & female headers
8. Resistors- one 10K ohm and two 220 ohm.
9. Capacitors- one 10f electrolytic and two 22f ceramic
10. Two Led
11. Voltage Regulator IC 7805
12. DC jack
13. Jumper Wires
14. Crystal Oscillator 16 MHz
15. Display Unit LCD 16 2
16. MIC
17. Speaker
Software requirements are:
1. Arduino IDE (Integrated development environment) version 1.6.8

1.5 Block Diagram

Figure 1.2 Block diagram of the project


2.1 Introduction to Arduino

Arduino is an open-source electronics platform based on easy-to-use hardware and software.
It's intended for anyone making interactive projects. 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
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
2.1.1 Why Arduino?
The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It
runs on Mac, Windows, and Linux. Teachers and students use it to build low cost scientific
instruments, to prove chemistry and physics principles, or to get started with programming and
robotics. Designers and architects build interactive prototypes, musicians and artists use it for
installations and to experiment with new musical instruments.
There are many other microcontrollers and microcontroller platforms available for physical
computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many
others offer similar functionality. All of these tools take the messy details of microcontroller

programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of
working with microcontrollers, but it offers some advantage for teachers, students, and
interested amateurs over other systems:
1. Inexpensive - Arduino boards are relatively inexpensive compared to other
microcontroller platforms. The least expensive version of the Arduino module can be
assembled by hand, and even the pre-assembled Arduino modules at cheaper rates.
2. Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX,
and Linux operating systems. Most microcontroller systems are limited to Windows.
3. Simple, clear programming environment - The Arduino Software (IDE) is easy-touse for beginners, yet flexible enough for advanced users to take advantage of as well.
For teachers, it's conveniently based on the Processing programming environment, so
students learning to program in that environment will be familiar with how the Arduino
IDE works.
4. Open source and extensible software - The Arduino software is published as open
source tools, available for extension by experienced programmers. The language can
be expanded through C++ libraries, and people wanting to understand the technical
details can make the leap from Arduino to the AVR C programming language on which
it's based. Similarly, you can add AVR-C code directly into your Arduino programs if
you want to.
5. Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers can
make their own version of the module, extending it and improving it. Even relatively
inexperienced users can build the breadboard version of the module in order to
understand how it works and save money.
2.1.2 Arduino Uno board
The Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output
pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a

USB connection, a power jack, an ICSP header and a reset button. It contains everything
needed to support the microcontroller; simply 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 worrying 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.

Figure 2.1 An Arduino Uno Board

Operating Voltage
Input Voltage (recommended)
Input Voltage (limit)
Digital I/O Pins
PWM Digital I/O Pins
Analog Input Pins
DC Current per I/O Pin

14 (of which 6 provide PWM output)

DC Current for 3.3V Pin

Flash Memory

32 KB (ATmega328P)
of which 0.5 KB used by bootloader
2 KB (ATmega328P)
1 KB (ATmega328P)
Clock Speed
16 MHz
68.6 mm
53.4 mm
25 g
Table 2.1 Specifications of arduino uno

2.2 Atmega 328P Microcontroller

The high-performance Atmel picoPower 8-bit AVR RISC-based microcontroller combines
32KB ISP flash memory with read-while-write capabilities, 1024B EEPROM, 2KB 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, a 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.
By executing powerful instructions in a single clock cycle, the device achieves throughputs
approaching 1 MIPS per MHz, balancing power consumption and processing speed.

Flash Memory(kbytes)
Pin Count
Maximum Operating Frequency(MHz)
Touch Channels
Maximum I/O pins

8-bit AVR

External Interrupts
Operating Temperature
-40 C to 85 C
Table 2.2 Atmega328P Specifications
2.2.1 Atmega328P Pin Description(Arduino based)

Figure 2.2 Pin out of Atmega 328P

1.VCC - Digital supply voltage.

2. GND - Ground.
3. Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2 - Port B is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each bit). The Port B output buffers have
symmetrical drive characteristics with both high sink and source capability. As inputs, Port B

pins that are externally pulled low will source current if the pull-up resistors are activated. The
Port B pins are tristated when a reset condition becomes active, even if the clock is not
running. Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit. Depending on
the clock selection fuse settings, PB7 can be used as output from the inverting Oscillator
4. Port C (PC5:0) - Port C is a 7-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The PC5...0 output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port C pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port C pins are tristated when a reset
condition becomes active, even if the clock is not running.
5. PC6/RESET- If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that
the electrical characteristics of PC6 differ from those of the other pins of Port C. If the
RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for
longer than the minimum pulse length will generate a Reset, even if the clock is not running.
6. Port D (PD7:0) - Port D is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port D output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port D pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port D pins are tristated when a reset
condition becomes active, even if the clock is not running.
7. AVCC - AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It
should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it
should be connected to VCC through a low-pass filter. Note that PC6...4 use digital supply
voltage, VCC.
8. AREF - AREF is the analog reference pin for the A/D Converter.
9. ADC7:6 (TQFP and QFN/MLF Package Only) - In the TQFP and QFN/MLF package,
ADC7:6 serve as analog inputs to the A/D converter. These pins are powered from the analog
supply and serve as 10-bit ADC channels.
2.2.2 Block Diagram


Figure 2.3 Block Diagram of atmega328P

The AVR core combines a rich instruction set with 32 general purpose working registers. All
the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster

than conventional CISC microcontrollers. The ATmega328/P provides the following features:
4K/8Kbytes of In-System Programmable Flash with Read-While-Write capabilities,1Kbytes
EEPROM, 2Kbytes SRAM, 23 general purpose I/O lines, 32 general purpose working
registers, three flexible Timer/Counters with compare modes, internal and external interrupts,
a serial programmable USART, a byte-oriented 2-wire Serial Interface, an SPI serial port, a 6
channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a programmable
Watchdog Timer with internal Oscillator, and five software selectable power saving modes.
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wire
Serial Interface, SPI port, and interrupt system to continue functioning. The Power-down
mode saves the register contents but freezes the Oscillator, disabling all other chip functions
until the next interrupt or hardware reset. In Power-save mode, the asynchronous timer
continues to run, allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC, to minimize switching noise during ADC conversions. In
Standby mode, the crystal/resonator Oscillator is running while the rest of the device is
sleeping. This allows very fast start-up combined with low power consumption. Atmel offers
the QTouch library for embedding capacitive touch buttons, sliders and wheels functionality
into AVR microcontrollers. The patented charge-transfer signal acquisition offers robust
sensing and includes fully debounced reporting of touch keys and includes Adjacent Key
Suppression (AKS) technology for unambiguous detection of key events. The easy-to-use
QTouch Suite toolchain allows you to explore, develop and debug your own touch
applications. The device is manufactured using Atmels high density non-volatile memory
technology. The On-chip ISP Flash allows the program memory to be reprogrammed InSystem through an SPI serial interface, by a conventional non-volatile memory programmer,
or by an On-chip Boot program running on the AVR core. The Boot program can use any
interface to download the application program in the Application Flash memory. Software in
the Boot Flash section will continue to run while the Application Flash section is updated,
providing true Read - While-Write operation. By combining an 8-bit RISC CPU with InSystem Self-Programmable Flash on a monolithic chip, the Atmel ATmega328P is a powerful
microcontroller that provides a highly flexible and cost effective solution to many embedded

control applications. The ATmega328P AVR is supported with a full suite of program and





Macro Assemblers,


Debugger/Simulators, In-Circuit Emulators, and Evaluation kits.

2.3 Implementation of ATmega328P Arduino Uno board on PCB

Figure 2.4 Arduino board on PCB

This requires several steps


Place an ATmega328P microcontroller on PCB.

Place a DC jack for main supply.
The voltage regulator IC 7805 is needed for 5 V supply.
A reset pin (pin no. 1) of ATmega328P is connected to ground through tactile switch
via pull down resistor of 10Kohm.

5. A crystal oscillator of 16 MHz is placed between pin no. 9 and pin no .10 of the
microcontroller through 22F ceramic capacitors.
6. LED is connected to pin no. 19 via 220 ohm resistor as an indicator.
7. One more LED is placed connected to IC 7805 via 220 ohm resistoras an indicator of
input supply of 5V.
8. Bootloader is burned into the controller using Rx and Tx pin of arduino board.
9. After bootloading the microcontroller can be used for uploading different programs.



3.1 What Is GSM?

Global System for Mobile (GSM) is a second generation cellular standard developed to cater
voice services and data delivery using digital modulation . It offers several services1. Tele Services : Includes mobile phones, emergency calling etc.
2. Data Services : Includes SMS (Short message service), fax,voicemail, electronic mail.
3. Supplementary Services : I/C & O/G calls, call forwarding,call hold, call waiting,
conference, etc.

Figure 3.1 GSM Technology

Advantages of GSM are
1. Communication : mobile, wireless communication, support for voice and data
2. Total Mobility : international access, chip-card enables use of access points of
different providers.
3. Worldwide Connectivity : one number, the network handles every location.
4. High Capacity : better frequency efficiency, smaller cells, more customers per cell.

5. High Transmission Quality : high audio quality and reliability for wireless,
uninterrupted phone calls at higher speeds (e.g., from cars, trains).

GSM Architecture

GSM Architecture consists of three subsystems1. Network subsystem : It performs call processing and subscriber related functions.
It includes:
(i) MSC: Mobile Switching Centre : It is included in the GSM system for callswitching. Its overall purpose is the same as that of any telephone exchange.The
functions carried out by the MSC are listed below:
a. Call Processing: Includes control of data/voice call setup, inter-BSS and interMSC handovers and control of mobility management (subscriber validation and
b. Operations and Maintenance Support : Includes database management,
traffic metering and measurement, and a manmachine interface.
c. Internetwork Interworking :Manages the interface between the GSM network
and the PSTN.When the MSC provides the interface with the other networks in
the GSM network it is known as a Gateway MSC.
(ii) HLR: Home Location Register : It contains reference database for subscriber
parameters like - Subscriber ID (IMSI & MSISDN), current location of subscriber,







functionality and mobile subscriber roaming number.

(iii)VLR : Visitor Location Register : It provides local database for the subscribers
wherever they are physically located within a PLMN, this may or may not be the
home system. It is a local database and contains copy of most of the data stored in









(iv) AuC: Authentication Centre : It provides authentication and encryption

parameters for verification of subscriber identity and protects network from fraud,
(v )EIR: Equipment Identity Register : The EIR contains a centralized database
for validating International Mobile Equipment Identity (IMEI).

Figure 3.2 The GSM architecture

2. Radio Subsystem : It performs management of radio network and is controlled by a
MSC . One MSC controls many radio subsystem. It containsa. BSC (Base Station Controller)- It is connected to MSC, switches traffic and
signaling to/from BTSs and MSC, Connects terrestrial circuits and channels on
air interface and controls frequency allocation and power control.
b. BTS (Base Transceiver Station) It maintains air interface and minimize
transmission problems, performs BTS identification, ciphering and speech

Operation and Maintenance Subsytem : It performs following functions
a. Dynamic monitoring and controlling of network.
b. Operation and maintenance of data function.
c. Configuration management.
d. Fault report and alarm handling.
e. Performance supervision.
f. Storage of software and data.
g. Stores data for minimum one year.


GSM modem is similar to mobile phone without any display, keypad and speakers. This
accepts a SIM card, and operates over a subscription to a mobile operator. GSM modem can
accept any GSM network operator SIM card and act just like a mobile phone. More than 690
mobile networks provides GSM services across 213 countries and GSM represents 82.4% of
all global mobile connections . Besides the voice communication it also offers short messages
services (SMS) and General packet radio services (GPRS) to transfer data. GSM digitizes and
compresses data, then sends it down a channel with two other streams of user data, each in its
own time slot. It operates at either the 900 MHz or 1800 MHz frequency band, in addition
there are two others frequency bands but most common are mentioned above. The
transmission rate of GSM is 270 kbps. The GSM modem utilized the GSM network to send
the location of the accident. The modem can be controlled by the microcontroller. The GSM
modem has capacitors and resistors for their proper working and LEDs for indicating the
network status. The network status pin does depict the status of accessing network right away
when we turn the circuit ON. To represent it we used a green LED whose status will be that
it will blink rapidly when like to acquire network and blink slowly after the assessment of

3.2.1 GSM SIM 900A

GSM/GPRS Modem-RS232 is built with Dual Band GSM/GPRS engine- SIM900A, works
on frequencies 900/ 1800 MHz . The Modem is coming with RS232 interface, which allows
you connect PC as well as microcontroller with RS232 Chip(MAX232). The baud rate is
configurable from 9600-115200 through AT command. The GSM/GPRS Modem is having
internal TCP/IP stack to enable you to connect with internet via GPRS. It is suitable for SMS,
Voice as well as DATA transfer application in M2M interface. The onboard Regulated Power
supply allows you to connect wide range unregulated power supply . Using this modem, you


can make audio calls, SMS, Read SMS, attend the incoming calls and internet ect through
simple AT commands.
General features 1. Quad-Band 850/ 900/ 1800/ 1900 MHz.
2. GPRS multi-slot class 10/8
3. GPRS mobile station class
4. Compliant to GSM phase 2/2
Class 4 (2 W @850/ 900 MHz)
Class 1 (1 W @ 1800/1900MHz)
5. Dimensions: 24* 24 * 3 mm
6. Weight: 3.4g
Control via AT commands (GSM 07.07 ,07.05 and SIMCOM enhanced
8. SIM application toolkit
9. Supply voltage range 3.4 ... 4.5 V
10. Low power consumption
11. Operation temperature:-30 C to +80 C


Figure 3.3 GSM SIM900A Modem

Power Requirement
The board should be powered with an external power supply that can provide current between
700mA and 1000mA. Powering an Arduino and the GSM shield from a USB connection is not
recommended, as USB cannot provide the required current when the modem is in heavy use.
So instead we have to use 12V adapter. The modem can pull up to 2A of current at peak usage,
which can occur during data transmission.
Pin Specification


Power supply ground


Line_r & Line_1

Line Input
Spk_p & Spk_n
Speaker positive and negative
Mic_p & Mic_n
Mic positive & Mic negative
Data terminal ready
Clear to send
Request to send
Table 3.1 pin specification of GSM

Unlike mobile phones, a GSM modem doesnt have a keypad and display to interact with. It
just accepts certain commands through a serial interface and acknowledges for those. These
commands are called as AT commands. There are a list of AT commands to instruct the
modem to perform its functions. Every command starts with "AT". Thats why they are called
as AT commands. AT stands for attention.
AT Commands for using the shield
1. Checking the operation and connection of gsm shield: AT Press ENTER This would

print OK which signifies of working connection and operation of the GSM shield.
Making a voice call: ATD+(country code)mobile number; Press ENTER.
Disconnecting the active call: ATH Press ENTER.
Receiving the call: ATA Press ENTER.
Sending a message: For sending SMS in text Mode: AT+CMGF=1 Press ENTER
AT+CMGS=mobile number Press ENTER Once the AT commands is given >
prompt will be displayed on the screen. Type the message to be sent via SMS. After
this, Press CTRL+Z to send the SMS. If the SMS sending is successful, OK will be

displayed along with the message number.

6. Receiving a message: For reading SMS in the text mode: AT+CMGF = 1 Press
Number (num.) is the message index number stored in the SIM card. For new SMS,
URC will be received on the screen as + CMTI: SM num. After this AT+CMGR=1
Press ENTER This displays the message on the screen along with sender details,
number and timing too.
Interfacing the GSM shield with Arduino

Figure 3.4 Schematic showing GSM Arduino interfacing.

1. First we connect our Arduino Uno to the Computer or Laptop to see which COM port will
be used to burn the program from the computer or laptop. This also provides power to the
Arduino Uno .
2. Next we supply power to the GSM shield (supply only 12V to the GSM shield from the
power jack using the adapter) which is going to be used for our program .
3. For GSM programs, only 2 pins, RX and TX are to be used mainly. So we require only
these two pins of the Arduino Uno. These pins are pins 0 and 1 of the Arduino Uno .
4. Next burn the required program in The Arduino Uno using the software .
5. Then connect the GSM shield to Arduino such that RX, TX of the shield is connected to
the TX, RX of the Arduino Uno.



4.1 Introduction to GPS

The System (GPS Global Positioning) is a navigational system that uses a network of 24-32
satellites to. determine the exact position of any object on earth. The satellites are positioned in
orbits about an altitude of 12,000 miles from the earth surface . The satellites send microwave
signals which are collected by GPS receivers. The collected information is used to infer the
distance using velocity and time. The Global Positioning System (GPS) is a popular
technology which was developed by American Department of Defense (DOD) for military

use. Later on it was available for civilian use. It can be utilized for wide range of applications
such as location, direction, speed, timing, surveying, logistic traffic management, security etc.
The System (GPS Global Positioning) is a space age navigational system that can pinpoint
your position anywhere on the globe, usually within a few yards or meters. GPS uses a
constellation of 24 satellites in precise orbits approximately 12,000 miles above the earth. The
satellites transmit data via high frequency radio waves back to Earth. GPS uses satellite
ranging to triangulate your position. In other words, the GPS unit simply measures the travel
time of the signals transmitted from the satellites, then multiplies them by the speed of light to
determine exactly how far the unit is from every satellite it's sampling.
Distance= velocity (speed) x time.
Then locking onto signal from minimum 3 different satellites, GPS can calculate a latitude and
longitude and track movement. With four or more satellites in view, the receiver can determine
the user's latitude, longitude and altitude. GPS receiver uses NMEA -0183 protocol as defined
by the National Marine Electronics Association (NMEA). It gives output messages as follows.
So we get 7-8 different messages. GGA-Global positioning system fixed data. GLLGeographic position latitude/longitude. GGA contains message ID, UTC position, latitude,
longitude, north-south, east-west. Message ID- $GPGGA that is called as protocol header.
These all data retrieve into software microcontroller. Then this date (location) is send to
preprogrammed number using GSM system.

4.2 Working of GPS

A GPS receiver can tell its own position by using the position data of itself, and compares that
data with 3 or more GPS satellites. To get the distance to each satellite, the GPS transmits a
signal to each satellite. The signal travels at a known speed. The system measures the time
delay between the signal transmission and signal reception of the GPS signal. The signals
carry information about the satellites location. Determines the position of, and distance to, at
least three satellites. The receiver computes position using triangulation. Information from
multiple satellites is used to determine position through triangulation. However receivers

require clear line-of-sight; thus, they may not work properly in indoor conditions or in
obstructed path.

Figure 4.1 Triangulation Technique in GPS


Figure 4.2 Clear line of sight is needed for GPS receivers

GPS systems are made up of 3 segments
1. Space segments : GPS satellites fly in circular orbits at an altitude of 20,200 km and
with a period of 12 hours. Orbital planes are centered on the Earth. Each satellite
makes two complete orbits each sidereal day. It passes over the same location on Earth
once each day. Orbits are designed so that at the very least, six satellites are always
within line of sight from any location on the planet.
2. Control Segment : It consist of three entitites
a. Master Control Station : The master control station is responsible for overall
management of the remote monitoring and transmission sites. It performs the
primary control segment functions, providing command and control of the GPS
constellation. It generates and uploads navigation messages and ensures the health
and accuracy of the satellite constellation. Monitors navigation messages and
system integrity, can reposition satellites to maintain an optimal GPS constellation.
b. Monitor Stations : Monitor Stations checks the exact altitude, position, speed, and
overall health of the orbiting satellites. The control segment uses measurements
collected by the monitor stations to predict the behavior of each satellite's orbit and
clock. The prediction data is up-linked, or transmitted, to the satellites for
transmission back to the users. The control segment also ensures that the GPS
satellite orbits and clocks remain within acceptable limits. A station can track up to
11 satellites at a time. This "check-up" is performed twice a day, by each station.
c. Ground Antennas : Ground antennas monitor and track the satellites from horizon
to horizon. They also transmit correction information to individual satellites.
Communicate with the GPS satellites for command and control purposes.
d. Air Force Satellite Control Network (AFSCN : This involves continual
Tracking, Telemetry, and Command (TT&C). It also provides prelaunch
simulation, launch support, and early orbit support while satellites are in initial or
transfer orbits and require maneuvering to their final orbit.
e. NGA Monitor Stations : The NGA Monitor collects, processes, and distributes
GPS observations, environmental data, and station health information. It also
provides 24/7 data integrity monitoring.

Figure 4.3 Space segment satellites

3. User Segment : The user's GPS receiver is the User Segment of the GPS system. GPS
receivers are generally composed of an antenna, tuned to the frequencies transmitted
by the satellites, receiver-processors, and a highly-stable clock (commonly a crystal
oscillator). They include a display for showing location and speed information to the
user. A receiver is often described by its number of channels this signifies how many
satellites it can monitor simultaneously.


Figure 4.4 Segments of GPS system

Frequency information
1. The C/A code is transmitted on the L1 frequency (1575.42MHz) as a 1.023 MHz
2. The P(Y)-code is transmitted on both the L1 and L2 frequencies (1227.60MHz) as a
10.23 MHz signal.
3. L3 (1381.05MHz) is used by the Defense Support Program to signal detection of
missile launches, nuclear detonations, and other applications.
4. L4 (1379.913MHz) is used for additional correction to the part of the atmosphere that
is ionized by solar radiation.
5. L5 (1176.45MHz)is used as a civilian safety-of-life (SoL) signal.

4.3 GPS Receiver L80M39

4.3.1 General Description
L80 GPS module with an embedded patch antenna (15mmx15mmx4mm) and LNA brings
high performance of MTK positioning engine to the industrial applications. It is able to
achieve the industrys highest level of sensitivity, accuracy and TTFF with the lowest power
consumption in a small-footprint lead-free package. With 66 search channels and 22
simultaneous tracking channels, it acquires and tracks satellites in the shortest time even at
indoor signal level. The embedded flash memory provides capacity for users to store some
useful navigation data and allows for future updates.
L80 module combines with many advanced features including EASY, AIC, LOCUS, Always
LocateTM and Antenna Supervisor. These features are beneficial to accelerate TTFF, improve
sensitivity, save consumption and detect antenna status for GPS system. The module supports
various location, navigation and industrial applications including autonomous GPS, SBAS
(including WAAS, EGNOS, MSAS, and GAGAN), QZSS, and AGPS. L80 simplifies the
devices design and cost because of embedded Patch Antenna and LNA. Furthermore, L80 not
only supports automatic antenna switching function, which can achieve switching between
external active antenna and internal patch antenna but also supports external active antenna
detection and short protection. The detection and notification of different external active

antenna status will be shown in the NMEA message including external active antenna
connection, open circuit for antenna and antenna shortage. So host can query the external
active antenna status timely and conveniently.
L80 module is a SMD type module with the compact 16mm x 16mm x 6.45mm form factor,
which can be embedded in applications through the 12-pin pads with 2.54mm pitch. It
provides necessary hardware interfaces between the module and main board.
4.3.2 Key Features

Embedded patch antenna: 15.0 x 15.0 x 4.0mm

Extremely compact size: 16.0 x 16.0 x 6.45mm
Automatic antenna switching function.
Support short circuit protection and antenna detection.
Built-in LNA for better sensitivity EASY, advanced AGPS technology without

external memory
6. Ultra low power consumption in tracking mode, 20mA.
7. AlwaysLocate, an intelligent controller of periodic mode.
8. LOCUS, innate logger solution with no need of host and external flash memory.
9. High sensitivity.
10. 165dBm@Tracking, -148dBm@Acquisition.
11. 66 acquisition channels, 22 tracking channels.
13. Anti-Jamming, Multi-tone Active Interference Canceller
General specifications
L1 Band Receiver
Horizontal Position
Velocity Accuracy
Acceleration Accuracy
Timing Accuracy
Reacquisition Time
with EASY

Without aid
Without aid
1PPS out

22 (Tracking) /
66 (Acquisition)
<2.5 m CEP

Cold start


Warm start


Hot start








Operating temperature

Dynamic performance

Storage temperature
Maximum altitude
Maximum velocity
Maximum acceleration

Power Management
Power supply
Power acquisition
Power saving

-40 to 85
-45 to 125
6.0 gm
3V- 5V
3mA(locate mode)
5uA(backup mode)
1mA(standby mode)

Power tracking
Serial interfaces
Serial interfaces

Update rate

UART: Adjustable
4800~115200 bps
Default: 9600bps
1Hz (Default), up to10Hz

I/O voltage

Table 4.1 L80 specifications

Figure 4.5 GPS L80M39


4.3.3 Block Diagram

The following figure shows a block diagram of L80 module. It consists of a single chip GPS
IC which includes RF part and Baseband part, a SPDT, a patch antenna, a LNA, a SAW filter,
a TCXO, a crystal oscillator, short protection and antenna detection circuit for active antenna.

Figure 4.6 Block Diagram of L80 module

4.3.4 Operating Modes
1. Full On Mode : Full on mode includes tracking mode and acquisition mode. Acquisition
mode is defined as the module starts to search satellites, determine visible satellites and coarse
carrier frequency and code phase of satellite signals. When the acquisition is completed, it
switches to tracking mode automatically. Tracking mode is defined as the module keeps
tracking satellites and demodulates the navigation data from the specific satellites. When the
combination of VCC and V_BCKP is valid, the module will enter into full on mode

2. Standby Mode : Standby mode is a low-power mode. In standby mode, the internal core
and I/O power domain are still active, but RF and TCXO are powered off, the module stops
satellites search and navigation. UART is still accessible like PMTK commands or any other
data, but there is no NMEA messages output. Sending PMTK command $PMTK161,0*28
will make L80 module enter into standby mode. Sending any data via UART can wake the
module up. When the module exits from standby mode, it will use all internal aiding
information like GPS time, Ephemeris, Last Position etc, resulting to a fastest possible TTFF
in either Hot or Warm start. The typical standby current consumption in this way is about 1mA
3. Backup Mode : Backup mode is a lower power mode than standby mode. In this mode,
only the backup supply V_BCKP is powered on while the main supply VCC is switched off by
host or the TIMER signal of L80. In order to enter into backup mode autonomously via the
TIMER pin, an external switch circuit is necessary.
4. Periodic Mode : Periodic mode is a power saving mode of L80 that can control the full on
mode and standby/backup mode periodically to reduce power consumption. It contains
periodic standby mode and periodic backup mode
4.3.5 Pin Description

Pin no. 1 (RXD1) : Input pin for receiving the data.

Pin no. 2 (TXD1) : Output pin for transmitting the data.
Pin no. 3 (GND) : For ground supply.
Pin no. 4 (VCC) : Main power supply with supply current less than 100mA.
Pin no. 5 (V_BCKP) : Backup power supply for RTC domain.
Pin no. 6 (1PPS) : Output pin for one pulse per second used for synchronizing the

rising edge.
7. Pin no. 7 (TIMER) : An output open drain signal used to control the GPS module.
8. Pin no. 8 (AADET_N) : Input/outpin used for active antenna detection.
9. Pin no. 9 (NC) : No connection
10. Pin no. 10 (RESET) : Input pin used for system reset.
11. Pin no. 11 (EX_ANT): Input pin for external active antenna RF output.
12. Pin no. 12(GND) : Used for ground connection.


Figure 4.7 Pin assignments

4.3.6 Power Supply
VCC pin supplies power for BB, RF, I/O, LNA, short protection and antenna detection circuit.
The load current of VCC varies according to the VCC level, processor load, the number of
tracked satellites and the rate of satellite re-acquisition. Using external active antenna will
consume additional 11mA from our module. So it is important to supply sufficient current and
make the power clean and stable. VCC supply ripple voltage should meet the requirement: 54
mV (RMS) max at f = 0 3MHz and 15 mV (RMS) max at f > 3MHz. You should choose the
LDO without built-in output high-speed discharge function to keep long output voltage dropdown period. The decouple combination of 10uF and 100nF capacitor is recommended nearby
VCC pin. The V_BCKP pin supplies power for RTC domain. It should be valid when power
on the module. The voltage of RTC domain ranges from 1.5V to 4.3V. In order to achieve a
better TTFF, RTC domain should be valid all the time. It can supply power for SRAM memory
in RTC domain which contains all the necessary GPS information for quick start-up and a
small amount of user configuration variables. The modules internal power construction is
shown as below.

VCC supplies power for PMU and V_BCKP supplies power for RTC domain. TIMER signal
highlighted inred in the following figure belongs to RTC domain and can be used to control
the power switch on/off.

Figure 4.8. Internal Power Circuit of LM80 module

Figure 4.9 Reference Power Circuit for L80 Module


The simplest power circuit for L80 module is 3.3V power source connected to VCC pin and
V_BCKP pin of the module directly. In this case, once you powered on the module, the full
cold start will be implemented.
4.4 GPS Data format

Figure 4.10 GPS NMEA Data Format

5.1 Shock/Vibration Sensor
The sensor used to detect accident is shock sensor. This is single stage shock sensor, it detects
any hard impact acted on it. The output from sensor after impact will be +5V. Vibration
sensor to protect door or window is used. It generates a loud beep when somebody tries to
break the door or window. The alarm stops automatically after three minutes. The circuit uses
a piezoelectric element as the vibration sensor. It exploits the piezoelectric property of the
piezoelectric crystals. The piezoelectric effect may be direct piezoelectric effect in which the

electric charge develops as a result of the mechanical stressor or indirect piezoelectric effect
(Converse piezoelectric effect) in which a mechanical force such as vibration develops due to
the application of an electric field. A piezoelectric sensor is used as accident detection sensor.
A piezoelectric transducer has very high DC output impedance and can be modeled as a
proportional voltage source and filter network. The voltage V at the source is directly
proportional to the applied force, pressure, or strain. The output signal is then related to this
mechanical force as if it had passed through the equivalent circuit.

Figure 5.1 A Shock sensor

Figure 5.2 555 Timer is used in shock sensor as comparator

5.1.1 Shock Sensor Integration

The sensors are fixed on all sides of the car to detect impact occurred on it. These outputs from
sensors is send into OR gate to detect at least one impact. It is integrated in the circuit system
by connecting all the sensors to or gate whose output is connected to the int pin of
microcontroller. These sensors are connected in such a way that they detect force impact
occurring from any side of the car. This is concerned to the safety of the system of the human
driving the car so that once accident is detected the paramedics can reach to the location as
soon as they can.

Figure 5.3 Sensor integration in a car

5.2 Piezo Buzzer

Piezo buzzer is an electronic device commonly used to produce sound. Light weight, simple
construction and low price make it usable in various applications like car/truck reversing
indicator, computers, call bells etc. Piezo buzzer is based on the inverse principle of piezo
electricity discovered in 1880 by Jacques and Pierre Curie. It is the phenomena of generating
electricity when mechanical pressure is applied to certain materials and the vice versa is also
true. Such materials are called piezo electric materials. Piezo electric materials are either
naturally available or manmade. Piezoceramic is class of manmade material, which poses
piezo electric effect and is widely used to make disc, the heart of piezo buzzer. When
subjected to an alternating electric field they stretch or compress, in accordance with the
frequency of the signal thereby producing sound.


Figure 5.4 A Piezobuzzer

The above image shows a very commonly used piezo buzzer also called piezo transducer
operating at DC voltage. Encapsulated in a cylindrical plastic coating, it has a hole on the top
face for sound to propagate. A yellow metallic disc which plays an important role in the
producing sound can be seen through the hole.


Figure 5.5 A PCB based ATmega328P arduino with buzzer and sensor


6.1 Process Flow of Project

Figure 6.1Process flow chart


1. Read sensor status and if sensor gives output high i.e. accident has occurred then put
the buzzer on.
2. If buzzer goes off within 20 seconds it means that the person is sound and healthy and
does not need any medical assistance.
3. If buzzer does not go off even after 20 seconds then it means that a person is badly
injured and needs help.
4. After 20 seconds of continuous beep the microcontroller will automatically initiate
GSM modem to send the location extracted from GPS receiver.
5. Microcontroller will also initiate a call through GSM for voice assistance if required.

6.2 Circuit Connection

Figure 6.2 Circuit connection of project

6.3 Program Code


6.3.1 Programming Algorithm

Step1. Read the sensor value.
Step2. Put on the buzzer high.
Step3. Wait for 20 seconds.
Step4. Accident confirmed.
Step5. Sort out the GPS data for latitude, longitude and direction.
Step6. Send the data through GSM.
Step7. Initiate a call through GSM.
Step8. Reset to initial condition.
6.3.2 Flowchart



Sort the GPS



Filter latitude,
longitude and


Save data to

Figure 6.3. Flowchart for coding

6.3.3 Code

#include <string.h>
#include <ctype.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 10);
SoftwareSerial mysrial(3,6);
int a=0,w=0,x=0,y=0,z=0;
int lat[6];
int lon[6];
int dir1[5];
int dir2[5];
int ledPin = 13;
int rxPin = 0;
int txPin = 1;
int byteGPS= -1;
char linea[300] = "";
char comandoGPR[7] = "$GPRMC";
int cont=0;
int bien=0;
int conta=0;
int indices[13];
void setup()

pinMode(ledPin, OUTPUT);
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
for (int i=0;i<300;i++)
linea[i]=' ';
void loop()
int m=digitalRead(8);
if(m == HIGH)
digitalWrite(11, HIGH);
for(int i=0;i< 40;i++)

digitalWrite(11, LOW);
digitalWrite(11, HIGH);
digitalWrite(ledPin, HIGH);;
if (byteGPS == -1)
} else
if (byteGPS==13)
digitalWrite(ledPin, LOW);
for (int i=1;i<7;i++)
if (linea[i]==comandoGPR[i-1])

for (int i=0;i<300;i++)
if (linea[i]==',')
if (linea[i]=='*')
case 0:
case 2:

for (int i=0;i<300;i++){

linea[i]=' ';
void SendMessage()
mySerial.println("AT+CMGF=1 ");
delay(1000); // Delay of 1000 milliseconds or 1 second
mySerial.println("INJURED IN AN ACCIDENT!!!!Ambulance needed at");

void call()
mySerial.println("ATD945870XXXX;" );
6.3.4 Software Arduino IDE
The open-source Arduino Software (IDE) makes it easy to write code and upload it to the
board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and
based on Processing and other open-source software.

Figure 6.4 Popup window of Arduino IDE

6.4 Result

Whenever accident of the vehicle is occurred then the device sends message to given mobile
Message - INJURED IN AN ACCIDENT!!!!Ambulance needed at
Latitude : 2828.5086 N
Longitude : 07926.2647 E

Figure 6.5 Output Data displayed on serial monitor


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 with Atmega 328P microcontroller in embedded system domain. The proposed
Vehicle accident detection system can track geographical information automatically and sends
an alert SMS regarding accident. The proposed method is verified to be highly beneficial for
the automotive industry. It provides more than 70% safety for four wheelers. It is the fact that
implementation of system will increase cost of vehicle but it is better to have some percent
safety rather than having no percent of safety.
Main motto of the accident alert system project is to decrease the chances of losing life in such
accident which we cant stop from occurring. Whenever accident is alerted the paramedics are
reached to the particular location to increase the chances of life. This device invention is much
more useful for the accidents occurred in deserted places and midnights. It can also overcome
the issue of lack of automated system for the detection of the site of accident. As a result, the
time for detecting the site is reduced and the person can be treated as soon as possible which
will save many lives.
Scope and Future Work
1. A wireless webcam can be added in this for capturing the images which will help in
providing drivers assistance.
2. 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 controller. The controller 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.
3. This system can also be utilized in fleet management, food services, traffic violation
cases, rental vehicle services etc.


RESISTOR :- A resistor is a passive two-terminal electrical component that implements

electrical resistance as a circuit element. Resistors may be used to reduce current flow, and, at
the same time, may act to lower voltage levels within circuits.
Capacitor :- A capacitor (originally known as a condenser) is a passive two-terminal
electrical component used to store electrical energy temporarily in an electric field.
7805 IC :- 7805 is a voltage regulator integrated circuit. It is a member of 78xx series of
fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and
would not give the fixed voltage output. The voltage regulator IC maintains the output voltage
at a constant value.
Crystal Osscllator :- A crystal oscillator is an electronic oscillator circuit that uses the
mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical
signal with a precise frequency.
Serial Communication in Arduino :- Used for communication between the Arduino board
and a computer or other devices. All Arduino boards have at least one serial port (also known
as a UART or USART): Serial. It communicates on digital pins 0 (RX) and 1 (TX) as well as
with the computer via USB. Thus, if you use these functions, you cannot also use pins 0 and 1
for digital input or output.
You can use the Arduino environment's built-in serial monitor to communicate with an
Arduino board. Click the serial monitor button in the toolbar and select the same baud rate
used in the call to begin().
The Arduino Mega has three additional serial ports: Serial1 on pins 19 (RX) and 18
(TX), Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX). To use these
pins to communicate with your personal computer, you will need an additional USB-to-serial
adaptor, as they are not connected to the Mega's USB-to-serial adaptor. To use them to
communicate with an external TTL serial device, connect the TX pin to your device's RX pin,
the RX to your device's TX pin, and the ground of your Mega to your device's ground. (Don't

connect these pins directly to an RS232 serial port; they operate at +/- 12V and can damage
your Arduino board.)
The Arduino dupo has three additional 3.3V TTL serial ports: Serial1 on pins 19 (RX) and 18
(TX); Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX). Pins 0 and 1
are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip,
which is connected to the USB debug port. Additionally, there is a native USB-serial port on
the SAM3X chip, SerialUSB'.
The Arduino Leonardo board uses Serial1 to communicate via TTL (5V) serial on pins 0 (RX)
and 1 (TX). Serial is reserved for USB CDC communication. For more information, refer to
the Leonardo getting started page and hardware page.



Following books were helpful in collecting knowledge regarding this project:

1. T.S. Rappaport, Wireless Communication- Principles and Practice, Pearson
publications, second edition.
2. S. Haykin and M.Moher, Modern wireless communication, Pearson publications.
Following links were also instrumental in providing insights regarding component
specifications and working: