0% found this document useful (0 votes)
41 views81 pages

Mini Document Aits

Uploaded by

Kalyankumar Ab
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)
41 views81 pages

Mini Document Aits

Uploaded by

Kalyankumar Ab
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/ 81

ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

CHAPTER-1
INTRODUCTION

The Internet of Things (IoT) is an arrangement of interrelated computing gadgets,


mechanical and digital machines, objects, animals or individuals that are given one kind of an
identifiers and the capacity to exchange information over a system without requiring human-to-
human or human-to-PC communication. IoT is a new concept that has evolved from the
convergence of wireless technologies. Wireless communication is the transfer of information or
signal between two or more points that are not connected by an electrical conductor. In IoT
devices equipped with Wi-Fi allow the machine-to-machine communication. 1978. In the early
years, the technology was not yet operational, due to an insufficient number of satellites orbiting
the earth. On Jan. 17, 1994, after years of gradual growth, the final of the first 24 satellites was
launched, and the GPS system was considered fully operational. Early GPS was designed
primarily only for military but in 1996, President Bill Clinton determined that the system would
be an asset to civilians as well as the military. This policy change made GPS technology
available to the average individual, including fleet managers, who could see the benefit of using
the technology to keep tabs on their vehicles. In the early days of fleet tracking, in order to
properly track a fleet, each vehicle had to be enabled with a costly GPS.
Nowadays, there is an increase in the number of accidents that happen in the world. As
the population is increasing, there is the number of cars increasing on the road that contributes to
severe accidents that happen daily. Around 80 per cent of accidents contribute to the loss of
many lives. Mostly, the growing countries are being targeted by the day to day road accidents.
The major reason is the lack of infrastructure, lack of traffic control and accident management.
Out of all the developing countries, India has been listed as the country with a higher number of
accidents . The most prominent reason for the loss of a life during an accident is the
unavailability of immediate help that can save a person's life by a few seconds. The moment an
accident has occurred, the life of all passengers travelling in the vehicle is at stake. It all depends
on response time that can save their lives by a few minutes or seconds. According to the statistics,
reducing accident delay time by even 1 minute can save 6 per cent of lives. Hence, this response
time is very crucial, and it needs to be reduced or at least either improved to save their lives . To
contribute to our society and reduce the number of accidents happening in our day to day life,
there are several techniques and mechanisms that can drop down the rate of accidents and can
save lot lives. Living in a tech world that is growing day by day with new technologies, we can
MINI PROJECT 1 DEPT OF ECE AITH
HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

apply these techniques in our society and help them overcome such problems. The Vision of the
Internet of Things (IoT) has come out to reach unexpected bounds of today's computing world. It
is a concept that not only can impact human's life but also how they function . The heart of IOT
is smart sensors without which it would not have existed. These sensors form a vast network for
their communication. They capture minute details of their surroundings and pass this important
information to each other. Based on the received information, relevant actions are performed
accordingly. It is the latest communication model that imagines the proximate future, in which
objects of day to day life will be incorporated with microcontrollers for digital communication
with the help of appropriate protocol stacks that will make them capable of communication with
one another. It is a technology that aims to impart intelligence to devices so that they can smartly
connect and perform the necessary actions to eliminate human labour. It gives an image of the
future where non-living objects will be communicating with each other and doing the needful
work. In this way, human labour will be eliminated to an extent and the devices will be
performing necessary actions. The significance of accident detection and notification system is
very prominent for our society. Imagine a situation where an accident happened, it is
immediately notified to the emergency services. This will result in the rescue of injured people
involved in the accident. As the Internet of Things has witnessed fast growth these days, it has
the power to bridge these two situations . For the IoT paradigm be effective, it should have the
capability to track the location of the objects (i.e. cars in our case) which can serve to be useful
for the ambulances to reach the location on time .
An embedded system is a combination of computer hardware and software designed for a
specific function. Embedded systems might also function within a larger system. These systems
can be programmable or have a fixed functionality. Embedded systems are used today to control
numerous devices. For example, they're used in industrial machines, consumer electronics,
agricultural and processing industry devices, automobiles, medical devices, cameras, digital
watches, household appliances, airplanes, vending machines, toys and mobile devices.

1.1 INTRODUCTION FOR EMBEDDED SYSTEM

Embedded systems typically contain a microprocessor or a microcontroller-based


system, memory and input/output (I/O) devices, all of which share a dedicated function within a
larger system. While embedded systems are computing systems, they can range from having no
user interface (UI) -- for example, on devices designed to perform a single task -- to complex
graphical user interfaces (GUIs), such as in mobile devices. UIs can include buttons, light-

MINI PROJECT 2 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

emitting diodes (LEDs) and touchscreen sensing. Some systems use remote user interfaces as
well.

According to Global Markets Insight, the embedded systems market was valued at $110.3
billion in 2023 and is predicted to grow to more than $190 billion by 2032. Chip manufacturers
for embedded systems include many well-known technology companies, such as Apple, IBM,
Intel and Texas Instruments. The expected growth is partially due to the continued investment in
artificial intelligence (AI), mobile computing and the need for chips designed for high-level
processing.

1.2 Special Features of Embedded Systems


Features of Embedded Systems are as follows:

1. Embedded Systems are task-specific. They do some specific tasks repeatedly over their
lifetime.
2. Embedded systems have very limited resources.
3. They are created to perform the task within a time frame.
4. They have a minimal user interface only. Embedded systems will do the function when the
operation is set and stops when the task gets over.
5. Embedded systems are built to achieve certain efficiency levels.
6. Embedded systems are stable and reliable and the users cannot upgrade the functions
directly.
7. These embedded systems are expected to function for long durability without any difficulties.

1.3 Characteristics of embedded systems


The main characteristic of embedded systems is that they're task-specific. They often
include the following additional characteristics:

 They typically consist of hardware, software and firmware.

 They can be embedded in a larger system to perform a specific function, as they're built
for specialized tasks within the system, not various tasks.

 They can be either microprocessor-based or microcontroller-based -- both are integrated


circuits that give the system compute power.

MINI PROJECT 3 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

 They often use ASIC and FPGA SoCs.

 They're often used for sensing and real-time computing in internet of things (IoT) devices,
which are devices that are internet-connected and don't require a user to operate.

 They can vary in complexity and function, which affects the type of software, firmware
and hardware they use.

 They're often required to perform their function under a time constraint to keep the larger
system functioning properly.

1.4 APPLICATIONS OF EMBEDDED SYSTEMS


Consumer Electronics

1. Smart Home

Embedded systems power smart home devices like thermostats, lighting controls, WiFi
Cameras and security systems. The Internet of Things (IoT) software stack helps us to monitor
and control these devices from anywhere in the world. Today we have WiFi cameras available
on e-commerce sites like Amazon that connect to your WiFi at home and can be controlled from
anywhere to monitor your home. There are LED bulbs available connected to your home WiFi
that can be switched on or off from anywhere in the world. Motion-sensing LED bulbs help you
to keep your power consumption minimal when no one is around.

2. Home Appliances:

Home appliances like TVs, Washers, Dryers, Refrigerators, personal A/C units are running
on embedded systems. They provide intuitive user interfaces through small screens or remorse
control units and make the user’s lives simple. Many of them are moving towards IoT where you
could get them serviced remotely. Smart TVs have revolutionized how you consume content by
providing on-demand services.

Automotive Industry

1. Engine Control Units (ECUs)

Embedded systems in ECUs manage engine performance, fuel efficiency, and emission
control. They provide real-time processing and control, ensuring optimal engine operation.

MINI PROJECT 4 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

2. Driver Safety Systems

Anti-lock braking Systems (ABS), Airbags, driver drowsiness detection systems help in
driver safety in case of any accidents. These systems are specially designed unlike consumer
embedded systems to ensure they respond in real time to any such incidents. The software and
hardware for these kinds of applications are specially designed to provide redundancy in
advanced designs. Some government-enforced regulations and standards control passenger safety.
All such safety systems need to meet this.

3. Advanced Driver-Assistance Systems (ADAS)

Embedded systems enable features like adaptive cruise control, lane-keeping assist,
electronic mirrors, parking assist and automatic headlight tracking that enhance driving
experience. They integrate data from various sensors (sensor fusion), including cameras, radar,
and lidar, to provide situational awareness and assistance.

Healthcare

1. Medical Devices

Embedded systems are used in personal medical devices such as pacemakers, infusion
pumps, diagnostic equipment like glucometers, and pulse oximeters to help monitor critical
parameters like blood glucose and oxygen saturation. They provide you with low-cost
monitoring at lower precision levels. If you go to a diagnostic lab you can find many embedded
equipment like MRI scanners and ultrasound scanners that provide higher level precision.
Whereas personal devices are used for indicative measures the diagnostic devices in labs are
used for prescribing medication. Lab devices ensure high reliability and precision, essential for
patient safety and effective treatment.

2. Wearable Health Tech

Embedded systems in fitness trackers like Fit bit and smartwatches like Apple Watch
monitor health metrics like heart rate, sleep patterns, and physical activity. You can monitor the
activity through your dashboards so that you can track your progress over time. Due to the
increase in spend by insurers, it is expected that they want you to enable remote health

MINI PROJECT 5 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

monitoring and data collection. This will help them administer appropriate health insurance
premiums depending on one’s physical activity and status.

1.5 Embedded system trends


While some embedded systems can be relatively simple, others are becoming more
complex and can either supplant human decision-making or offer capabilities beyond what a
human could provide. For instance, some aviation systems, including those used in drones, can
integrate sensor data and act upon that information faster than a human could, permitting new
kinds of operating features.

The embedded system is expected to continue growing rapidly, driven in large part
by IoT. Expanding IoT applications, such as wearables, drones, smart homes, smart buildings,
video surveillance, three-dimensional printers and smart transportation, are expected to fuel
embedded system growth.

Other embedded system trends include the following:

 AI and ML. This is a currently growing trend of integrating AI and ML systems into
devices such as smartphones, autonomous vehicles, industrial automation devices and
wearable devices.

 Edge computing. Edge computing, which pushes the processing of data closer to the
source device, is also becoming more prevalent in embedded systems, as it can lower latency
and bandwidth usage -- especially in real-time applications.

 Security. As security becomes an increasing concern for many, security features such as
encryption and secure boot mechanisms are being integrated into embedded systems.

 Increased connectivity. Continued improvements in Bluetooth and 5G technologies


provide higher bandwidth and lower latency for embedded systems.

 Quantum computing. Integrating quantum computing with embedded systems could


offer better security through quantum cryptography, improved optimization and advanced
problem-solving. Practical applications, however, are still emerging.

MINI PROJECT 6 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

CHAPTER-2

BLOCK DIAGRAM

2.1 BLOCK DIAGRAM OVERVIEW:

Fig.2.1.block diagram

MINI PROJECT 7 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER-3
HARDWARE DESCRIPTION

The list of components used for designing of Accident Alert Vehicle System Using
GPS and GSM are
 Arduino UNO
 Power supply
 IR sensor
 Alcohol sensor
 LCD
 GSM module
 GPS module
 Relay with DC motor
 Buzzer

3.1 ARDUINO CONTROLLER

Arduino 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 and interactive objects that can sense and control both
physically and digitally. Its products are 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 in preassembled form or as do-it-yourself (DIY) kits.

Arduino board designs use a variety of microprocessors and controllers. The boards
are equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards or breadboards (shields) and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some models, which are
also used for loading programs from personal computers. The microcontrollers are typically
programmed using a dialect of features from the programming languages C and C++. In addition
MINI PROJECT 8 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

to using traditional compiler toolchains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.

The Arduino project started in 2003 as a program for students at the Interaction Design
Institute Ivrea in Ivrea, Italy, aiming to provide a low-cost and easy way for novices and
professionals to create devices that interact with their environment using sensors and actuators.
Common examples of such devices intended for beginner hobbyists include simple robots,
thermostats and motion detectors.

The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the
project used to meet. The bar was named after Arduin of Ivrea, who was the margrave of the
March of Ivrea and King of Italy from 1002 to 1014.

Fig.4.1. Hardware image.

3.1.1 OPERATION WITH PINS:

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.

Although the hardware and software designs are freely available under copyleft licenses,
the developers have requested the name Arduino to be exclusive to the official product and not
be used for derived works without permission. The official policy document on use of the
Arduino name emphasizes that the project is open to incorporating work by others into the
official product. Several Arduino-compatible products commercially released have avoided the
project name by using various names ending in -duino.

MINI PROJECT 9 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Fig.4.2. Back side of module.

Most Arduino boards consist of an Atmel 8-bit AVR microcontroller (ATmega8,[24]


ATmega168, ATmega328, ATmega1280, ATmega2560) with varying amounts of flash memory,
pins, and features. The 32-bit Arduino Due, based on the Atmel SAM3X8E was introduced in
2012. The boards use single or double-row pins or female headers that facilitate connections for
programming and incorporation into other circuits. These may connect with add-on modules
termed shields. Multiple and possibly stacked shields may be individually addressable via an I²C
serial bus. Most boards include a 5 V linear regulator and a 16 MHz crystal oscillator or ceramic
resonator. Some designs, such as the LilyPad, run at 8 MHz and dispense with the onboard
voltage regulator due to specific form-factor restrictions.

Arduino microcontrollers are pre-programmed with a boot loader that simplifies


uploading of programs to the on-chip flash memory. The default bootloader of the Arduino UNO
is the optiboot bootloader. Boards are loaded with program code via a serial connection to
another computer. Some serial Arduino boards contain a level shifter circuit to convert between
RS-232 logic levels and transistor–transistor logic (TTL) level signals. Current Arduino boards
are programmed via Universal Serial Bus (USB), implemented using USB-to-serial adapter chips
such as the FTDI FT232. Some boards, such as later-model Uno boards, substitute the FTDI chip
with a separate AVR chip containing USB-to-serial firmware, which is reprogrammable via its
own ICSP header. Other variants, such as the Arduino Mini and the unofficial Boarduino, use a
detachable USB-to-serial adapter board or cable, Bluetooth or other methods. When used with
traditional microcontroller tools, instead of the Arduino IDE, standard AVR in-system
programming (ISP) programming is used. The Arduino board exposes most of the
microcontroller's I/O pins for use by other circuits. The Diecimila,[a] Duemilanove,[b] and
current Uno[c] provide 14 digital I/O pins, six of which can produce pulse-width modulated
MINI PROJECT 10 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

signals, and six analog inputs, which can also be used as six digital I/O pins. These pins are on
the top of the board, via female 0.1-inch (2.54 mm) headers. Several plug-in application shields
are also commercially available. The Arduino Nano, and Arduino-compatible Bare Bones Board
and Boarduino boards may provide male header pins on the underside of the board that can plug
into solderless breadboards.

Many Arduino-compatible and Arduino-derived boards exist. Some are functionally


equivalent to an Arduino and can be used interchangeably. Many enhance the basic Arduino by
adding output drivers, often for use in school-level education, to simplify making buggies and
small robots. Others are electrically equivalent but change the form factor, sometimes retaining
compatibility with shields, sometimes not. Some variants use different processors, of varying
compatibility.

Fig.4.3. Ardino board.

1. Power USB
Arduino board can be powered by using the USB cable from your computer. All you need to do is connect the
USB cable to the USB connection (1).

Power (Barrel Jack)

Arduino boards can be powered directly from the AC mains power supply by connecting it
to the Barrel Jack (2).

Voltage Regulator

The function of the voltage regulator is to control the voltage given to the Arduino board
and stabilize the DC voltages used by the processor and other elements.

MINI PROJECT 11 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Crystal Oscillator

The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top
of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or
16 MHz.

Arduino Reset

You can reset your Arduino board, i.e., start your program from the beginning. You can
reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET (5).

Pins (3.3, 5, GND, Vin)

 3.3V (6) − Supply 3.3 output volt

 5V (7) − Supply 5 output volt

 Most of the components used with Arduino board works fine with 3.3 volt and 5
volt.

 GND (8)(Ground) − There are several GND pins on the Arduino, any of which
can be used to ground your circuit.

 Vin (9) − This pin also can be used to power the Arduino board from an external
power source, like AC mains power supply.

Analog pins

The Arduino UNO board has six analog input pins A0 through A5. These pins can read
the signal from an analog sensor like the humidity sensor or temperature sensor and
convert it into a digital value that can be read by the microprocessor.

Main microcontroller

Each Arduino board has its own microcontroller (11). You can assume it as the brain of
your board. The main IC (integrated circuit) on the Arduino is slightly different from
board to board. The microcontrollers are usually of the ATMEL Company. You must
know what IC your board has before loading up a new program from the Arduino IDE.
This information is available on the top of the IC. For more details about the IC
construction and functions, you can refer to the data sheet.

MINI PROJECT 12 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

ICSP pin

Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of
MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial
Peripheral Interface), which could be considered as an "expansion" of the output. Actually,
you are slaving the output device to the master of the SPI bus.

Power LED indicator

This LED should light up when you plug your Arduino into a power source to indicate that
your board is powered up correctly. If this light does not turn on, then there is something
wrong with the connection.

TX and RX LEDs

On your board, you will find two labels: TX (transmit) and RX (receive). They appear in
two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the
pins responsible for serial communication. Second, the TX and RX led (13). The TX led
flashes with different speed while sending the serial data. The speed of flashing depends
on the baud rate used by the board. RX flashes during the receiving process.

Digital I/O

The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to
read logic values (0 or 1) or as digital output pins to drive different modules like LEDs,
relays, etc. The pins labeled “~” can be used to generate PWM.

AREF

AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.

MINI PROJECT 13 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

3.2 POWER SUPPLY:


All digital circuits require regulated power supply. In this article we are going to learn
how to get a regulated positive supply from the mains supply.

Fig:2.2 shows the basic block diagram of a fixed regulated power supply. Let us go through each
block.

MINI PROJECT 14 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

3.2.1 TRANSFORMER

A transformer consists of two coils also called as “WINDINGS” namely PRIMARY &
SECONDARY.
They are linked together through inductively coupled electrical conductors also called as
CORE. A changing current in the primary causes a change in the Magnetic Field in the core &
this in turn induces an alternating voltage in the secondary coil. If load is applied to the
secondary then an alternating current will flow through the load. If we consider an ideal
condition then all the energy from the primary circuit will be transferred to the secondary circuit
through the magnetic field.

So

The secondary voltage of the transformer depends on the number of turns


in the Primary as well as in the secondary.

MINI PROJECT 15 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

3.2.2 Rectifier

A rectifier is a device that converts an AC signal into DC signal. For rectification purpose
we use a diode, a diode is a device that allows current to pass only in one direction i.e. when the
anode of the diode is positive with respect to the cathode also called as forward biased condition
& blocks current in the reversed biased condition.

Rectifier can be classified as follows:


1) Half Wave rectifier.

This is the simplest type of rectifier as you can see in the diagram a half wave rectifier
consists of only one diode. When an AC signal is applied to it during the positive half cycle the
diode is forward biased & current flows through it. But during the negative half cycle diode is
reverse biased & no current flows through it. Since only one half of the input reaches the output,
it is very inefficient to be used in power supplies.

2) Full wave rectifier.

MINI PROJECT 16 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

Half wave rectifier is quite simple but it is very inefficient, for greater efficiency we
would like to use both the half cycles of the AC signal. This can be achieved by using a center
tapped transformer i.e. we would have to double the size of secondary winding & provide
connection to the center. So during the positive half cycle diode D1 conducts & D2 is in reverse
biased condition. During the negative half cycle diode D2 conducts & D1 is reverse biased. Thus
we get both the half cycles across the load.
One of the disadvantages of Full Wave Rectifier design is the necessity of using a center
tapped transformer, thus increasing the size & cost of the circuit. This can be avoided by using
the Full Wave Bridge Rectifier.

3) BridgeRectifier.

As the name suggests it converts the full wave i.e. both the positive & the negative half
cycle into DC thus it is much more efficient than Half Wave Rectifier & that too without using a
center tapped transformer thus much more cost effective than Full Wave Rectifier.

Full Bridge Wave Rectifier consists of four diodes namely D1, D2, D3 and D4. During
the positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle diodes D2 &
D3 conduct thus the diodes keep switching the transformer connections so we get positive half
cycles in the output.

MINI PROJECT 17 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

If we use a center tapped transformer for a bridge rectifier we can get both positive &
negative half cycles which can thus be used for generating fixed positive & fixed negative
voltages.

3.2.3 FILTER CAPACITOR

Even though half wave & full wave rectifier give DC output, none of them provides a
constant output voltage. For this we require to smoothen the waveform received from the
rectifier. This can be done by using a capacitor at the output of the rectifier this capacitor is also
called as “FILTER CAPACITOR” or “SMOOTHING CAPACITOR” or “RESERVOIR
CAPACITOR”. Even after using this capacitor a small amount of ripple will remain.
We place the Filter Capacitor at the output of the rectifier the capacitor will charge to the
peak voltage during each half cycle then will discharge its stored energy slowly through the load
while the rectified voltage drops to zero, thus trying to keep the voltage as constant as possible.

MINI PROJECT 18 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

If we go on increasing the value of the filter capacitor then the Ripple will decrease. But
then the costing will increase. The value of the Filter capacitor depends on the current consumed
by the circuit, the frequency of the waveform & the accepted ripple.

Where,
Vr= accepted ripple voltage.( should not be more than 10% of the voltage)
I= current consumed by the circuit in Amperes.
F= frequency of the waveform. A half wave rectifier has only one peak in one cycle so F=25hz
Whereas a full wave rectifier has Two peaks in one cycle so F=100hz.

3.2.4 VOLTAGE REGULATOR

A Voltage regulator is a device which converts varying input voltage into a constant
regulated output voltage. Voltage regulator can be of two types
1) Linear Voltage Regulator
Also called as Resistive Voltage regulator because they dissipate the excessive voltage
resistively as heat.
2) Switching Regulators.
They regulate the output voltage by switching the Current ON/OFF very rapidly. Since
their output is either ON or OFF it dissipates very low power thus achieving higher efficiency as
compared to linear voltage regulators. But they are more complex & generate high noise due to
their switching action. For low level of output power switching regulators tend to be costly but
for higher output wattage they are much cheaper than linear regulators.
The most commonly available Linear Positive Voltage Regulators are the 78XX series
where the XX indicates the output voltage. And 79XX series is for Negative Voltage Regulators.

MINI PROJECT 19 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

After filtering the rectifier output the signal is given to a voltage regulator. The maximum
input voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the
regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the
input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other
reason the voltage regulator will not be able to produce the correct regulated voltage.

Circuit diagram:

Fig 2.3. Circuit Diagram of power supply

IC 7805:
7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an
input voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp
although lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also
has a built-in current limiter as a safety feature. 7805 is manufactured by many companies,
including National Semiconductors and Fairchild Semiconductors.

The 7805 will automatically reduce output current if it gets too hot.The last two digits
represent the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators
is designed to work in complement with the 79xx series of negative voltage regulators in systems
that provide both positive and negative regulated voltages, since the 78xx series can't regulate
negative voltages in such a system.

The 7805 & 78 is one of the most common and well-known of the 78xx series regulators,
as it's small component count and medium-power regulated 5V make it useful for powering TTL
devices.

MINI PROJECT 20 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

Table 2.1. Specifications of IC7805

SPECIFICATIONS IC 7805

Vout 5V

Vein - Vout Difference 5V - 20V

Operation Ambient Temp 0 - 125°C

Output Imax 1A

3.3 IR SENSOR:

3.3.1 IR transmitter and receiver

Basics of IR transmitter and receiver transmitter and receiver are commonly used in engineering
projects for remote control of objects. In particularly, in Robotic system uses transmitter and
receiver. Here i would like to describe the basics if IR transmitter and receiver

Basics of IR transmitter:

An electroluminescent IR LED is a product which requires care in use. IR LED’s are fabricated
from narrow band hetero structures with energy gap from 0.25 to 0.4 eV. Infra red transmitter
emits IR rays in planar wave front manner. Even though infra red rays spread in all directions, it
propagates along straight line in forward direction. IR rays have the characteristics of producing
secondary wavelets when it collides with any obstacles in its path. This property of IR is used
here.

MINI PROJECT 21 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

When IR rays gets emitted from LED, it moves in the direction it is angled. When any obstacle
interferes in the path, the IR rays get cut and it produces secondary wavelets which propagates
mostly in return direction or in a direction opposite to that of the primary waves, which produces
the net result like reflection of IR rays.

Working of infrared communication:

Various types of infrared based applications are available in the market. The circuit for
infrared based applications is designed along with the transmitter and receiver sections i.e. we
can’t use it for other application. But the infrared communication project which we have done
here can be used in any application just by replacing the application at the place of infrared LED
in the circuit diagram of infrared communication. By using this project we can design infrared
based applications easily. The entire circuit consists of two sections named as

1. Transmitter section and


2. Receiver section

1. Transmitter section:

The transmitter section consists of a 555 timer IC functioning in astable mode. It is wired
as shown in figure. The output from astable mode is fed to an IR LED via resistor which limits
its operating current. Infrared LED in the transmitter section emits IR radiation which is focused
by a plastic lens (optics) in to a narrow beam.

2. Receiver section:

The receiver section consists of a silicon phototransistor to convert the infrared radiation
to an electric current. It responds only to the rapidly pulsing signal created by the transmitter,
and filters out slowly changing infrared radiation from ambient light. The receiver section
comprises an infrared receiver module, and a led indicator. When the signals are interrupted, the
IR Led goes off after a few seconds depending upon the value of RC combination.

We can increase the distance between the IR transmitter and receiver just by placing the
lens between them. After connecting the IR transmitter and receiver circuit, we can get the
output by applying 6V Power supply to the circuit. We can use this circuit with any application
MINI PROJECT 22 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

very simply. For example a buzzer circuit is placed at the output of IR circuit, when the signals
are interrupted, the buzzer produces sound. Both the transmitter and receiver parts can be
mounted on a single bread board or PCB. The infrared receiver must be placed behind the IR Led
to avoid false indication due to infrared leakage. An object moving nearby actually reflects the
IR rays emitted by the IR Led.

3.3.2 Photo Diodes:

A photodiode is a semiconductor diode that functions as a photo detector. Photodiodes are


packaged with either a window or optical fiber connection, to let in the light to the sensitive part
of the device. They may also be used without a window to detect vacuum UV or X-rays.

A phototransistor is in essence nothing more than a bipolar transistor that is encased in


a transparent case so that light can reach the base-collector junction. The phototransistor works
like a photodiode, but with a much higher responsivity for light, because the electrons that are
generated by photons in the base-collector junction are injected into the base, and this current is
then amplified by the transistor operation.

Fig (3.13) Photodiode schematic symbol

Principle of operation:

A photodiode is a p-n junction or p-i-n structure. When a photon of sufficient energy


strikes the diode, it excites an electron thereby creating a mobile electron and a positively
charged electron hole. If the absorption occurs in the junction's depletion region, or one diffusion
length away from it, these carriers are swept from the junction by the built-in field of the
depletion region, producing a photocurrent.

Photodiodes can be used under either zero bias (photovoltaic mode) or reverse bias
(photoconductive mode). In zero bias, light falling on the diode causes a current across the
device, leading to forward bias which in turn induces "dark current" in the opposite direction to

MINI PROJECT 23 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

the photocurrent. This is called the photovoltaic effect, and is the basis for solar cells in fact; a
solar cell is just a large number of big photodiodes. Reverse bias induces only little current
(known as saturation or back current) along its direction.

But a more important effect of reverse bias is widening of the depletion layer
(therefore expanding the reaction volume) and strengthening the photocurrent. Circuits based on
this effect are more sensitive to light than ones based on the photovoltaic effect and also tend to
have lower capacitance, which improves the speed of their time response. On the other hand, the
photovoltaic mode tends to exhibit less electronic noise.

Avalanche photodiodes have a similar structure, but they are operated with much
higher reverse bias. This allows each photo-generated carrier to be multiplied by avalanche
breakdown, resulting in internal gain within the photodiode, which increases the effective
responsivity of the device.

3.3.3 Features:

Critical performance parameters of a photodiode include:

1. Responsivity:

The responsivity may also be expressed as quantum efficiency, or the ratio of the number of
photo generated carriers to incident photons and thus a unit less quantity.

2. Dark current:

The dark current includes photocurrent generated by background radiation and the
saturation current of the semiconductor junction. Dark current must be accounted for by
calibration if a photodiode is used to make an accurate optical power measurement, and it is also
a source of noise when a photodiode is used in an optical communication system.

3. Noise-equivalent power:

(NEP) The minimum input optical power to generate photocurrent, equal to the RMS noise
current in a 1 hertz bandwidth. The related characteristic directivity (D) is the inverse of NEP,
1/NEPThe NEP is roughly the minimum detectable input power of a photodiode.

MINI PROJECT 24 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

3.3.4 Applications:

1. P-N photodiodes are used in similar applications to other photo detectors, such as
photoconductors, charge-coupled devices, and photomultiplier tubes.
2. Photodiodes are used in consumer electronics devices such as compact disc players,
smoke detectors, and the receivers for remote controls in VCRs and televisions.
3. PIN diodes are much faster and more sensitive than ordinary p-n junction diodes, and
hence are often used for optical communications and in lighting regulation.

3.3.5 P-N vs. P-I-N Photodiodes:

1. Due to the intrinsic layer, a PIN photodiode must be reverse biased (Vr). The Vr increases
the depletion region allowing a larger volume for electron-hole pair production, and reduces the
capacitance thereby increasing the bandwidth.

2. The Vr also introduces noise current, which reduces the S/N ratio. Therefore, a reverse
bias is recommended for higher bandwidth applications and/or applications where a wide
dynamic range is required.
3. A PN photodiode is more suitable for lower light applications because it allows for
unbiased operation.

3.4 ALCOHOL SENSOR

The MQ3 alcohol sensor is one of the series of MQ gas sensors, which can detect and
monitor the alcohol gas present in the atmosphere. It is capable of detecting 25-500ppm alcohol
gas concentration in the air. This article gives a brief description of the pin configuration,
specifications, and Arduino interfacing of the MQ3 alcohol sensor. The alternatives of MQ3
alcohol sensors are MQ138 (benzene, hydrogen, alcohol, propane, toluene, formaldehyde gas),
MQ303A (ethanol, smoke, and alcohol), MQ2(methane, smoke, LPG, butane), MQ214
(methane), MQ5 (natural gas and LPG), and MQ306A (LPG and butane).

3.4.1 MQ3 Alcohol Sensor Module Pin Out/Pin Diagram:

The MQ3 alcohol sensor comes in a 4-pin gas sensor module. The pin configuration/pin
diagram is shown in the figure below.
MINI PROJECT 25 DEPT OF ECE AITH
HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Pin Configuration of MQ3 Module


VCC: This pin refers to the positive power supply. To power up the sensor, the 5V positive
supply is connected to this pin

GND: This pin refers to the common ground connection.

Digital Output (Do): This pin generates the digital output signal by varying threshold limits
with the help of an onboard potentiometer. This pin is to represent the digital output as 0 or 1
based on the alcohol gas present in the air.

Analog Output (Ao): This pin generates an analogue output signal in the range of 0V to 5V and
it depends on the alcohol gas intensity.

MQ3 Alcohol Sensor Features:

Technical Specifications:

The MQ3 alcohol sensor technical specifications are listed below.

 It requires a power supply of 5VDC (@ 165mA heater ON / 60mA heater off).


 Consumes 150mA current.
 Digital output Do: 0 and 1 TTL digital (0.1V and 5V).
 Analog output Ao: 0.1V to 0.3V (relates to pollution), voltage concentration is maximum
of 4V.
 Alcohol Concentration detection: 0.05 mg/L to 10 mg/L.
 Interface: one TTL compatible input (HSW) and one TTL compatible output (ALR).
MINI PROJECT 26 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

 Heater consumes: <750mW.


 Resistance of the heater: 33ohms±5%.
 Operating temperature: -10°C to 50°C (14°F to 122°F).
 Storage temperature: 20°C to 70°C.
 Load resistance is 200kilo ohms.
 Sensitivity Rs: ≥5: Rs(in the air) / Rs(0.4mg/L Alcohol).
 Sensing resistance Rs: 1Mega ohms to 8Mega ohms @ 0.4mg/L alcohol.
 Sensor dimensions:32x22x16mm.
 Humidity: <95%RH.
 Oxygen concentration: 21%
 Slope rate: ≤0.6.
 Preheating duration: 20seconds.

3.4.2 Circuit Diagram of MQ3 Alcohol Sensor/How to Connect:

Now, let’s have a look at how to interface the MQ3 alcohol sensor with the Arduino
UNO. In this case, the analogue output pin of the MQ3 sensor is used for proper sensor
calibration. The circuit diagram/how to use the MQ3 alcohol sensor with the Arduino is shown
in the figure below. The components required are;

Interfacing MQ3 with Arduino


 Arduino UNO.
 MQ3 alcohol sensor.
 5V positive power supply.
MINI PROJECT 27 DEPT OF ECE AITH
HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

 Connecting wires.
 Serial monitor to upload the Arduino code and observe the output.
Connect the MQ3 Sensor to Arduino UNO as per the above diagram.

The 5V operating voltage terminal of the Arduino is connected to the VCC pin of the
MQ3 alcohol sensor. The analogue output pin of the sensor is connected to the Ao pin of the
Arduino board. Note that, an analogue output pin is used and the digital output pin of the sensor
is left. The GND pin of the MQ3 sensor is connected to the GND pin of the Arduino. Calibrate
the sensor and set the threshold value by using an in-built potentiometer to detect and monitor
alcohol concentration. Similar to the above way MQ3 Alcohol sensor can also be interfaced
with the other microcontroller.

Upload the below Arduino code in Arduino IDE to observe the analogue output of the
sensor.To upload the Arduino code, select the Arduino board from the tools board and COM port,
to which the Arduino is connected from the tools.

3.4.3 Where to Use/Applications:

The applications of the MQ3 alcohol sensor are given below,

 Used as a gas level over-limit alarm.


 Portable alcohol detector.
 Breathalyzer.
 Stand-alone sensing module.
 Used in environmental monitoring equipment.
 Vehicle alcohol detector.
Please refer to this link for MQ3 Alcohol Sensor Datasheet.

Thus, this is all about an overview of the MQ3 alcohol gas sensor. It is used to detect/monitor
different alcohol gas concentrations in the air. The different MQ series alcohol gas sensors are
available in the market today. Choose the right one for the application.

3.5 LCD: Liquid Crystal Display


3.5.1 16 * 2 Alphanumeric LCD

MINI PROJECT 28 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

Description:

Liquid crystal display is very important device in embedded system. It offers high flexibility
to user as he can display the required data on it. A liquid crystal display (LCD) is a thin, flat
electronic visual display that uses the light modulating properties of liquid crystals (LCs). LCs do
not emit light directly.

LCDs therefore need a light source and are classified as "passive" displays. Here the lcd
has different memories to display data, those are discussed below.

3.5.2 Block Diagram

Fig 3.18: block Diagram of 16 * 2 Alphanumeric LCD

16 x 2 Alphanumeric LCD Module Features

 Intelligent, with built-in Hitachi HD44780 compatible LCD controller and RAM providing
simple interfacing

 61 x 15.8 mm viewing area

 5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line

 Can display 224 different symbols

 Low power consumption (1 mA typical)

MINI PROJECT 29 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

 Powerful command set and user-produced characters

 TTL and CMOS compatible

 Connector for standard 0.1-pitch pin headers.

Fig 4.19 LCD diagram

3.5.3 Specifications

Table 4 2 Specifications of LCD

MINI PROJECT 30 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

3.6 GSM MODULE: Global System for Mobile Communication


(GSM)
Definition:
GSM, which stands for Global System for Mobile communications, reigns (important) as the
world’s most widely used cell phone technology. Cell phones use a cell phone service carrier’s
GSM network by searching for cell phone towers in the nearby area. Global system for mobile
communication (GSM) is a globally accepted standard for digital cellular communication.

GSM is the name of a standardization group established in 1982 to create a common


European mobile telephone standard that would formulate specifications for a pan-European
mobile cellular radio system operating at 900 MHz. It is estimated that many countries outside of
Europe will join the GSM partnership.

Fig 4.15 GSM module

MINI PROJECT 31 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

3.6.1 MODEM SPECIFICATIONS:


The SIM300 is a complete Tri-band GSM solution in a compact plug-in module.

Featuring an industry-standard interface, the SIM300 delivers GSM/GPRS900/1800/1900Mhz


performance for voice, SMS, data and Fax in a small form factor and with low power
consumption.

The leading features of SIM300 make it deal fir virtually unlimited application, such as
WLL applications (Fixed Cellular Terminal), M2M application, handheld devices and much
more.

Tri-band GSM/GPRS module with a size of 40x33x2.85

1. Customized MMI and keypad/LCD support

2. An embedded powerful TCP/IP protocol stack

3. Based upon mature and field proven platform, backed up by our support service, from
definition to design and production.

3.6.2 General Features:


 Tri-band GSM/GPRS900/1800/1900Mhz

 GPRS multi-slot class 10

 GPRS mobile station class –B

 Complaint to GSM phase 2/2+

i. -class 4(2W @900MHz)

ii. -class 1(1W @/18001900MHz)

 Dimensions: 40x33x2.85 mm

 Weight: 8gm

 Control via AT commands

 (GSM 07.07, 07.05 and SIMCOM enhanced AT commands)

 SIM application tool kit

MINI PROJECT 32 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

3.6.3 GSM – Architecture:

 A GSM network consists of several functional entities whose functions and interfaces are
defined.
 The GSM network can be divided into following broad parts.

 The Mobile Station (MS)

 The Base Station Subsystem (BSS)

 The Network Switching Subsystem (NSS)

 The Operation Support Subsystem (OSS)

Following fig shows the simple architecture diagram of GSM Network.

Fig 4.16: GSM Network.

The added components of the GSM architecture include the functions of the databases and
messaging systems:

 Home Location Register (HLR)

 Visitor Location Register (VLR)

 Equipment Identity Register (EIR)

 Authentication Center (AUC)

MINI PROJECT 33 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

 SMS Serving Center (SMS SC)

 Gateway MSC (GMSC)

 Chargeback Center (CBC)

 Trans coder and Adaptation Unit (TRAU)

Following fig shows the diagram of GSM Network along with added elements.

Fig 4.17: GSM Network along with added elements

3.7 GPS MODULE: Global Positioning System


The GPS is a satellite based navigation system. It provides time and location based
information to a

GPS receiver, located anywhere on or near the earth’s surface. GPS works in all weather
conditions. The satellite system consists of a constellation of 24 satellite in six earth-centered
orbital planes, each with four satellites, orbiting at 13,000 miles (20,000 km) above earth and
travelling at a speed of 8,700 mph (14,000 km/h).

While we only need three satellite to produce a location on earth’s surface, a forth
satellite is often used to validate the information from the other three. The GPS modules have
become small over the years. these modules have tiny processors and antenna that receive data
sent by the satellites and compute your position and time.

MINI PROJECT 34 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

Fig 4.20 GPS module

3.7.1 Working of GPS:


GPS works through a technique called trilateration. Trilateration is the process of
determining your position based on the intersection of spheres. When a receiver receives a signal
from one of the satellites, it calculates its distance from the satellite considering a 3-D sphere
with the satellite located at the center of the sphere.

Once the receiver does the same with 3 other GPS satellites, the receiver then proceeds
to find the intersection point of the 3 spheres to calculate it's location.

Used to calculate location, velocity, and elevation, trilateration collects signals from satellites to
output location information.

Fig 4.21 locatio


tracking

The GPS module receives a timestamp from each of the visible satellites, along with data on
where in the sky each one is located (among other pieces of data). From this information, the
GPS receiver now knows the distance to each satellite in view. If the GPS receiver's antenna can
see at least 4 satellites, it can accurately calculate its position and time.

MINI PROJECT 35 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

A single satellite broadcasts a microwave signal which is picked up by a GPS device and used to
calculate the distance from the GPS device to the satellite. Since a GPS device only gives
information about the distance from a satellite, a single satellite cannot provide much location
information. Satellites do not give off information about angles, so the location of a GPS device
could be anywhere on a sphere's surface area.

3.7.2 Applications of GPS:


GPS is a powerful and dependable tool for businesses and organizations in many
different industries. Surveyors, scientists, pilots, boat captains, first responders, and workers in
mining and agriculture, are just some of the people who use GPS on a daily basis for work.

They use GPS information for preparing accurate surveys and maps, taking precise time
measurements, tracking position or location, and for navigation. GPS works at all times and in

almost all weather conditions.

These are the main uses of GPS:

1. Location - Determining a position.

2. Navigation - Getting from one location to another.


3. Tracking - Monitoring object or personal movement.

4. Mapping - Creating maps of the world.

3.7.3 Pins of GPS module:

Fig 4.22 GPS Pin configuration

 Power Pins
VCC (or VIN): Power input (3.3V or 5V depending on the module).

MINI PROJECT 36 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

GND: Ground pin.

 Communication Pins

TX (Transmitter): Outputs data from the GPS module (connect to RX of the microcontroller).

RX (Receiver): Accepts data for configuration (connect to TX of the microcontroller).

 Optional Pins

EN (Enable): Turns the module on or off.

RST (Reset): Resets the module to its initial state.

PPS (Pulse Per Second): Outputs a precise 1 Hz signal for timing applications.

VBAT (Backup Battery): Keeps the internal RTC running to enable a "hot start."

 Antenna Pins

ANT: For connecting an external active/passive antenna.

GND: Ground connection for the antenna.

3.7.4 Specifications of GPS

 Electrical Characteristics

1. Input Voltage: 3.3V or 5V (check module datasheet).

2. Communication Protocol: UART (default), I2C or SPI for advanced modules.

3. Data Baud Rate: Usually configurable, with a default of 9600 bps.

3.8 RELAY

A relay is an electrically operated switch. It consists of a set of input terminals for a single or
multiple control signals, and a set of operating contact terminals. The switch may have any
number of contacts in multiple contact forms, such as make contacts, break contacts, or such
combinations thereof.

Relays are used where it is necessary to control a circuit by an independent low-power


signal, or where several circuits must be controlled by one signal. Relays were first used in long-
distance telegraph circuits as signal repeaters: they refresh the signal coming in from one circuit

MINI PROJECT 37 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

by transmitting it on another circuit. Relays were used extensively in telephone exchanges and
early computers to perform logical operations.

3.8.1 Types
Coaxial relay

Where radio transmitters and receivers share one antenna, often a coaxial relay is used
as a TR (transmit-receive) relay, which switches the antenna from the receiver to the transmitter.
This protects the receiver from the high power of the transmitter. Such relays are often used
in transceivers which combine transmitter and receiver in one unit. The relay contacts are
designed not to reflect any radio frequency power back toward the source, and to provide very
high isolation between receiver and transmitter terminals. The characteristic impedance of the
relay is matched to the transmission line impedance of the system, for example, 50 ohms.

Overload protection relay


Electric motors need overcurrent protection to prevent damage from over-loading the
motor, or to protect against short circuits in connecting cables or internal faults in the motor
windings. The overload sensing devices are a form of heat operated relay where a coil heats
a bimetallic strip, or where a solder pot melts, to operate auxiliary contacts. These auxiliary
contacts are in series with the motor's contactor coil, so they turn off the motor when it overheats.

Solid-state relay

A solid-state relay (SSR) is a solid state electronic component that provides a function similar to
an electromechanical relay but does not have any moving components, increasing long-term
reliability. A solid-state relay uses a thyristor, TRIAC or other solid-state switching device,
activated by the control signal, to switch the controlled load, instead of a solenoid.

MINI PROJECT 38 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

An optocoupler (a light-emitting diode (LED) coupled with a photo transistor) can be used to
isolate control and controlled circuits.[26]

Static relay

A static relay consists of electronic circuitry to emulate all those characteristics which are
achieved by moving parts in an electro-magnetic relay.

Vacuum relays

A vacuum relay is a sensitive relay having its contacts mounted in an evacuated glass
housing, to permit handling radio-frequency voltages [clarification needed] as high as 20,000
volts without flashover between contacts even though contact spacing is as low as a few
hundredths of an inch when open.

3.8.2 Applications

A DPDT AC coil relay with "ice cube" packaging

Relays are used wherever it is necessary to control a high power or high voltage circuit
with a low power circuit, especially when galvanic isolation is desirable. The first application of
relays was in long telegraph lines, whereas the weak signal received at an intermediate station
could control a contact, regenerating the signal for further transmission. High-voltage or high-
current devices can be controlled with small, low voltage wiring and pilots switches. Operators
can be isolated from the high voltage circuit. Low power devices such as microprocessors can
drive relays to control electrical loads beyond their direct drive capability. In an automobile, a

MINI PROJECT 39 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

starter relay allows the high current of the cranking motor to be controlled with small wiring and
contacts in the ignition key.

3.9 DC MOTOR
A DC motor, or direct current motor, is an electrical machine that converts electrical
energy into mechanical energy through the creation of a magnetic field powered by direct current.
When a DC motor is energized, it generates a magnetic field in its stator. This magnetic field
interacts with magnets on the rotor, causing it to rotate. To ensure continuous rotation of the
rotor, the commutator, connected to brushes that are linked to the power source, supplies current
to the motor’s wire windings.

DC motors are often preferred over other types of motors due to their precise speed
control, which is crucial for industrial machinery. They can start, stop, and reverse instantly,
providing essential control over the operation of production equipment.

3.9.1 What are the different types of DC motors?

In order to appreciate the benefits of DC motors, it is important to understand the various types.
Each type of DC motor has beneficial characteristics that must be examined before purchase and
use. Two of the main advantages of DC motors over alternating current (AC) motors are how
easy they are to install and that they require little maintenance.

DC motors are classified based on the connection between the field winding and the
armature. The field winding may be connected in parallel with the armature, in series with it, or
in some cases, a combination of both parallel and series connections.

1. Brushed DC Motor

In a brush DC motor, the magnetic field is created by the current flowing through a commutator
and brushes connected to the rotor. The brushes, typically made of carbon, can be either
separately excited or self-excited. The stator houses the motor's components and generates the
magnetic field. The rotor's coil winding can be configured in series or parallel, resulting in either
a series-wound or shunt-wound DC motor.

The commutator acts as an electrical switch, reversing the current between the rotor and
the external power source. This mechanism applies electrical current to the windings, producing

MINI PROJECT 40 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

consistent rotational torque by alternating the current direction. The commutator sections are
linked to the rotor windings through contact bars embedded in the motor's shaft.

There are three main types of DC motors: separately excited, self excited, or permanent
magnet. In the separately excited and self excited, an electromagnet is used in the stator structure.
With the permanent magnet type, a powerful magnet generates the magnetic field.

2. Brushless DC Motor (BLDC)

Brushless DC motors (BLDC motors) are a type of permanent magnet synchronous motor that
operates on direct current with an electronically controlled commutation system. This system
produces rotational torque by sequentially changing the phase currents. BLDC motors are
sometimes referred to as trapezoidal permanent magnet motors.

Unlike brushed DC motors, which rely on mechanical contact with the rotor, BLDC
motors use electronic commutation. In a BLDC motor, the rotor is made of permanent magnets,
while the stator contains a series of coils. The rotor rotates as the stator's current-carrying
conductors remain fixed in position.

The armature coils in a BLDC motor are electronically switched by transistors based on
the rotor's position, which is detected by Hall sensors mounted on the stator. This feedback
mechanism ensures the correct timing for switching the current in the armature, resulting in rotor
rotation.

MINI PROJECT 41 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

The absence of brushes in BLDC motors enhances their reliability and reduces noise, with
efficiency ratings between 85 and 90 percent. The design eliminates brush wear and minimizes
heat production, as the rotating magnet generates very little heat.

3.9.2 How DC Motors Work?

A DC motor operates on the principle that when a current-carrying conductor is placed within a
magnetic field, it generates mechanical force. The direction of this force is determined using the
left-hand rule. DC motors and DC generators have similar constructions and can be used
interchangeably.

In large electrical applications, such as steel mills and electric trains, alternating current
(AC) is often converted to DC because DC motors offer superior speed and torque characteristics
compared to AC motors. For industrial uses, DC motors are as commonly employed as three-
phase induction motors.

3.9.3 What are the advantages of using DC motors?

There is an ever growing demand for DC motors, especially 12 V and 24 V models. The
expanding market of solar, marine, and truck mounted equipment have come to depend on DC
motor technology as an exceptionally cost effective solution. Though DC motor technology is
older than AC motor technology, DC motor manufacturers are constantly developing and
engineering methods to reduce motor maintenance and extend motor life.
DC motors come in various types, each adaptable to a range of applications. To ensure
optimal performance, it's crucial to conduct thorough research and select the DC motor best
suited to handle the specific workload.
MINI PROJECT 42 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

Startup Torque

DC motors are renowned for their high startup torque. They are well-suited for
applications requiring constant and consistent speed with variable torque.

Linear Speed Torque

The relationship between torque and speed, known as the torque-speed curve, reveals
how quickly a motor can spin and how much torque it can produce. DC motors exhibit an
exceptional, more linear speed-torque curve compared to other motor types.

No Harmonic Effects

Harmonic effects can degrade a power system's performance, posing safety risks and
potentially damaging equipment. DC motors operate without these issues, ensuring reliable
performance without the complications of harmonic distortion.

Speed Control

DC motors are valued for their precise speed control. This capability is critical for heavy
load systems and is why DC motors are commonly used in applications like paper and rolling
mills, where consistent speed is essential.

Installation

DC motors are straightforward to install, requiring fewer electronic adjustments and


rectifications in the power system. They can be quickly put into operation by connecting them
directly to the power source.

Maintenance

The simple design of DC motors makes them easy to repair and replace. With over 130
years of use, these motors are well-known to technicians and electricians, which helps keep
repair costs low. Their long history means that diagnosing and fixing issues is straightforward.

When servicing a DC motor, there is no need for field excitation. Components such as brushes
and speed settings are easily replaceable. For issues with the control system, the terminal voltage
can be adjusted using a potentiometer.

MINI PROJECT 43 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Low Cost

Cost is a significant factor when choosing DC motors. DC motors are generally less
expensive than AC motors, though brushless and permanent magnet DC motors come at a higher
cost. However, the extended lifespan of brushless motors often justifies the higher initial
investment. On the other hand, while brushed DC motors are more affordable, they have a
shorter lifespan and require more frequent repairs. Fortunately, the cost of repairing brushed
motors is relatively low, which can offset their shorter operational life.

3.10 BUZZER
Buzzer meaning electronic component that generates sound through the transmission of
electrical signals. Its primary function is to provide an audible alert or notification and
typically operates within a voltage range of 5V to 12V. There are various types of these
modules that differ in their sound generation mechanisms, operating principles, and
applications.

3.10.1 How it Works?

Here's how a typical buzzer works:

 Power Source: The buzzer requires a power source to operate, typically a direct current
(DC) supply.

 Electromagnetic Coil: Inside the buzzer, there is an electromagnetic coil. When


electricity is supplied, the coil becomes magnetized.

 Metal Diaphragm: Adjacent to the coil, there's a metal diaphragm. This diaphragm is
usually made from a ferromagnetic material, which means it's attracted to magnets.

 Operation Mechanism: When the current flows through the coil, it creates a magnetic
field. This magnetic field causes the metal diaphragm to be attracted towards the coil,
moving away from its original position.

MINI PROJECT 44 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

 Sound Production: As the diaphragm moves, it compresses and rarefies the air in front
of it, creating sound waves. The rapid movement back and forth of the diaphragm
produces the buzzing sound we hear.

 Oscillation: In some buzzers, particularly piezoelectric types, the electric current causes
the piezoelectric material (usually a ceramic disc) to bend back and forth. This bending
motion creates the sound. The frequency of the current determines the frequency of the
sound, and thus its pitch.

 Volume Control: The volume of the sound can often be controlled by the amount of
current supplied to the buzzer. Higher currents produce a louder sound.

Buzzer Circuit Diagram

3.10.2 Buzzer Types

1. Passive Buzzer: This type of module generates sound through the vibration of a
rotating magnetic field within a coil. It requires an external driver circuit and does not
produce sound directly.
MINI PROJECT 45 DEPT OF ECE AITH
HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

2. Active Buzzer: They have an integrated driver circuit and can operate directly with a
sound signal. They are often more user-friendly due to the built-in driver circuit.
3. Piezo Buzzer:They produce sound by applying voltage changes to a piezoelectric
crystal. They are widely used due to their small size and low power consumption.
4. Electromechanical Buzzer: They produce sound using the magnetic field of an
electromagnet instead of the vibration of a coil. They can produce larger and more
powerful sounds.
5. Sirens:Sirens are a specialized type of it used in emergency or fire alarm systems.
They can generate very high sound levels and are powerful enough to be heard from a
distance.

These types are selected based on diverse application requirements, with sound level, power
consumption, size, and other factors serving as crucial criteria that influence the buzzer type
chosen.

3.10.3 Buzzer Application Areas

1. Alarm Systems: They can be utilized to provide audible alarms in burglar alarm
systems or fire alarm systems.
2. Clock and Timer Alarms: A clock or timer project created with Arduino
or Raspberry Pi can incorporate it to sound an alarm at a specific time.
3. Music and Melody Playback: Their sounds can be utilized for simple music and
melody playback projects, with the ability to program specific notes or music.
4. Automation and Control Systems:They can be integrated into automation projects or
to indicate when specific events occur. For instance, they can be utilized to provide an
audible alert when a door is opened.
5. Education and Learning Projects:They are exceptional components for individuals
seeking to learn fundamental electronics and coding concepts. They can aid students in
comprehending topics such as basic music theory and frequency control.

MINI PROJECT 46 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

CHAPTER-4

SOFTWARE EXPLANATION

4.1 : Introduction

This project is implemented using following software’s:

 Express PCB – for designing circuit

 Arduino IDE compiler - for compilation part

 Proteus 7 (Embedded C) – for simulation part

4.2 : The Interface

When a project is first started you will be greeted with a yellow outline. This
yellow outline is the dimension of the PCB. Typically after positioning of parts and traces,
move them to their final position and then crop the PCB to the correct size. However, in
designing a board with a certain size constraint, crop the PCB to the correct size before starting.

Fig: 4.1 show the toolbar in which the each button has the following functions:

Fig: 4.2 Tool bar necessary for the interface

The select tool: It is fairly obvious what this does. It allows you to move and manipulate
parts. When this tool is selected the top toolbar will show buttons to move traces to the top /
bottom copper layer, and rotate buttons.
MINI PROJECT 47 DEPT OF ECE AITH
HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

The zoom to selection tool: does just that.

The place pad: button allows you to place small soldier pads which are useful for board
connections or if a part is not in the part library but the part dimensions are available. When
this tool is selected the top toolbar will give you a large selection of round holes, square holes
and surface mount pads

The place component: tool allows you to select a component from the top toolbar and then by
clicking in the workspace places that component in the orientation chosen using the buttons
next to the component list. The components can always be rotated afterwards with the select
tool if the orientation is wrong.

The place trace: tool allows you to place a solid trace on the board of varying thicknesses. The
top toolbar allows you to select the top or bottom layer to place the trace on.

The Insert Corner in trace: button does exactly what it says. When this tool is selected,
clicking on a trace will insert a corner which can be moved to route around components and
other traces.

4.3 : Design Considerations

Before starting a project there are several ways to design a PCB and one must be chosen to suit
the project’s needs. Single sided, or double sided?

When making a PCB you have the option of making a single sided board, or a double
sided board. Single sided boards are cheaper to produce and easier to etch, but much harder to
design for large projects. If a lot of parts are being used in a small space it may be difficult to
make a single sided board without jumpering over traces with a cable. While there’s technically
nothing wrong with this, it should be avoided if the signal travelling over the traces is sensitive
(e.g. audio signals).

A double sided board is more expensive to produce professionally, more difficult to


etch on a DIY board, but makes the layout of components a lot smaller and easier. It should be
noted that if a trace is running on the top layer, check with the components to make sure you
can get to its pins with a soldering iron. Large capacitors, relays, and similar parts which don’t
have axial leads can NOT have traces on top unless boards are plated professionally.

MINI PROJECT 48 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

4.4 ARDUINO COMPILING

MINI PROJECT 49 DEPT OF ECE AITH


HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Launch Arduino by double click “Arduino” below

1. One example

MINI PROJECT 50 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSYTEM USING GPS AND GSM

2. Select the target board as “Arduino Uno”:

MINI PROJECT 51 DEPT OF ECE AITH HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

3. Click Sketch-> Verify/Compile:

MINI PROJECT 52 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER- 5

PROGRAMMING OF DEVICE

Source code of the project/device:

#include <LiquidCrystal.h>
#include <stdio.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(8, 9);
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
// defines pins numbers
//New GPS GY-GPS6MV2
int ir = 4;
int relay = 2;
int alc = 3;
int buzzer = 7;
char cntt=0;
char pd=0,pwd[5];
unsigned char rcv,count,gchr='x',gchr1='x',robos='s';
char rcvmsg[10],pastnumber[11];
//char pastnumber1[11],pastnumber2[11];//pastnumber3[11];
char gpsval[50];
// char dataread[100] = "";
// char lt[15],ln[15];
int i=0,k=0,lop=0;

MINI PROJECT 53 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

int gps_status=0;
float latitude=0;
float logitude=0;
String Speed="";
String gpsString="";
char *test="$GPRMC";
//int hbtc=0,hbtc1=0,rtrl=0;
unsigned char gv=0,msg1[10],msg2[11];
float lati=0,longi=0;
unsigned int lati1=0,longi1=0;
unsigned char flat[5],flong[5];
unsigned char finallat[10]="17.3076\0",finallong[10]="078.7366\0";
//17.3544,78.5935
int ii=0,rchkr=0;
float tempc=0,weight=0;
float vout=0;
String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
void okcheck()
{
unsigned char rcr;
do{
rcr = Serial.read();
}while(rcr != 'K');
}
//17.6050421,78.4834139
//https://www.google.co.in/search?client=opera&q=17.6050421%2C78.4834139

MINI PROJECT 54 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

void send_link()
{
Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(2500);
Serial.write("https://www.google.co.in/search?client=opera&q=");
for(ii=0;ii<=6;ii++){Serial.write(finallat[ii]);}
Serial.write("%2C");
for(ii=0;ii<=7;ii++){Serial.write(finallong[ii]);}
Serial.write(0x1A);delay(4000);delay(4000);
}
void beep()
{
digitalWrite(buzzer,LOW);delay(1000);delay(1000);digitalWrite(buzzer,HIGH);
}
void setup()
{
// unsigned char rcr;
Serial.begin(9600);//serialEvent();
mySerial.begin(9600);
pinMode(relay, OUTPUT);
pinMode(ir, INPUT);
pinMode(alc, INPUT);
pinMode(buzzer, OUTPUT);
digitalWrite(relay, HIGH);
digitalWrite(buzzer, HIGH);
lcd.begin(16, 2);lcd.cursor();

MINI PROJECT 55 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

lcd.print("Vehicle Accident");
lcd.setCursor(0,1);
lcd.print("Detection system");
delay(2000);
//get_gps();
//gps_convert();
lcd.clear();
lcd.setCursor(0,0);
for(ii=0;ii<=6;ii++) lcd.write(finallat[ii]);
lcd.setCursor(0,1);
for(ii=0;ii<=7;ii++) lcd.write(finallong[ii]);
delay(1500);
gsminit();
delay(1500);
lcd.clear();
}
void loop()
{
if(digitalRead(ir) == HIGH)
{
lcd.setCursor(0,0);lcd.print("No Accident ");
digitalWrite(relay, LOW);
}
if(digitalRead(ir) == LOW)
{
lcd.setCursor(0,0);lcd.print("Accident ");
beep();

MINI PROJECT 56 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

digitalWrite(relay, HIGH);
delay(5000);delay(5000);
Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(2500);
Serial.write("Accident@ ");
Serial.write("https://www.google.co.in/search?client=opera&q=");
for(ii=0;ii<=6;ii++){Serial.write(finallat[ii]);}
Serial.write("%2C");
for(ii=0;ii<=7;ii++){Serial.write(finallong[ii]);}
Serial.write(0x1A); delay(4000); delay(4000);
}
if(digitalRead(alc) == HIGH)
{
lcd.setCursor(0,1);lcd.print("No Alcohol ");
digitalWrite(relay, LOW);
}
if(digitalRead(alc) == LOW)
{
lcd.clear();
lcd.setCursor(0,1);lcd.print("Alcohol on ");
beep();
digitalWrite(relay, HIGH);
delay(5000);delay(5000);
Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(2500);

MINI PROJECT 57 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Serial.write("Alcohol detected@ ");


Serial.write("https://www.google.co.in/search?client=opera&q=");
for(ii=0;ii<=6;ii++){Serial.write(finallat[ii]);}
Serial.write("%2C");
for(ii=0;ii<=7;ii++){Serial.write(finallong[ii]);}
Serial.write(0x1A); delay(4000); delay(4000);
}
lcd.clear();
}
void serialEvent()
{
while (Serial.available())
{
char inChar = (char)Serial.read();
if(inChar == '*')
{
// gchr = Serial.read();
gchr = 's';
}
}
}
/*
void serialEvent()
{
while (Serial.available())
{
char inChar = (char)Serial.read();

MINI PROJECT 58 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

if(inChar == '*')
{
gchr = Serial.read();
}
if(inChar == '#')
{
gchr1 = Serial.read();
}
}
}*/
int readSerial(char result[])
{
int i = 0;
while (1)
{
while (Serial.available() > 0)
{
char inChar = Serial.read();
if (inChar == '\n')
{
result[i] = '\0';
Serial.flush();
return 0;
}
if (inChar != '\r')
{
result[i] = inChar;

MINI PROJECT 59 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

i++;
}
}
}
}
int readSerial1(char result[])
{
int i = 0;
while (1)
{
while (Serial.available() > 0)
{
char inChar = Serial.read();
if (inChar == '*')
{
result[i] = '\0';
Serial.flush();
return 0;
}
if (inChar != '*')
{
result[i] = inChar;
i++;
}
}
}
}

MINI PROJECT 60 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

void gpsEvent()
{
gpsString="";
while(1)
{
//while (gps.available()>0) //Serial incoming data from GPS

while (mySerial.available() > 0)


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

MINI PROJECT 61 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

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

MINI PROJECT 62 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

}
}
void coordinate2dec()
{
String lat_degree="";
for(i=17;i<=18;i++)
lat_degree+=gpsString[i];
String lat_minut="";
for(i=18;i<=19;i++)
lat_minut+=gpsString[i];
for(i=21;i<=22;i++)
lat_minut+=gpsString[i];
String log_degree="";
for(i=29;i<=31;i++)
log_degree+=gpsString[i];
String log_minut="";
for(i=32;i<=33;i++)
log_minut+=gpsString[i];
for(i=35;i<=36;i++)
log_minut+=gpsString[i];
Speed="";
for(i=42;i<45;i++) //extract longitude from string
Speed+=gpsString[i];
float minut= lat_minut.toFloat();
minut=minut/60;
float degree=lat_degree.toFloat();
latitude=degree+minut;

MINI PROJECT 63 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

minut= log_minut.toFloat();
minut=minut/60;
degree=log_degree.toFloat();
logitude=degree+minut;
}
/*
void coordinate2dec()
{
String lat_degree="";
for(i=19;i<=20;i++)
lat_degree+=gpsString[i];
String lat_minut="";
for(i=21;i<=22;i++)
lat_minut+=gpsString[i];
for(i=24;i<=25;i++)
lat_minut+=gpsString[i];
String log_degree="";
for(i=32;i<=34;i++)
log_degree+=gpsString[i];
String log_minut="";
for(i=35;i<=36;i++)
log_minut+=gpsString[i];
for(i=38;i<=39;i++)
log_minut+=gpsString[i];
Speed="";
for(i=45;i<48;i++) //extract longitude from string
Speed+=gpsString[i];

MINI PROJECT 64 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

float minut= lat_minut.toFloat();


minut=minut/60;
float degree=lat_degree.toFloat();
latitude=degree+minut;
minut= log_minut.toFloat();
minut=minut/60;
degree=log_degree.toFloat();
logitude=degree+minut;
}
*/
void gps_convert()
{
if(gps_status)
{
Serial.println(gpsString);
if(gpsString[0] == '$' && gpsString[1] == 'G' && gpsString[2] == 'P' && gpsString[3] == 'R' &&
gpsString[4] == 'M' && gpsString[5] == 'C')
{
// Serial.println("Don11111111111111111111111111111111111111111111111111111\r\n");
//
Serial.write(gpsString[18]);Serial.write(gpsString[19]);Serial.write(gpsString[20]);Serial.write(gpsS
tring[21]);Serial.write(gpsString[22]);
//lcd.setCursor(0,0);
for(ii=0;ii<9;ii++)
{
//lcd.write(gpsString[19+ii]);
msg1[ii] = gpsString[19+ii];
//Serial.write(msg1[ii]);
}
MINI PROJECT 65 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

//Serial.println("\r\n");
//lcd.setCursor(0,1);
for(ii=0;ii<10;ii++)
{
//lcd.write(gpsString[32+ii]);
msg2[ii] = gpsString[32+ii];
// Serial.write(msg2[ii]);
}
// Serial.println(msg1);
// Serial.println(msg2);
//lati = (((msg1[2]-48)*100000) +((msg1[3]-48)*10000) + ((msg1[5]-48)*1000) + ((msg1[6]-
48)*100) + ((msg1[7]-48)*10) + (msg1[8]-48));
//longi = (((msg2[3]-48)*100000) + ((msg2[4]-48)*10000) + ((msg2[6]-48)*1000) + ((msg2[7]-
48)*100) + ((msg2[8]-48)*10) + (msg2[9]-48));
lati = (((msg1[2]-48)*1000) + ((msg1[3]-48)*100) + ((msg1[5]-48)*10) + (msg1[6]-48));
longi = (((msg2[3]-48)*1000) + ((msg2[4]-48)*100) + ((msg2[6]-48)*10) + (msg2[7]-48));
// converts(lati);Serial.write("-");
// converts(longi);Serial.write("\r\n");
lati = (lati/60); longi = (longi/60);
lati = (lati*100); longi = (longi*100);
lati1 = lati; longi1 = longi;
// Serial.write("After ");
// converts(lati1);Serial.write("-");
// converts(longi1);Serial.write("\r\n");
convlat(lati); convlong(longi);
finallat[0] = msg1[0];
finallat[1] = msg1[1];
finallat[2] = '.';

MINI PROJECT 66 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

finallat[3] = flat[0]; finallat[4] = flat[1];finallat[5] = flat[2];finallat[6] = flat[3];finallat[7] = '\0';


finallong[0] = msg2[0];
finallong[1] = msg2[1];
finallong[2] = msg2[2];
finallong[3] = '.';
finallong[4] = flong[0];finallong[5] = flong[1];finallong[6] = flong[2];finallong[7] =
flong[3];finallong[8] = '\0';
}
}
}
void convlat(unsigned int value)
{
unsigned int a,b,c,d,e,f,g,h;
a=value/10000;
b=value%10000;
c=b/1000;
d=b%1000;
e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;
c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
// dlcd(a);
// dlcd(c);dlcd(e); dlcd(g);dlcd(h);//lcddata('A');//lcddata(' ');lcddata(' ');
MINI PROJECT 67 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

flat[0] = c;
flat[1] = e;
flat[2] = g;
flat[3] = h;
}
void convlong(unsigned int value)
{
unsigned int a,b,c,d,e,f,g,h;
a=value/10000;
b=value%10000;
c=b/1000;
d=b%1000;
e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;
c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
// dlcd(a);
// dlcd(c);dlcd(e); dlcd(g);dlcd(h);//lcddata('A');//lcddata(' ');lcddata(' ');
flong[0] = c;
flong[1] = e;
flong[2] = g;
flong[3] = h;

MINI PROJECT 68 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

}
/*
void coordinate2dec()
{
String lat_degree="";
for(i=20;i<=21;i++)
lat_degree+=gpsString[i];
String lat_minut="";
for(i=22;i<=28;i++)
lat_minut+=gpsString[i];
String log_degree="";
for(i=32;i<=34;i++)
log_degree+=gpsString[i];
String log_minut="";
for(i=35;i<=41;i++)
log_minut+=gpsString[i];
Speed="";
for(i=45;i<48;i++) //extract longitude from string
Speed+=gpsString[i];
float minut= lat_minut.toFloat();
minut=minut/60;
float degree=lat_degree.toFloat();
latitude=degree+minut;

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

MINI PROJECT 69 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

logitude=degree+minut;
}*/
void gsminit()
{
Serial.write("AT\r\n"); okcheck();
Serial.write("ATE0\r\n"); okcheck();
Serial.write("AT+CMGF=1\r\n"); okcheck();
Serial.write("AT+CNMI=1,2,0,0\r\n"); okcheck();
Serial.write("AT+CSMP=17,167,0,0\r\n"); okcheck();
lcd.clear();
lcd.print("SEND MSG STORE");
lcd.setCursor(0,1);
lcd.print("MOBILE NUMBER");
do{
rcv = Serial.read();
}while(rcv != '*');
readSerial(pastnumber);pastnumber[10] = '\0';
/*
pastnumber1[0] = pastnumber[0];
pastnumber1[1] = pastnumber[1];
pastnumber1[2] = pastnumber[2];
pastnumber1[3] = pastnumber[3];
pastnumber1[4] = pastnumber[4];
pastnumber1[5] = pastnumber[5];
pastnumber1[6] = pastnumber[6];
pastnumber1[7] = pastnumber[7];
pastnumber1[8] = pastnumber[8];

MINI PROJECT 70 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

pastnumber1[9] = pastnumber[9];
pastnumber1[10] = '\0';
*/
/*
pastnumber3[0] = pastnumber[20];
pastnumber3[1] = pastnumber[21];
pastnumber3[2] = pastnumber[22];
pastnumber3[3] = pastnumber[23];
pastnumber3[4] = pastnumber[24];
pastnumber3[5] = pastnumber[25];
pastnumber3[6] = pastnumber[26];
pastnumber3[7] = pastnumber[27];
pastnumber3[8] = pastnumber[28];
pastnumber3[9] = pastnumber[29];
pastnumber3[10] = '\0';
*/
lcd.clear();
lcd.print(pastnumber);
Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(3000);
Serial.write("Reg\r\n");
Serial.write(0x1A);
delay(4000); delay(4000);
}
void converts(unsigned int value)
{

MINI PROJECT 71 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

unsigned int a,b,c,d,e,f;


a=value/10000;
b=value%10000;
c=b/1000;
d=b%1000;
e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;
c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
Serial.write(a);
Serial.write(c);
Serial.write(e);
Serial.write(g);
Serial.write(h);
}
void convertl(unsigned int value)
{
unsigned int a,b,c,d,e,f,g,h;
a=value/10000;
b=value%10000;
c=b/1000;
d=b%1000;

MINI PROJECT 72 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;
c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
//lcd.write(a);
//lcd.write(c);
lcd.write(e);
lcd.write(g);
lcd.write(h);
}
void convertk(unsigned int value)
{
unsigned int a,b,c,d,e,f,g,h;
a=value/10000;
b=value%10000;
c=b/1000;
d=b%1000;
e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;

MINI PROJECT 73 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
// lcd.write(a);
// lcd.write(c);
// lcd.write(e);
// lcd.write(g);
lcd.write(h);
}
/* sensorValue = analogRead(analogInPin);
sensorValue = (sensorValue/9.31);
lcd.setCursor(1,1); //rc
lcd.print(sensorValue);
Serial.print(sensorValue);

MINI PROJECT 74 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER- 6:

ADVANTAGES AND DISADVANTAGES

Advantages:

 IOT based user-friendly interfacing.

 Low power consumption.

 Controls high and low voltage devices.

 Long life.

 Wi-Fi wireless transmission.

 Fast response.

 Efficient and low cost design.

 Low power consumption.

Disadvantages
 Status and feed back of devices is not obtained.

 Limited distance.

 Fail to access if the password is wrong.

Applications
 Smart infrastructure integration.

 Mainly used in Road safety analysis.

 Transport applications.

 Can be used to control devices.

MINI PROJECT 75 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER-7

EXPLANATION OF RESULT

Fig.5.1. Hardware kit.

Fig.5.2. Buzzer.

MINI PROJECT 76 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

Fig.5.5. Alchol detection time.

Fig.5.6. Alchol not detection time.

MINI PROJECT 77 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER-8

CONCLUSION AND FUTURE SCOPE

CONCLUSION:

This project is one of the important Sensor based project ideas. The main unit of this project is an
“Alcohol sensor”. If the person inside the car has consumed alcohol then it is alcohol detection is
done by the sensor. The sensor gives this signal to a comparator IC. The output of the comparator is
connected to the microcontroller. The microcontroller is the heart of this project. It is the CPU of the
complete circuit. Microcontroller gives a high pulse to the buzzer circuit and the buzzer is turned on.
At the same time, a relay is turned off. Due to this, the ignition of the car is deactivated. Alcohol
Detection System with Buzzer Indication project is extended by adding an ignition key at the input
and DC motor at the output. The input Ignition key is given to the microcontroller. It is used to find
out that the car is started. Whenever a key is inserted into the ignition lock at that time the alcohol
detection process is started.

FUTURE SCOPE:

 More sensors

Adding more sensors, such as infrared sensors, cameras, and microphone arrays, can improve
situational awareness and gather more data about the accident.

 Wearable technologies

Using wearable technologies like smart watches and health trackers can help detect accidents
involving pedestrians or cyclists.

 Big data analytics


Using big data analytics to analyze accident data can help identify patterns and trends to
develop more effective accident prevention strategies.

MINI PROJECT 78 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER-9

BIBLIOGRAPHY

REFERENCE :

[1] Andrea Z and Lorenzo V., “Internet of Things for Smart Cities,” IEEE Internet of Things Journal,
vol/issue: 1(1), Feb 2014.

[2] Isna K. and S. D. Sawant, “Integration of Cloud Computing and Internet of Things,”
International Journal of Advanced Research in Computer and Communication Engineering,
vol/issue: 5(4), Apr 2016.

[3] Sonali D. T., “Cloud Computing and Software-Based Internet of Things,” International Journal
of Advanced Research in Computer Science and Software Engineering, vol/issue: 6(4), Apr 2014.

[4] Jonathan K., “Using Active Queue Management to Assist IOT Application Flows in Home
Broad band Networks,” 2017 IEEE Internet of Things Journal, vol/issue: 4(5), Oct 2017.

[5] Pengfie Z., et al., “Secure Location of Things(SLOT) : Mitigating Local Spoofing Attacks in
Internet of Things,” IEEE Internet of Things Journal, vol. 4, Dec 2017.

[6] Akriti S., et al., “Intelligent Accident Management System using IoT and Cloud Computing,”
2nd International Conference on Next Generation Computing Technologies, Oct 2016.

[7] C. Chatrapathi and N. R. Venkatesakumar, “VANET based Integrated Framework for Smart
Accident Management System,” International Conference on Soft-Computing and Network Security,
Feb 2015.

[8] Priyal R. and Vanthana S., “Car Accident Notification System based on Internet of Things,”
International Journal of Computer Applications, vol/issue: 107(17), Dec 2014.

[9] H. M. Ali and Z. S. Alwan, “Car Accident Detection and Notification System Using
Smartphone,” International Journal of Computer Science and Mobile Computing, vol/issue: 4(4), pp.
620-635, Apr 2015.
MINI PROJECT 79 DEPT OF ECE AITS HYD
ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

MINI PROJECT 80 DEPT OF ECE AITS HYD


ACCIDENT ALERT VEHICLE TRACKING SYSTEM USING GPS AND GSM

81

You might also like