Professional Documents
Culture Documents
INTRODUCTION
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
the location of the vehicle. GLOBAL SYSTEM FOR MOBILE COMMUNICATION(GSM)
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.
Table 1.1 Number of accidents and fatal injuries due to severe accident
1.2 Automatic Accident Detection and Reporting System Using GSM and
GPS
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
3
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.
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.
CHAPTER 2
ATMEGA 328P MICROCONTROLLER (ARDUINO BASED)
6
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
8
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.
ATmega328P
5V
7-12V
6-12V
14 (of which 6 provide PWM output)
6
6
20mA
9
50Ma
32 KB (ATmega328P)
of which 0.5 KB used by bootloader
SRAM
2 KB (ATmega328P)
EEPROM
1 KB (ATmega328P)
Clock Speed
16 MHz
Length
68.6 mm
Width
53.4 mm
Weight
25 g
Table 2.1 Specifications of arduino uno
Parameter
Flash Memory(kbytes)
Pin Count
Maximum Operating Frequency(MHz)
CPU
Touch Channels
Maximum I/O pins
Value
32
28
20MHz
8-bit AVR
16
23
10
Parameter
Value
External Interrupts
24
Timer/Counters
03
Operating Temperature
-40 C to 85 C
Table 2.2 Atmega328P Specifications
2.2.1 Atmega328P Pin Description(Arduino based)
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
amplifier.
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
12
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
14
control applications. The ATmega328P AVR is supported with a full suite of program and
system
development
tools
including:
Compilers,
Macro Assemblers,
Program
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.
CHAPTER 3
GLOBAL SYSTEM FOR MOBILE
COMMUNICATION(GSM MODEM SIM 900A)
16
5. High Transmission Quality : high audio quality and reliability for wireless,
uninterrupted phone calls at higher speeds (e.g., from cars, trains).
3.1.1
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
location).
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,
Subscriber
status
(registered/unregistered),
authentication
key
and
AUC
It
contains
mobile
status
and
location
area
identity.
processing.
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.
19
20
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
7.
Control via AT commands (GSM 07.07 ,07.05 and SIMCOM enhanced
ATCommands).
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
21
Name
GND
Tx
Rx
Detail
Power supply ground
Transmitter
Receiver
22
4
5
6
7
8
9
Working
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
2.
3.
4.
5.
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
24
CHAPTER 4
GLOBAL POSITIONING SYSTEM (GPS)
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.
require clear line-of-sight; thus, they may not work properly in indoor conditions or in
obstructed path.
27
29
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
1.
2.
3.
4.
5.
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.
12. Support DGPS, SBAS(WAAS/EGNOS/MSAS/GAGAN).
13. Anti-Jamming, Multi-tone Active Interference Canceller
General specifications
L1 Band Receiver
(1575.42MHz
Horizontal Position
Accuracy
Velocity Accuracy
Acceleration Accuracy
Timing Accuracy
Reacquisition Time
TTFF@-130dBm
with EASY
Sensitivity
Channel
Autonomous
Without aid
Without aid
1PPS out
22 (Tracking) /
66 (Acquisition)
<2.5 m CEP
Cold start
<0.1m/s
0.1m/s
10ns
<1s
<15s
Warm start
<5s
Hot start
^cquisition
<1s
-148dbm
tracking
-165dbm
reacquisition
-160dbm
31
Environmental
Operating temperature
Dynamic performance
Storage temperature
Maximum altitude
Maximum velocity
Maximum acceleration
Dimensions
Weight
Power Management
Power supply
Power acquisition
Power saving
-40 to 85
-45 to 125
18000m
551m/s
4G
16.0x16.0x6.5mm
6.0 gm
3V- 5V
25mA
3mA(locate mode)
5uA(backup mode)
1mA(standby mode)
20Ma
Power tracking
Serial interfaces
Serial interfaces
Update rate
UART: Adjustable
4800~115200 bps
Default: 9600bps
1Hz (Default), up to10Hz
I/O voltage
Protocols
2.7V-2.9V
NMEA0183
PMKT
Table 4.1 L80 specifications
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
@VCC=3.3V.
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
1.
2.
3.
4.
5.
6.
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.
.
34
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.
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
CHAPTER 5
SHOCK SENSOR AND PEIZO BUZZER
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
37
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.
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.
39
40
Figure 5.5 A PCB based ATmega328P arduino with buzzer and sensor
41
CHAPTER 6
FUNCTIONAL INTEGRATION OF PROJECT
6.1 Process Flow of Project
42
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.
N
O
Yes
Accident
Filter latitude,
longitude and
direction
SEND SMS
END
Save data to
SIM in GSM
INITIATE CALL
#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(7,OUTPUT);
digitalWrite(7,LOW);
pinMode(6,OUTPUT);
digitalWrite(6,LOW);
pinMode(8,INPUT);
pinMode(11,OUTPUT);
pinMode(5,OUTPUT);
45
digitalWrite(5,HIGH);
pinMode(ledPin, OUTPUT);
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
Serial.begin(9600);
mySerial.begin(9600);
mysrial.begin(9600);
for (int i=0;i<300;i++)
{
linea[i]=' ';
}
}
void loop()
{
int m=digitalRead(8);
if(m==LOW)
{
m=digitalRead(8);
}
if(m == HIGH)
{
while(1)
{
digitalWrite(11, HIGH);
for(int i=0;i< 40;i++)
{
if(digitalRead(5)==LOW)
{
while(1)
{
46
digitalWrite(11, LOW);
}
}
if(digitalRead(5)==HIGH)
{
delay(500);
}}
while(1)
{
digitalWrite(11, HIGH);
digitalWrite(ledPin, HIGH);
byteGPS=mysrial.read();
if (byteGPS == -1)
{
delay(100);
} else
{
linea[conta]=byteGPS;
conta++;
Serial.write(byte(byteGPS));
if (byteGPS==13)
{
digitalWrite(ledPin, LOW);
cont=0;
bien=0;
for (int i=1;i<7;i++)
{
if (linea[i]==comandoGPR[i-1])
{
bien++;
47
}
}
if(bien==6)
{
for (int i=0;i<300;i++)
{
if (linea[i]==',')
{
indices[cont]=i;
cont++;
}
if (linea[i]=='*')
{
indices[12]=i;
cont++;
}
}
switch(a)
{
case 0:
SendMessage();
break;
case 2:
call();
call();
break;
}
}
conta=0;
48
}
void call()
{
mySerial.println("ATD945870XXXX;" );
delay(15000);
a=20;
}
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.
6.4 Result
50
Whenever accident of the vehicle is occurred then the device sends message to given mobile
device.
Message - INJURED IN AN ACCIDENT!!!!Ambulance needed at
Latitude : 2828.5086 N
Longitude : 07926.2647 E
CHAPTER 7
51
CONCLUSION
This project presents vehicle accident detection and alert system with SMS to the user defined
mobile numbers. The GPS tracking and GSM alert based algorithm is designed and
implemented 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.
APPENDIX
52
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.
54
REFERENCES
www.atmel.com
www.quectel.com
www.simcom.com
www.arduino.com
www.google.com
www.electronicsproject.com
55