0% found this document useful (0 votes)
45 views67 pages

Accident Detection Using It Sensor

The document describes a vehicle accident alert system that uses an IR sensor to detect accidents and then sends a text message via GSM module with the location from GPS to emergency services for assistance. It discusses the need for timely emergency response to reduce accident mortality rates and uses Arduino to test the system.

Uploaded by

Nkaizoku Nn43
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views67 pages

Accident Detection Using It Sensor

The document describes a vehicle accident alert system that uses an IR sensor to detect accidents and then sends a text message via GSM module with the location from GPS to emergency services for assistance. It discusses the need for timely emergency response to reduce accident mortality rates and uses Arduino to test the system.

Uploaded by

Nkaizoku Nn43
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

A

STUDY ON
Vehicle Accident Alert System
SUBMITTED BY
Mr. B. YASHWANTH REDDY

HALL TICKET NO:- 115720474004

BACHELOR OF SCIENCE (BSc)


UNDER THE GUIDENCE OF
Mrs. V. BHANU PRIYA
(LECTURER, DEPARTMENT IN ELECTRONICS)

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE


Sultan Bazar, Koti, Hyderabad, Telangana 500001
(Affiliated to Osmania University)
PRAGATI MAHAVIDYALAYA
DEGREE & PG COLLEGE
(Affiliated to Osmania University, Hyderabad)

A PROJECT REPORT ON
“Vehicle Accident Alert System”

Submitted by
NAME OF THE STUDENT HALL TICKET NO
Mr. B. YASHWANTH REDDY 115720474004

PROJECT SUBMITTED IN PARTIAL FULFILLMENT FOR THE


AWARD OF THE DEGREE OF

BACHELOR OF SCIENCE (Bsc)


UNDER THE GUIDENCE OF
Mrs. V. BHANU PRIYA
(LECTURER IN ELECTRONICS)
SANSAH INNOVATIONS PVT. LTD.
- Empowered with Technologies

CERTIFICATE
This is to certify that the project report entitled “Vehicle Accident Alert
System” submitted by Mr. B.Yashwanth Reddy– with bearing ID no : =
115720474004 of PRAGATI MAHAVIDYALA DEGREE COLLEGE –
Koti in final year studying in Faculty of Science B.Sc (MECs) has been
satisfactorily completed project during the academic year 2020-23

Signature of Instructor Signature of Project Incharge

C. Sanjay Kumar V. Bhanu Priya

Signature of Principal

Dr. A. Madhavi Latha

H.No.4-7-41/5, Bapuji Nagar, Nacharam Medchal-Malkajgiri-5000 076, Mail: [email protected]


www.sansahinnovations.com
PRAGATI MAHAVIDYALAYA
DEGREE & PG COLLEGE
(Affiliated to Osmania University) koti, Hyderabad-500001

Certificate
Department of Science
Certified that this is a true Bonafide Project work
“Vehicle Accident Alert System” done By
Mr. B.Yashwanth Reddy Bearing Roll No: 115720474004
Studying in B.sc (M.E.Cs) VI Semester.
This is submitted as the Project work fulfilment for department
of science for the academic year of 2022 -2023

Signature of Project Incharge External Examiner

Signature of Signature of Principal


Head of Department
DECLARATION

I hereby declare that the work presented in this


Project Report been carried out by me. As a partial
fulfilment for the award of degree of B.sc (MECS) and
submitted to the “DEPARTMENT OF SCIENCE” and
further declare that neither this project Report nor any
part of this project Report has been submitted for any
degree any other award anywhere before.

Signature of the Student

Name :

Roll Number :
ACKNOWLEDGEMENT
I take this opportunity to express my deep sense of
gratitude and heartfelt thanks to several key personalities
whose constant support and encouragement have helped
me to transfer my effort into the completion of this project.
I am grateful to the Department of science, GPRDC for
giving me the opportunity to execute this project, which is
an integral part of the curriculum
I express my deepest gratitude to my project guide whose
guidance, encouragement and support from the initial to
the final level enabled me to develop and understanding of
the subject. Finally, I would like to express my deepest
appreciation to my parents, family members and friends
the most precious people in my life for their confidence in
me and for the support, love and understanding that they
have provided me throughout my life.
TABLE OF CONTENTS
PAGE NO
ABSTRACT i
BLOCK DIAGRAM ii
CHAPTER : 1 INTRODUCTION 1-2
1.1 VEHICLE ACCIDENT DETECTION
1.2 EMBEDDED C LANGUAGE
1.3 LIMITATIONS OF VEHICLE ACCIDENT DETECTION
CHAPTER : 2 DESIGN & IMPLEMENTATION 3-8
2.1 CIRCUIT DIAGRAM
2.2 WORKING PRINCIPLE
2.3 PIN DESCRIPTION
CHAPTER: 3 ARDUINO UNO 9 - 16
3.1 INTRODUCTION
3.2 ATMEGA328
3.3 F EATURES OF ATMEGA328P
3.4 PIN CONFIGURATION
3.5 ARDUINO UNO
3.6 FEATURES OF ARDUINO UNO
3.7 PIN DIAGRAM OF ARDUINO UNO
CHAPTER : 4 HARDWARE REQUIREMENTS 17 - 34
4.1 IR SENSOR 17 - 21
4.1.1 IR SENSOR WORKING PRINCIPLE
4.1.2 SPECIFICATION OF IR SENSOR
4.2 GPS MODULE 22 - 25
4.2.1 WORKING PRINCIPLE OF GPS MODULE
4.2.2 How GPS Receiver Calculates its Position and Time
4.2.3 PIN DIAGRAM OF GPS MODULE
4.3 GSM MODULE 26 - 32
4.3.1 WORKING PRINCIPLE OF GSM MODULE
4.3.2 SPECIFICATION OF GSM MODULE
4.3.3 PIN DIAGRAM OF GSM MODULE
4.4 LM2596 MODULE DC – DC BUCK CONVERTER 33 - 34
4.4.1 WORKING PRINCIPLE OF LM2596 MODULE
4.4.2 SPECIFICATION OF LM2596 MODULE
4.4.3 PIN DIAGRAM OF LM2596 Module DC-DC Buck Converter
CHAPTER : 5 POWER SUPPLY 35 - 37
CHAPTER : 6 SOFTWARE REQUIREMENTS 38 - 49
6.1 ARDUINO IDE
6.2 CODING
CHAPTER : 7 RESULTS 50 - 51
SCOPE OF THE PROJECT 52 - 53
ADVANTAGES AND DISADVANTAGES 54 - 55
OF THE PROJECT
CONCLUSION 56
APPINDEX 45 - 47
BIBLIOGRAPHY 48
LIST OF FIGURES
PAGE NO:
1. Block diagram of GSM-based accident ii
detection system using Arduino UNO
2. Vehicle accident detection with gps and gsm modem 1
3. Circuit diagram of accident detection system 3
4. Vehicle accident detection 6
5. Pin diagram of atmega328p 10
6. Pin diagram of arduino uno 12
7. (a) IR Transmitter 16
(b) IR Receiver
8. Pin diagram of ir sensor 17
9. GPS satellites transmit 18
10. GPS Distance Calculation 19
11. GPS Receiver Module 20
12. GSM SIM800L module 21
13 SIM800L GSM chip (a) 22
SIM800L GSM chip(b)
14. (a) Blink every 1s(a) 24
(b) Blink every 2s(b)
(c) Blink every 3s
15. Antenna 25
16. SIM800L gsm module pin diagram 26
17. Wiring a SIM800L GSM Module 1200mAh Li-Po battery 27
18. Pin diagram of DC-DC Buck Convert 28
19. Operation of the buck converter 29
20. Working principle of battery 30
21.Lithium-ion battery 31
22. (a) IDE software window 34-37
(b) Arduino library manager window
(c) serial monitor window
(d) Board Manager window
23 (a) location of the vehicle 39-40
(b) the system sends an SMS message to
a pre-programmed number
Vehicle Accident Alert System 115720474004

ABSTRACT
One of the basic reasons for road accidents is speed. Road accidents
are rising suddenly today and are one of the key causes of human
deaths. Human life is more important than anything else, and timely
assistance is more important than lending a helping hand. If emergency
service could get accident reports and reach it in time, more lives could
have been saved. In saving human lives, the time between the accident
and when the ambulance reaches the site of the accident plays an
important role. If we reduce the time between when an accident
happens and when a medical ambulance is dispatched to the area, we
can save human lives by reducing mortality rates. GPS has become an
integral part of a vehicle system nowadays. An infrared proximity
sensor or IR Sensor is an electronic device that emits infrared lights to
sense some aspect of the surroundings and can be employed to detect
the motion of an object. It will be tested by Arduino . The Arduino
sends the warning message via the GSM module to the police control
room or a rescue team, including the location. So, after receiving the
information, the police can automatically track the location via the GPS
module. Then, the appropriate action will be taken after verifying the
venue. The advancing technology has made our day to day lives easier.
Since every coin has two sides similarly technology has its benefits as
well as its disadvantages. The rise in technology has increased the rate
of road accidents which causes huge loss of life. The poor emergency
facilities available in our country just add to this problem. Our project
is going to provide a solution to this problem

PRAGATI MAHAVIDYALAYA DEGREE AND PG COLLEGE i


Vehicle Accident Alert System 115720474004

BLOCK DIAGRAM
This is the block diagram of vehicle tracking and accident alert system. This
shows the overall view of the vehicle accident alert system circuit. The blocks
connected here are GPS, GSM, IR Sensor, Power supply and LM2596 Module
DC-DC Buck Converter to arduino uno.

LM2596 POWER SUPPLY


Module

TX RX(02) TX(07) RX

GSM SIM Arduino UNO GPS Module


800L

TX (03) RX(06)

RX Out(08) TX

IR SENSOR

FIG: 1 Block diagram of GSM-based accident detection system using Arduino


UNO

PRAGATI MAHAVIDYALAYA DEGREE AND PG COLLEGE ii


CHAPTER – 1
VEHICLE ACCIDENT DETECTION SYSTEM
Vehicle Accident Alert System 115720474004

1.1 INTRODUCTION
The high demand of automobiles has also increased the traffic hazards and the
road accidents. Life of the people is under high risk. This is because of the lack of
best emergency facilities available in our country. An automatic alarm device for
vehicle accidents is introduced in this paper. This design is a system which can
detect accidents in significantly less time and sends the basic information to first
aid centre within a few seconds covering geographical coordinates, the time and
angle in which a vehicle accident had occurred. This alert message is sent to the
rescue team in a short time, which will help in saving the valuable lives. A Switch
is also provided in order to terminate the sending of a message in rare case
where there is no casualty, this can save the precious time of the medical rescue
team. When the accident occurs the alert message is sent automatically to the
rescue team and to the police station. The message is sent through the GSM
module and the location of the accident is detected with the help of the GPS
module. The accident can be detected precisely with the help of ir
Sensor (infrared proximity sensor) This application provides the optimum
solution to poor emergency facilities provided to the roads accidents in the
most feasible way. The usage of auto mobiles has improved linearly over the
past decade, which increased in the risk of human life. This is because due to
the insufficient emergency facilities.

FIG : 2 vehicle accident detection with gps and gsm model

(PRAGATI MAHAVIDYALAYA DEGREE COLLEGE) 2


Vehicle Accident Alert System 115720474004

1.2 EXPLANATION
An accident happens at night or in areas where no individuals are heard in that
particular setting and victims are not saved at the right time. Many of them are
losing their lives because of this. This device solves the above problem by
submitting data directly after an accident to the emergency team by using GSM
modem which helps to detect accident by ir sensor.
Ir sensor (infrared proximity sensor) comes in handy when you need to detect
an accident by sending infrared lights to sense some aspect of the car front parts
and scene. ir sensor helps to send the signal to Arudino controller. Arudino
controllers send the alert message through GSM modem with location. If the
person meets a small accident, the driver can inform attention is not required
by terminating the message using switch. This is to avoid wasting the time of the
medical and police team. 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 This idea proposal has been introduced at the
start of the modern age of mobile phones. With the introduction of GPS sensors
in the mobile, security applications based on GPS were proposed. Then they
proposed special hardware devices which can be linked with mobile phones.
Though, it had the disadvantage of actually buying extra hardware with more
money. With the massive development of mobile phones in the last decade and
new sensors added with the development, the extra hardware can be avoided.
The present application of this paper is present in a very few countries and
providing the information with the relatives and friends with the emergency
services the efficiency of the application can be increased massively.

1.3 LIMITATIONS OF THE VEHICLE ACCIDENT DETECTION


The live system can’t work if any of the following occur at the time of the crash:
● Automatic or phone is disconnected or damaged.
● No GPS signal at the time of the crash.
● Insufficient cellular signal to upload crash details.

(PRAGATI MAHAVIDYALAYA DEGREE COLLEGE) 3


CHAPTER – 2
DESIGN & IMPLEMENTATION
Vehicle Accident Alert System 115720474004

2.1 CIRCUIT DIAGRAM


1. The Complete Setup is depicted in the form of block diagram.
2. IR sensor detects the first occurrence of the accident and it is intimated to the
MCU.
3. The Latitude and Longitude are detected using GPS and it is sent as message
to the rescue team through GSM.
4. The message receiver number is pre stored in the EEPROM.

FIG: 3 circuit diagram of accident detection system

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 3


Vehicle Accident Alert System 115720474004

As the world population increases, time is needed for a large number of


vehicles. With the rise in transportation rates, road accidents claim an incredibly
high number of lives every year. Approximately 3,000 people die in road
accidents every year, according to a WHO (World Health Organization) survey,
while millions are injured or disabled every year. The high demand for vehicles
has also increased traffic hazards and people suffering from road accidents have
increased. The shortage of emergency services available in our nation is one of
the primary factors. In most cases, when an accident happens, the families of
the injured person receive the news of their accident not in time and the
emergency response services reach the accident site late and the traffic
between the accident location and the hospital also raises the risk of the
victim's death.
This project refers to the GSM-based SMS warning system of accident detection
using Arduino. It is possible to fit an accident warning device in the vehicle and
they are told on the go about any such untoward incident. As the system makes
use of GPS and GSM technologies, accident detection and messaging system
execution is easy. Figure 1 specifies the operation of the GSM-based Arduino
Accident Detection System. The GSM module plays an important role in
receiving the signal from the Arduino UNO in the above block diagram. When
the power supply is supplied to the circuit until the ir sensor senses sudden
detects the infrared light which is emited ir sensor, it sends the signal to the
Arduino and the position of the vehicle obtained by the GPS module, and the
vehicle coordinates are sent to the GSM module when it is detected, a function
is called to find the current location of the user with the help of GPS in the
Location Detection Module. The location data obtained from the GPS is sent to
the emergency services to request help.
Vehicle unit consists of an accelerometer which keeps on informing the
coordinate of vehicle position to the microcontroller. If it is found at random,
the GPS location tracker tracks and informs the emergency number with values
of latitude, longitude and google map position using the GSM SIM module.
Vehicle unit sends the information to the emergency contacts like police control
room and an ambulance unit.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 4


Vehicle Accident Alert System 115720474004

2.2 WORKING PRINCIPLE OF VEHICLE ACCIDENT


DETECTION SYSTEM
The detection of vehicle accident, the system automatically reports to the
ambulance service and police station without any time loss so that the
casualty might not loss his/her life due to lack of medical assistance in time.
The system is installed in the vehicle For the detection of vehicle accidents
accelerometers are installed and for reporting ,GPS module and GSM module
are used. Motor (control switch) is used for engine control and buzzer, led
lights etc. are used for warning during prevention. All these devices are
interfaced with the central microcontroller (Arduino Uno) unit.
Accelerometer detects the occurrence of accident and sends signal to the
microcontroller for further functioning. The GPS module provides the
location, speed, time and date of the certain place where the vehicle is in the
real time. If an accident occurs, the accelerometer detects it and location of
accident is obtained using GPS, and finally sends the information to the
ambulance service and police by the help of a GSM module. The message
obtained in mobile phone consists of the location of the accidental place in the
form of google map link which will help the emergency units like ambulance
service and police station to reach the casualty in time and rescue the lives.

1. The Arduino setup is installed in a vehicle's crash guard or in bumpers of the


vehicle on each side.
2. When collision occurs it triggers the push button and it sends a notification to
the Arduino Board.
3. Arduino will take this input and will convert to the SIM808.
4. The coordinates are shared through GSM.
5. Through GSM the notification is passed to the saved mobile number.
6. It contains the exact GPS location.
7. The application is used to know the route and location.
8. If the accident is not severe the person can turn off the buzzer and the device
will come back to normal.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 5


Vehicle Accident Alert System 115720474004

Fig : 4 vehicle accident detection

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 6


Vehicle Accident Alert System 115720474004

2.3 EMBEDDED C LANGUAGE


Embedded C is a set of language extensions for the C programming language by
the Standards Committee to address commonality issues that exist between C
extensions for different embedded systems.
Embedded C programming typically requires nonstandard extensions to the C
language in order to support enhanced microprocessor features such as fixed-
point arithmetic, multiple distinct memory banks, and basic I/O operations. The
C Standards Committee produced a Technical Report, most recently revised in
2008 and reviewed in 2013, providing a common standard for all
implementations to adhere to. It includes a number of features not available in
normal C, such as fixed-point arithmetic, named address spaces and basic I/O
hardware addressing. Embedded C uses most of the syntax and semantics of
standard C, e.g., main() function, variable definition, data type declaration,
conditional statements (if, switch case), loops (while, for), functions, arrays and
strings, structures and union, bit operations, macros, etc.

2.3.1 SPECIAL FEATURES

The C language is standardized, and there are a certain number of operators


available that everybody knows and loves. However, many microprocessors
have capabilities that the C compiler may not make use of. The C compiler may
produce less efficient machine code than hand written assembly language. For
instance, both the 8051 and PIC microcontrollers have assembly instructions for
directly setting and checking individual bits within a byte. The C program can be
written to affect bits individually using "bit fields", but the resulting machine
code output from the compiler may not be as fast as the bit-at-a-time machine
operations on some microprocessors.
 C compilers for embedded system :-
Perhaps the biggest difference between C compilers for embedded systems and
C compilers for desktop computers is the distinction between the "platform"
and the "target". The "platform" is where the C compiler runs -- perhaps a

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 7


Vehicle Accident Alert System 115720474004

laptop running Linux or a desktop running Windows. The "target" is where the
executable code generated by the C compiler will run -- the CPU in the
embedded system, often without any underlying operating system.
The GCC compiler is the most popular C compiler for embedded systems. GCC
was originally developed for 32-bit Princeton architecture CPUs. So it was
relatively easily ported to target ARM core microcontrollers such as X Scale and
Atmel AT91RM9200; Atmel AVR32 AP7 family; MIPS core microcontrollers such
as the Microchip PIC32; and Free scale 68k/Cold Fire processors.
The people who write compilers have also (with more difficulty) ported GCC to
target the Texas Instruments MSP430 16-bit MCUs; the Microchip PIC24 and
dsPIC 16-bit Microcontrollers; the 8-bit Atmel AVR microcontrollers; the 8-bit
Free scale 68HC11 microcontrollers.
Other microcontrollers are very different from a 32-bit Princeton architecture
CPU. Many compiler writers have decided it would be better to develop an
independent C compiler rather than try to force the round peg of GCC into the
square hole of 8-bit Harvard architecture microcontroller targets:
SDCC - Small Device C Compiler for the Intel 8051, Maxim 80DS390, Zilog Z80,
Motorola 68HC08, Microchip PIC16, Microchip PIC18
There are some highly respected companies that sell commercial C compilers.
You can find such a commercial C compiler for practically every microcontroller,
including the above-listed microcontrollers. Popular microcontrollers not
already listed (i.e., microcontrollers for which the only known C compiler is a
commercial C compiler) include the Cypress M8C MCUs; Microchip PIC10 and
Microchip PIC12 MCUs; etc.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 8


CHAPTER – 3
ARDUNIO UNO
Vehicle Accident Alert System 115720474004

3.1 ATmega328P
The ATmega328 is a microcontroller board is the Arduino Uno. a single-
chip microcontroller created by Atmel in the megaAVR family (later Microchip
Technology acquired Atmel in 2016). It has a modified Harvard architecture 8-
bit RISC processor core. The Atmel 8-bit AVR RISC-based microcontroller
combines 32 KB ISP flash memory with read-while-write capabilities,
1 KB EEPROM, 2 KB SRAM, 23 general-purpose I/O lines, 32 general-purpose
working registers, 3 flexible timer/counters with compare modes, internal and
external interrupts, serial programmable USART, a byte-oriented 2-wire serial
interface, SPI serial port, 6-channel 10-bit A/D converter (8 channels
in TQFP and QFN/MLF packages),programmable
watchdog timer with internal oscillator, and 5 software-selectable power-saving
modes. The device operates between 1.8 and 5.5 volts. The device achieves
throughput approaching 1 MIPS/MHz.

3.1.1 FEATURES OF ATMEGA328P :-


 High performance design
 Low power consumption
 Total number of Analog Input pins are 6
 Contains 32 kilobytes of flash memory
 Contains 2 kilobytes of SRAM
 Contains 1 kilobytes of EEPROM
 16 megahertz clock speed
 Minimum & maximum temperature -40 degree centigrade to 105 degree
centigrade
 Total number of Digital I/O pins are 14
 Advance RISC
 Lock program functionality for programming code security
 Contains total three timers two 8-bit and one 16 bit
 Total number of I/O pins are 23
 Total number of PWM channels are 6
 Minimum and maximum operating voltage from 1.8V DC to 5.5V DC

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 9


Vehicle Accident Alert System 115720474004

3.1.2 PIN CONFIGURATION :-


 DIGITAL INPUT/OUTPUT PINS
 INTERRUPT PINS
 ATmega328P UART Communication Module
 SPI Communication ATmega328P
 I2C Communication Module
 TIMERS MODULES
 SYSTEM CLOCK
 COMPARATOR MODULE
 ATmega328P CAPTURE/COMPARE/PWM Channels
 ANALOG TO DIGITAL CONVERTER Channels
 AREF PINS
 RESET
 POWER
 OSCILLATOR
 ATMEGA328P Block Diagram
The block diagram of the microcontroller ATmega328P is given below:

Fig : 5 pin diagram of atmega328p

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 10


Vehicle Accident Alert System 115720474004

3.2 ARDUINO UNO


It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a
USB link, a power jack, an ICSP header and a reset button (of which 6 can be
used as PWM outputs). Figure 6 below the picture of Arduino UNO.
It contains everything you need to help the microcontroller, just plug it into a
device with a USB cable or power it to get started with an AC to DC adapter or
battery. It is a well-known open source microcontroller-based package that can
communicate with LEDs, LCD screens, switches, buttons, motors, speakers and
many more for the development of digital devices and interactive tools. The
arduino system includes a set of digital and analog pins that can be inserted
into several other boards and circuits that have different design functions. The
Arduino board offers a serial USB communication interface to load machine
codes. Arduino has developed its own Integrated Development Environment
(IDE) software that fully supports C and C++ programs. Arduino works in a very
simple way.
It uses three main things to do
 Inputs:- Sensors and switches are connected to the controller to give it
information. These are called inputs, and they can be nearly anything from
on/off signals, variable voltage* signals, or communication from another
controller. As long as a sensor’s voltage range works with arduino, you can
probably use it.

 Programming: The board is programmed to take its inputs and make


decisions based on the information it receives. The programming can be as
simple as turning on a light when a switch turns on or something more
complex like sending weather information to a web browser. Programming
can be done in the arduino IDE, VS Code, or even Python for some boards.

 Outputs: Finally, the output is the signal the arduino sends to a component.
As with the input, output can be an on/off, variable voltage*, or
communication signal.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 11


Vehicle Accident Alert System 115720474004

3.2.1 FEATURES OF ARDUINO UNO:-


 The operating voltage is 5V
 The recommended input voltage will range from 7v to 12V
 The input voltage ranges from 6v to 20V
 Digital input/output pins are 14
 Analog i/p pins are 6
 DC Current for each input/output pin is 40 mA
 DC Current for 3.3V Pin is 50 mA
 Flash Memory is 32 KB
 SRAM is 2 KB
 EEPROM is 1 KB
 CLK Speed is 16 MHz

3.2.2 PIN DIAGRAM OF ARDUINO UNO :-


The Arduino Uno board can be built with power pins, analog pins, ATmegs328,
ICSP header, Reset button, power LED, digital pins, test led 13, TX/RX pins, USB
interface, an external power supply.

FIG : 6 Pin diagram of arduino

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 12


Vehicle Accident Alert System 115720474004

 Power Supply:
The Arduino Uno power supply can be done with the help of a USB cable or an
external power supply. The external power supplies mainly include AC to DC
adapter otherwise a battery. The adapter can be connected to the Arduino Uno
by plugging into the power jack of the Arduino board. Similarly, the battery ,
leads can be connected to the Vin pin and the GND pin of the POWER
connector. The suggested voltage range will be 7 volts to 12 volts.
 Input & Output:
The 14 digital pins on the Arduino Uno can be used as input & output with the
help of the FIG: 5 PIN diagram of arduino uno functions like pinMode(),
digitalWrite(), & Digital Read().

 Pin1 (TX) & Pin0 (RX) (Serial):


This pin is used to transmit & receive TTL serial data, and these are connected to
the ATmega8U2 USB to TTL Serial chip equivalent pins.
 Pin 2 & Pin 3 (External Interrupts): External pins can be connected to activate
an interrupt over a low value, change in value.

 Pins 3, 5, 6, 9, 10, & 11 (PWM):


This pin gives 8-bit PWM o/p by the function of analogWrite().
 SPI Pins (Pin-10 (SS), Pin-11 (MOSI), Pin-12 (MISO), Pin-13 (SCK):
These pins maintain SPI-communication, even though offered by the
fundamental hardware, is not presently included within the Arduino language.
 Pin-13(LED):
The inbuilt LED can be connected to pin-13 (digital pin). As the HIGH-value pin,
the light emitting diode is activated, whenever the pin is LOW.
 Pin-4 (SDA) & Pin-5 (SCL) (I2C):
It supports TWI-communication with the help of the Wire library.
 AREF (Reference Voltage):
The reference voltage is for the analog i/ps with analog Reference().
 Reset Pin:
This pin is used for reset (RST) the microcontroller.
PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 13
Vehicle Accident Alert System 115720474004

 Memory:
The memory of this Atmega328 Arduino microcontroller includes flash memory-
32 KB for storing code, SRAM-2 KB EEPROM-1 KB.
 Communication:
The Arduino Uno ATmega328 offers UART TTL-serial communication, and it is
accessible on digital pins like TX (1) and RX (0). The software of an Arduino has a
serial monitor that permits easy data. There are two LEDs on the board like RX &
TX which will blink whenever data is being broadcasted through the USB.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 14


CHAPTER - 4
HARDWARE REQUIREMENTS
Vehicle Accident Alert System 115720474004

The specifications in hardware are illustrated below


 Arduino UNO
 ir sensor
 GPS
 GSM Sim800L
 Mobile phone

4.1 IR SENSOR (infrared)


IR sensor is an electronic device, that emits the light in order to sense
some object of the surroundings. An IR sensor can measure the heat of
an object as well as detects the motion. Usually, in the infrared
spectrum, all the objects radiate some form of thermal radiation. These
types of radiations are invisible to our eyes, but infrared sensor can
detect these radiations. The emitter is simply an IR LED (Light Emitting
Diode) and the detector is simply an IR photodiode . Photodiode is
sensitive to IR light of the same wavelength which is emitted by the IR
LED. When IR light falls on the photodiode, the resistances and the
output voltages will change in proportion to the magnitude of the IR
light received.
There are five basic elements used in a typical infrared detection
system: an infrared source, a transmission medium, optical component,
infrared detectors or receivers and signal processing. Infrared lasers and
Infrared LED’s of specific wavelength used as infrared sources.

4.1.2 IR SENSOR WORKING PRINCIPLE :-


There are different types of infrared transmitters depending on their
wavelengths, output power and response time. An IR sensor consists of an IR LED
and an IR Photodiode, together they are called as Photo Coupler or OptoCoupler

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 15


Vehicle Accident Alert System 115720474004

 IR Transmitter or IR LED:
Infrared Transmitter is a light emitting diode (LED) which emits infrared
radiations called as IR LED’s. Even though an IR LED looks like a normal LED, the
radiation emitted by it is invisible to the human eye.

Fig : 7 (a) IR Transmitter


 IR Receiver or Photodiode:
Infrared receivers or infrared sensors detect the radiation from an IR transmitter.
IR receivers come in the form of photodiodes and phototransistors. Infrared
Photodiodes are different from normal photo diodes as they detect only infrared
radiation. Below image shows the picture of an IR receiver or a photodiode,
When the IR transmitter emits radiation, it reaches the object and some of the
radiation reflects back to the IR receiver. Based on the intensity of the reception
by the IR receiver, the output of the sensor defines.

Fig : 7(b) IR Receiver

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 16


Vehicle Accident Alert System 115720474004

4.1.3 SPECIFICATION OF IR SENSOR :-


 The operating voltage is 5VDC
 I/O pins – 3.3V & 5V
 Mounting hole
 The range is up to 20 centimeters
 The supply current is 20mA
 The range of sensing is adjustable
 Fixed ambient light sensor
4.1.4 PIN DIAGRAM OF IR SENSOR :-

Fig : 8 pin diagram of ir sensor


 VCC - Power Supply +5v
 GND - Power Supply Ground
 OUTPUT - Active High Output

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 17


Vehicle Accident Alert System 115720474004

4.2 GPS (Global Positioning System)


GPS receivers are generally used in smartphones, fleet management system,
military etc. for tracking or finding location.
Global Positioning System (GPS) is a satellite-based system that uses satellites
and ground stations to measure and compute its position on Earth.
GPS is also known as Navigation System with Time and Ranging (NAVSTAR) GPS.
GPS receiver needs to receive data from at least 4 satellites for accuracy
purpose. GPS receiver does not transmit any information to the satellites.
This GPS receiver is used in many applications like smartphones, Cabs, Fleet
management etc.

FIG: 9 GPS satellites transmit


GPS receiver uses a constellation of satellites and ground stations to calculate
accurate location wherever it is located. These GPS satellites transmit
information signal over radio frequency (1.1 to 1.5 GHz) to the receiver. With
the help of this received information, a ground station or GPS module can
compute its position and time.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 18


Vehicle Accident Alert System 115720474004

4.2.1 How GPS Receiver Calculates its Position and


Time
GPS receiver receives information signals from GPS satellites and calculates its
distance from satellites. This is done by measuring the time required for the
signal to travel from satellite to the receiver.

Fig : 10 GPS Distance Calculation

Where,
Speed = Speed of Radio signal which is approximately equal to the speed of light
i.e.
Time = Time required for a signal to travel from the satellite to the receiver.
By subtracting the sent time from the received time, we can determine the
travel time.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 19


Vehicle Accident Alert System 115720474004

4.2.2 Pin Description

Fig: 11 GPS Receiver Module

 VCC: Power Supply 3.3 – 6 V


 GND: Ground
 TX: Transmit data serially which gives information about location, time
etc.
 RX: Receive Data serially. It is required when we want to configure GPS
module.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 20


Vehicle Accident Alert System 115720474004

4.3 GSM SIM800L MODULE


Global System for Mobile communication (GSM) is digital cellular system used
for mobile devices. Figure 6 GSM SIM800L module The SIM800L is a miniature
cellular module that enables GPRS transmission, SMS sending and receiving, and
voice calls to be made and received. The low cost and small footprint and
support for quad band frequency make this module the ideal solution for any
project needing longrange connectivity. Figure 6 shows the image of GSM
SIM800L module. Check for the cellular network and login automatically after
the power module link boots up. Link status on board LED displays. There are
two antennas included in this module. Second, wire (which solders directly to
NET pin on PCB) is made of wire - very useful in narrow areas. Second - PCB
antenna - with double-sided tape and IPX connector pigtail cable attached. This
one has better output and allows the module to be inside a metal case as long
as the antenna is outside. It can communicate through AT commands with
controllers (GSM 07.07, 07.05 and SIMCOM enhanced AT Commands). The
abbreviation for Attention is AT.

FIG: 12 GSM SIM800L module

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 21


Vehicle Accident Alert System 115720474004

4.3.1 HARDWARE OVERVIEW :-


At the heart of the module is a SIM800L GSM cellular chip from Simcom.
The operating voltage of the chip ranges from 3.4V to 4.4V, making it an ideal
candidate for direct LiPo battery supply. This makes it an excellent choice for
embedding in projects with limited space.

Fig : 13 SIM800L GSM chip (a)

All the necessary data pins of the SIM800L GSM chip are broken out to a 0.1″
pitch headers, including the pins required for communication with the
microcontroller over the UART. The module supports baud rates ranging from
1200 bps to 115200 bps and features automatic baud rate detection.

Fig : 13 SIM800L GSM chip(b)

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 22


Vehicle Accident Alert System 115720474004

The module requires an external antenna in order to connect to the network. So


the module usually comes with a helical antenna that can be soldered to it. The
board also has a U.FL connector If you wish to keep the antenna at a distance
from the board.

There’s a SIM socket on the back! Any 2G Micro SIM card will work perfectly.
The proper way to insert the SIM card is typically engraved on the surface of the
SIM socket.

4.3.2 FEATURES OF SIM800L GSM chip :-


Even though this module is incredibly small—only 1 square inch—it contains a
surprising number of features. Some of them are as follows:
 Supports Quad-band: GSM850, EGSM900, DCS1800 and PCS1900
 Connect onto any global GSM network with any 2G SIM
 Make and receive voice calls using an external 8Ω speaker & electret
microphone
 Send and receive SMS messages
 Send and receive GPRS data (TCP/IP, HTTP, etc.)
 Scan and receive FM radio broadcasts

 Transmit Power
 Class 4 (2W) for GSM850
 Class 1 (1W) for DCS1800
 Serial-based AT Command Set
 FL connectors for cell antennae
 Accepts Micro SIM Card

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 23


Vehicle Accident Alert System 115720474004

4.3.3 LED Status Indicators :-

The SIM800L module has an LED that indicates the status of your cellular
network. It will blink at different rates depending on the state it is in.

 The chip is running but hasn’t made a connection


To the cellular network yet.

Fig : 14(a) Blink every 1s(a)

 The GPRS data connection you requested is


active.

Fig : 14(b) Blink every 2s(b)

 The module has made contact with the cellular


network and can send/receive voice and SMS

Fig : 14(c) Blink every 3s

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 24


Vehicle Accident Alert System 115720474004

4.3.4 ANTENNA :-
The SIM800L module requires an external antenna in order to connect to the
network, so choosing the right antenna is very important. There are two options
available.
The first is a helical antenna that comes with the module and can be soldered
directly to the PCB. This antenna is very useful for space-constrained projects.
However, be aware that you may face difficulties establishing a connection,
particularly if your project is indoors.

Fig : 15 antenna

4.3.5 Power Consumption :-


One of the most important parts of getting the SIM800L module working is
supplying it with enough power.
The SIM800L, depending on its state, can be a relatively power-hungry device.
The module’s maximum current draw is around 2A (especially during a
transmission burst). It won’t usually draw that much, but it may need around
216mA during phone calls or 80mA during network transmissions. This chart
from the datasheet summarizes what you can expect:
 Selecting a Power Supply :-
Because the SIM800L module lacks an onboard voltage regulator, you must
select a power supply capable of supplying the SIM800L module within its 3.4V
to 4.4V range (preferably 4.0V). Also the power supply must be capable of
supplying at least 2A of surge current; otherwise, the chip will repeatedly reset

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 25


Vehicle Accident Alert System 115720474004

4.3.6 SIM800L GSM MODULE PIN DIAGRAM :-

The SIM800L module has 12 pins in total. The following is the pinout:

Fig : 16 SIM800L GSM MODULE PIN DIAGRAM

 NET :- pin is where you can solder the helical antenna that comes with the
module.
 VCC :- is the power supply pin. Keep in mind that the SIM800L chip has an
operating voltage range of 3.4 V to 4.4 V, so connecting this module to the
Arduino’s 5V output is probably going to cause damage to the module. It
doesn’t even run on 3.3 V! Use a Li-Po battery or a DC-DC buck converter
instead.
 RST (Reset) :- is the reset pin. If you got the module in an absolutely bad
space, pull this pin LOW for 100ms to perform a hard reset.
 RxD (Receiver) :-pin is used to send commands to the module. This pin is
auto-baud so the baud rate at which you send the “AT” command after reset
is the baud rate used.
 TxD (Transmitter):- pin transmits data from the module to the
microcontroller.
 GND:- is the ground pin.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 26


Vehicle Accident Alert System 115720474004

4.3.7 Wiring a SIM800L GSM Module to an Arduino :-


Now that you are familiar with the SIM800L module, it is time to connect it to
Arduino. To begin, connect the antenna to the module and insert a micro SIM
card into the socket. Next, connect the module’s Tx pin to the Arduino’s digital
pin #2, and Rx pin to the Arduino’s digital pin#3 as we will be communicating
with the module via software UART.
The only thing left to do is connect the power supply to the module. We’ve
included two different wiring diagrams to show you how

Fig : 17 Wiring a SIM800L GSM Module 1200mAh Li-Po battery

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 27


Vehicle Accident Alert System 115720474004

4.4 DC-DC BUCK CONVERTER


We recommend using a 2A-rated DC-DC buck converter, such as the LM2596,
with the output voltage set to 4.0V (ideal voltage). These are far superior to
linear voltage regulator modules in terms of efficiency. And an LM2596 DC-DC
buck converter is connected.

Fig : 18 Pin diagram of DC-DC Buck Convert

Buck Converter is a dc-to-dc converter designed to perform the step down


conversion of applied dc input. In a buck converter, the applied fixed dc input is
reduced to a specific dc output voltage i.e. output voltage of the buck converter
is always less than the input voltage. So, the Buck converter is also called the
step-down converter or step-up chopper.

The efficient power conversion in bulk converter extends battery life and
reduces the heat produced. So, it is mostly preferred for the production of
smaller gadgets. It can be used in lots of cool applications. It is widely used in
SMPS (switched-mode power supply) where the output dc voltage required is
less than the input dc voltage. The operation of the buck converter is based on
the principle of storing energy in an inductor. The voltage drop across an
inductor is proportional to the change in the electric current flowing through
the device. A switching transistor is used in between input and output for
continuous switches on and off at high frequency. To maintain a continuous
output, the circuit uses the energy stored in the inductor.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 28


Vehicle Accident Alert System 115720474004

Fig : 19 operation of the buck converter

4.4.1 Applications :-
Buck converter is basically used for conversion of high dc voltage to low dc
voltage.
It is mostly used in the following applications:
 It is used in battery power systems such as battery chargers for mobile
phones, laptops, and power banks
 It is used in self-regulating power systems such as SMPS
 It is used point of load converters for PCs and motherboards
 It is used in solar chargers
 It is used in adaptive control applications
 It is used in power audio amplifier applications
 Warnings
 You must be very careful not to disconnect GND before VCC and to always
connect GND before VCC. Otherwise, the module may use the low voltage
serial pins as ground, causing damage to the module.
 Also, ensure that your circuit and Arduino share a common ground.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 29


CHAPTER – 5
POWER SUPPLY
Vehicle Accident Alert System 115720474004

5.1 POWER SUPPLY


 In this project we used four (9v Batteries) and four (3.7v lithium batteries)
A battery is a device that stores chemical energy, and converts it to electricity.
This is known as electrochemistry and the system that underpins a battery is
called an electrochemical cell. A battery can be made up of one or several (like
in Volta's original pile) electrochemical cells. Each electrochemical cell consists
of two electrodes separated by an electrolyte. Most simply, electricity is a type
of energy produced by the flow of electrons. In an electrochemical cell,
electrons are produced by a chemical reaction that happens at one electrode
(more about electrodes below!) and then they flow over to the other electrode
where they are used up. To understand this properly, we need to have a closer
look at the cell's components, and how they are put together.

Fig : 20 working principle of battery

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 30


Vehicle Accident Alert System 115720474004

4.5.2 Working principle :-


Just as with other lithium-ion cells, LiPos work on the principle
of intercalation and de-intercalation of lithium ions from a positive electrode
material and a negative electrode material, with the liquid electrolyte providing
a conductive medium. To prevent the electrodes from touching each other
directly, a micro porous separator is in between which allows only the ions and
not the electrode particles to migrate from one side to the other. The voltage of
a single LiPo cell depends on its chemistry and varies from about 4.2 V (fully
charged) to about 2.7–3.0 V (fully discharged), where the nominal voltage is 3.6
or 3.7 volts (about the middle value of highest and lowest value) for cells based
on lithium-metal-oxides (such as LiCoO2). This compares to 3.6–3.8 V (charged)
to 1.8–2.0 V (discharged) for those based on lithium-iron-phosphate (LiFePO4).
The exact voltage ratings should be specified in product data sheets, with the
understanding that the cells should be protected by an electronic circuit that
won't allow them to overcharge nor over-discharge under use.
LiPo battery packs, with cells connected in series and parallel, have separate
pin-outs for every cell. A specialized charger may monitor the charge on a per-
cell basis so that all cells are brought to the same state of charge (SOC).

FIG: 21 lithium-ion battery

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 31


CHAPTER – 6
ARDUINO IDE SOFTWARE
Vehicle Accident Alert System 115720474004

6.1 ARDUINO IDE SOFTWARE


The Arduino software, also known as the Integrated Development Environment
(IDE), is a cross-platform application that is used to write and upload code to
Arduino boards. It is an open-source hardware and software company, project,
and user community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices. Its
hardware products are licensed under a CC BY-SA license, while the software is
licensed under the GNU Lesser General Public License (LGPL) or the GNU
General Public License (GPL), permitting the manufacture of Arduino boards and
software distribution by anyone. Arduino boards are available commercially
from the official website or through authorized distributors. Arduino is open-
source hardware. The hardware reference designs are distributed under a
Creative Commons Attribution Share-Alike 2.5 license and are available on the
Arduino website. Layout and production files for some versions of the hardware
are also available.
To use the Arduino IDE, you will need to connect your Arduino board to your
computer using a USB cable. You can then select the appropriate board and port
from the IDE and start writing code in the Arduino programming language,
which is based on C++.
Once you have written your code, you can compile it and upload it to the board
using the IDE. The Arduino software also provides a serial monitor that allows
you to communicate with your board and see the output of your program.
Overall, the Arduino software is an essential tool for anyone working with
Arduino boards and provides a simple and user-friendly environment for writing
and uploading code.

6.1.2 Arduino IDE Software window :-


A program for Arduino hardware may be written in any programming language
with compilers that produce binary machine code for the target processor.
Atmel provides a development environment for their 8-bit AVR and 32-bit ARM
Cortex-M based microcontrollers: AVR Studio (older) and Atmel Studio (newer).
executable from version 11 to their current install folder as it's independent
from IDE.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 32


Vehicle Accident Alert System 115720474004

 IDE 2.0 :-
On September 14, 2022, the Arduino IDE 2.0 was officially released as stable.
Previously, on October 18, 2019 the initial alpha preview was released as the
Arduino Pro IDE. On March 1, 2021, the beta preview was released, renamed
IDE 2.0. The system still uses Arduino CLI (Command Line Interface), but
improvements include a more professional development environment,
autocompletion support, and Git integration.The application frontend is based
on the Eclipse Theia Open Source IDE. The main features available in the new
release are:
• Modern, fully featured development environment
• Dual Mode, Classic Mode (identical to the Classic Arduino IDE) and Pro
Mode (File System view)
• New Board Manager
• New Library Manager
• Board List
• Basic Auto-Completion (Arm targets only)
• Git Integration
• Serial Monitor
• Dark Mode

 Sketch :-
A sketch is a program written with the Arduino IDE. Sketches are saved on the
development computer as text files with the file extension .ino. Arduino
Software (IDE) pre-1.0 saved sketches with the extension.ide.
A minimal Arduino C/C++ program consists of only two functions:
• setup(): This function is called once when a sketch starts after power-up or
reset. It is used to initialize variables, input and output pin modes, and other
libraries needed in the sketch. It is analogous to the function main().
• loop(): After setup() function exits (ends), the loop() function is executed
repeatedly in the main program. It controls the board until the board is
powered off or is reset. It is analogous to the function while(1).
The open-source nature of the Arduino project has facilitated the publication of
many free software libraries that other developers use to augment their
projects.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 33


Vehicle Accident Alert System 115720474004

Fig : 22(a) IDE software window

 Code Editor :-
The IDE comes with a code editor that provides syntax highlighting and auto-
completion for the Arduino programming language. The code editor in the
Arduino IDE is designed to be simple and easy to use, even for beginners.
It provides syntax highlighting, auto-indentation, and auto-completion features
to help make coding easier and more efficient. These features help highlight
keywords, functions, and variables in different colors, making it easier to read
and understand the code. The code editor in the Arduino IDE is based on the
open-source Code Mirror editor, which is a highly customizable and extensible
editor that is used by many other programming tools and platforms. This means
that users can customize the code editor to suit their specific needs and
preferences.

 Library Manager :-
The IDE has a library manager that allows you to easily install and manage
libraries that you need for your project. The Arduino library manager is a feature
built into the Arduino IDE (Integrated Development Environment) that allows
users to easily download, install, and manage libraries that can be used in their
Arduino projects. Libraries are collections of pre-written code that can be used
to perform specific functions or tasks in an Arduino project, such as controlling a
motor or reading a sensor.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 34


Vehicle Accident Alert System 115720474004

They are designed to save time and effort by providing ready-made code that
can be easily incorporated into your project.
Here are some key features of the Arduino library manager:

Fig : 22(b) Arduino library manager window


Access to a Wide Range of Libraries: The library manager provides access to a
vast collection of libraries that have been created and shared by the Arduino
community.

 Easy Installation:- The library manager makes it easy to install libraries.


Simply search for the library you need, and the library manager will
automatically download and install it for you.
 Automatic Updates:- The library manager also provides automatic updates
for libraries. When a new version of a library is available, the library manager
will notify you and give you the option to update.
 Library Verification:- The library manager verifies that the libraries you install
are compatible with your version of the Arduino IDE, which helps to prevent
errors and compatibility issues.
 User Libraries:- The library manager also allows you to create and manage
your own custom libraries, which can be shared with the Arduino community.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 35


Vehicle Accident Alert System 115720474004

 Serial Monitor:-
The IDE has a built-in serial monitor that allows you to send and receive data
between your Arduino board and your computer. The Arduino Serial Monitor is
a tool built into the Arduino IDE (Integrated Development Environment) that
allows you to communicate with your Arduino board over a serial connection. It
provides a way to send and receive data between your Arduino board and your
computer.
The Serial Monitor is useful for debugging and testing your Arduino projects. It
allows you to view the output of your code, send commands to your board, and
monitor the values of variables in real-time.
Here are some key features of the Arduino Serial Monitor:

Fig : 22(c) serial monitor window

 Real-Time Data Display:- The Serial Monitor provides real-time display of data
that is sent from your Arduino board to your computer. This can be helpful
when you need to monitor sensor readings or other data in real-time.
 Command Input:- The Serial Monitor allows you to send commands to your
Arduino board from your computer. This can be useful for controlling motors
or other devices connected to your board.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 36


Vehicle Accident Alert System 115720474004

 Variable Monitoring:- The Serial Monitor allows you to monitor the values of
variables in your code as they change in real-time. This can be helpful when
you need to debug your code or troubleshoot issues with your project.

 Data Visualization:- The Serial Monitor allows you to plot data from your
Arduino board on a graph. This can be useful when you need to visualize
changes in sensor readings or other data.

 Board Manager :-
The IDE has a board manager that allows you to easily select the type of
Arduino board you are using. The Arduino Board Manager is a feature built into
the Arduino IDE (Integrated Development Environment) that allows users to add
and manage different types of boards that can be used with Arduino.
Here are some key features of the Arduino Board Manager:

fig : 22(d) Board Manager window

 Board Support :- The Board Manager allows you to add support for a wide
range of boards that are compatible with Arduino, including official Arduino
boards and third-party boards.
 Easy Installation :- The Board Manager makes it easy to install board support
packages. Simply select the board you want to add, and the Board Manager
will automatically download and install the required files.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 37


Vehicle Accident Alert System 115720474004

 Board Configuration :- The Board Manager also allows you to configure the
settings for each board. This can include things like selecting the board type,
setting the processor frequency, and choosing the upload method.
 Multiple Board Support :- The Board Manager allows you to manage support
for multiple boards in the same IDE, making it easy to switch between
different boards when working on different projects.
 Automatic Updates :- The Board Manager provides automatic updates for
board support packages. When a new version of a board package is available,
the Board Manager will notify you and give you the option to update.

 Upload :-
The IDE allows you to easily compile and upload your code to your Arduino
board. The Arduino code uploader, also known as the Arduino bootloader, is a
small piece of code that is preloaded onto the microcontroller of an Arduino
board. The boot loader enables the microcontroller to receive new firmware
(i.e., the code for your project) through a serial connection from a computer,
without the need for an external programmer.
Here are some key features of the Arduino code uploader:
 Easy Firmware Upload:- The code uploader allows you to easily upload your
code to the microcontroller on the Arduino board, without the need for an
external programmer
 Serial Communication:- The code uploader communicates with your
computer over a serial connection. This allows you to send your code to the
microcontroller from the Arduino IDE.
 Automatic Reset:- When you upload new firmware to the microcontroller,
the code uploader automatically resets the board. This puts the board in
programming mode, allowing the new firmware to be uploaded
 Boot loader Size:- The Arduino boot loader takes up a small amount of space
on the microcontroller, leaving plenty of room for your project code.
 Overwrite Protection:- The boot loader includes protection to prevent
accidental overwrite of the boot loader code, ensuring that the board
remains in programming mode for firmware uploads.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 38


CHAPTER – 7
RESULTS
Vehicle Accident Alert System 115720474004

We used an Arduino Uno board to interface GPS, IR sensor, and GSM module.
The GPS module was used to obtain the location of the vehicle,

Fig : 23 (a) location of the vehicle

while the IR sensor was used to detect collisions. The GSM module was used to
send an alert message to a designated phone number in the event of an
accident.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 39


Vehicle Accident Alert System 115720474004

The system was designed to continuously monitor the vehicle's movement using
GPS and compare it with a predefined safe route. If the vehicle deviates from
the safe route or if the IR sensor detects a collision, the system sends an SMS
message containing the location of the accident to a pre-programmed number.
The system also turns on the hazard lights to alert nearby vehicles.

Fig : 23(b) the system sends an SMS message to a pre-programmed number

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 40


Vehicle Accident Alert System 115720474004

SCOPE OF THE VEHICLE ACCIDENT


DETECTION
The scope of a Vehicle Accident Alert System is to provide an early warning
system to alert emergency services in the event of an accident. This system can
be installed in vehicles or on the roadside, and it uses sensors and
communication technology to detect and report accidents to emergency
services.
The system can also provide critical information about the accident, such as the
location, severity, and type of accident, which can help emergency responders
to quickly assess the situation and respond appropriately. Additionally, the
system can provide real-time updates to the emergency services, enabling them
to adjust their response as needed.
The scope of the system also includes providing alerts to other drivers in the
vicinity of the accident, to warn them to slow down and drive safely. This can
help to prevent further accidents and ensure the safety of other road users.
Overall, the scope of a Vehicle Accident Alert System is to improve the safety of
the roads by providing timely and accurate information to emergency services
and other road users, which can help to prevent accidents and reduce the
severity of injuries in the event of an accident.
There are many ways to upgrade a vehicle accident detection system. Here are a
few examples:
 Add more sensors: You can add additional sensors such as accelerometers,
gyroscopes, or cameras to improve the accuracy of the accident detection
system.
 Machine learning algorithms: You can use machine learning algorithms to
analyze sensor data and identify patterns that indicate an accident. This can
improve the accuracy of the system and reduce false positives.
 Cloud integration: You can integrate the accident detection system with
cloud services to provide additional functionality such as real-time
monitoring, data storage, and remote management.
 Wireless communication: You can use wireless communication technologies
such as Wi-Fi, Bluetooth, or cellular networks to transmit sensor data and
alerts to a remote location or emergency services.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 41


Vehicle Accident Alert System 115720474004

 Autonomous emergency braking: You can install an autonomous emergency


braking (AEB) system that can automatically apply the brakes to prevent or
 reduce the severity of a collision. AEB can work in conjunction with an
accident detection system to provide an additional layer of safety.
 Driver monitoring: You can add a driver monitoring system that uses cameras
or sensors to detect drowsiness or distraction, and alert the driver or take
corrective action to prevent an accident.

Overall, there are many ways to upgrade a vehicle accident detection system,
depending on your specific requirements and the level of safety you want to
achieve.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 42


Vehicle Accident Alert System 115720474004

ADVANTAGES OF THE VEHICLE ACCIDENT


DETECTION
 Quick response time: Vehicle accident detection systems can immediately
alert emergency services or first responders in the event of an accident,
potentially saving lives and reducing the severity of injuries.

 Automatic detection: Vehicle accident detection systems can automatically


detect accidents without the need for human intervention. This can reduce
the risk of false negatives, where an accident is not detected, and false
positives, where a non-accident event triggers an alert.
 Integration with other safety systems: Vehicle accident detection systems can
integrate with other safety systems such as airbags, seat belts, and
autonomous emergency braking, to provide an additional layer of safety.
 Data collection: Vehicle accident detection systems can collect data on
accidents, including location, time, and severity, which can be used for
analysis and to improve road safety.
 Cost-effective: Vehicle accident detection systems can be cost-effective,
especially when compared to the cost of human lives lost or injuries
sustained in accidents.

DISADVANTAGES OF THE VEHICLE ACCIDENT


DETECTION
 Sensor failure: Vehicle accident detection systems rely on sensors, which can fail
due to various reasons such as sensor damage, interference, or calibration
issues. This can result in inaccurate accident detection or no detection at all.
Overall, vehicle accident detection systems offer many benefits in terms of
safety and data collection, but they also have some limitations and challenges
that need to be addressed to maximize their effectiveness and minimize their
drawbacks.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 43


Vehicle Accident Alert System 115720474004

CONCLUSION
Vehicle tracking system makes better fleet management and which in turn
brings large profits. Better scheduling or route planning can enable you handle
larger jobs loads within a particular time. Vehicle tracking both in case of
personal as well as business purpose improves safety and security,
communication medium, performance monitoring and increases productivity.
So in the coming year, it is going to play a major role in our day-to-day living.
Main motto of the accident alert system project is to decrease the chances of
losing life in such accident which we can’t 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. This vehicle tracking and
accident alert feature plays much more important role in day to day life in
future The vehicle accident detection System is an essentially a tool anticipated
by the present work used to prevent the drivers lifetime, whore main constantly
driving the vehicle (car) and aren't ready to get sufficient sleep. Several
accidents happen especially within the developing countries such as India
everywhere the quantity of the on road vehicles rises per annum. The
anticipated scheme defends the driving force from misfortune moment which
may happen due to fatigue of the driving force. The anticipated scheme is
reasonable as related to former schemes existing in the luxurious cars.
Habitually, one among the foremost essential and active feature of the system is
to create the practical readiness to identify as the attention is shut or open,
whenever vehicle driver lonely closing the eyes and that point sound alert
system is activated.

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 44


Vehicle Accident Alert System 115720474004

APPINDEX

#include <SoftwareSerial.h>
SoftwareSerial sim(2, 3);
int _timeout;

int ir = 8;
String _buffer;
String number = "+919640198259"; //-> change with your number
void setup() {
//delay(3000); //delay for 7 seconds to make sure the modules get the signal
pinMode(ir, INPUT);
Serial.begin(9600);
_buffer.reserve(50);
Serial.println("System Started...");

sim.begin(9600);
delay(1000);
Serial.println("Type s to send an SMS, r to receive an SMS, and c to make a
call");
}
void loop() {
int o = digitalRead(ir);
if(o == LOW){
SendMessage();
}
if (Serial.available() > 0)
switch (Serial.read())
{
case 's':
SendMessage();
break;
case 'r':
RecieveMessage();
break;

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 45


Vehicle Accident Alert System 115720474004

case 'c':
callNumber();
break;
}
if (sim.available() > 0)
Serial.write(sim.read());
}
void SendMessage()
{
//Serial.println ("Sending Message");
sim.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode
delay(200);
//Serial.println ("Set SMS Number");
sim.println("AT+CMGS=\"" + number + "\"\r"); //Mobile phone number to send
message
delay(200);
String SMS = "Accident Happened, Location is....
https://www.google.com/maps/place/17.388967,78.481788";
sim.println(SMS);
delay(100);
sim.println((char)26);// ASCII code of CTRL+Z
delay(200);
_buffer = _readSerial();
}
void RecieveMessage()
{
Serial.println ("SIM800L Read an SMS");
sim.println("AT+CMGF=1");
delay (200);
sim.println("AT+CNMI=1,2,0,0,0"); // AT Command to receive a live SMS
delay(200);
Serial.write ("Unread Message done");
}
String _readSerial() {
_timeout = 0;

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 46


Vehicle Accident Alert System 115720474004

while (!sim.available() && _timeout < 12000 )


{

delay(13);
_timeout++;
}
if (sim.available()) {
return sim.readString();
}
}
void callNumber() {
sim.print (F("ATD"));
sim.print (number);
sim.print (F(";\r\n"));
_buffer = _readSerial();
Serial.println(_buffer);
}

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 47


Vehicle Accident Alert System 115720474004

BIBLIOGRAPHY

CHROME :-
https://www.google.com/search?q=goo
gle&oq=google&aqs=chrome..69i57j69i6
0l3.14788j0j7&sourceid=chrome&ie=UTF
-8

WIKIPEDIA :-
https://www.wikipedia.org/

CIRCUIT DESIGN :-
https://www.circuito.io/

PRAGATI MAHAVIDYALAYA DEGREE COLLEGE 48

You might also like