Vehicle Tracking Using IoT
Vehicle Tracking Using IoT
Vehicle Tracking Using IoT
net/publication/341192796
CITATION READS
1 45,070
1 author:
Argha Ghosh
Brainware Group of Institutions
7 PUBLICATIONS 27 CITATIONS
SEE PROFILE
All content following this page was uploaded by Argha Ghosh on 06 May 2020.
PROJECT REPORT
BATCH : II
SEMESTER : VI
YEAR : III
PONDICHERRY UNIVERSITY
(A Central University)
R.Venkataraman Nagar, Kalapet
PUDUCHERRY-605014
PONDICHERRY UNIVERSITY
(A Central University)
R.Venkataraman Nagar, Kalapet
PUDUCHERRY-605014
BONAFIDE CERTIFICATE
Certified that this is a bonafide report of project work done by ARGHA GHOSH with
register number 15352095 of M.C.A in semester VI during the academic year 2017-18.
nd
Submitted for the viva-voce examination held on 2 May, 2018 at the
Department of Computer Science, Pondicherry University
1
ACKNOWLEDGEMENT
An idea is the first step for generation & development of anything. The initial idea may have
been of any one person, but the development & improvement on it have always been a result of
hard work, help, inspiration and blessings of several different people.
I would also like to thank my project Guide R.P.SEENIVASAN, Assistant Professor,
Department of Computer Science School of Engineering Technology, Pondicherry University
who never hesitated in extending their sincere co-operation from time to time to prepare an
interesting and challenging project.
It is a pleasure acknowledgement with deep sense of gratitude the invaluable help by Dr. T.
Chithralekha, Head (i/c), Department of Computer Science, School of Engineering
& Technology, Pondicherry University for the successful completion of this project
report.
The guidance and support received from all the teaching and non-teaching staff of the
Department of Computer Science was vital for the success of the project. I am also thankful to
my family and friends for their continuous support and encouragement throughout the course. I
take this opportunity to express my gratitude to the people who have been instrumental in the
completion of this project.
Argha Ghosh
15352095
MCA-3rd Year
2
ABSTRACT
In this project we are going one step ahead with GPS and going to track a vehicle using GPS and
GSM. This Vehicle Tracking System can also be used for Accident Detection Alert System,
Soldier Tracking System and many more, by just making few changes in hardware and software.
Tracking of vehicle is a process in which we track the vehicle location in form of Latitude and
Longitude (GPS coordinates). GPS Coordinates are the value of a location. This system is very
efficient for outdoor application purpose.
This kind of Vehicle Tracking System Project is widely in tracking Cabs/Taxis, stolen vehicles,
school/colleges buses etc.
This system is basically an embedded one. Embedded stands for hardware controlled by
software. Here, the software using a Arduino controls all the hardware components. Arduino
plays an important role in the system.
Currently almost of the public having an own vehicle, theft is happening on parking and
sometimes driving insecurity places. The safe of vehicles is extremely essential for public
vehicles. Vehicle tracking and locking system installed in the vehicle, to track the place.
The place of the vehicle identified using Global Positioning system (GPS) and Global system
mobile communication (GSM). These systems constantly watch a moving Vehicle and report
the status on demand. When the theft identified, the responsible person send SMS to the
microcontroller, then microcontroller issue the control signals to stop the engine motor.
Authorized person need to send the password to controller to restart the vehicle and open the
door. This is more secured, reliable and low cost.
3
TABLE OF CONTENTS
S. No TITLE PAGE NO
CERTIFICATE
ACKNOWLEDGEMENT
ABSTRACT----------------------------------------------
1 INTRODUCTION---------------------------------
1.1 Research background
1.2 Problem statement
1.3 Objective of the study
1.4 Scope of study
1.5 Significance of the study
2 MODULES---------------------------------------------
2.1 Arduino
2.2 GPS Module
2.3 GSM Module
3 DESIGN--------------------------------------
4 SOURCE CODE------------------------------ -
5 OUTPUT--------------------------------------------------------------
6 RESULTS-------------------------------------------------
7 CONCLUSION AND FUTURE WORKS -------------
7.1 Conclusion
7.2 Future Recommendation
4
1.INTRODUCTION
6
effective and the most important advantage is that it will make the vehicle a much more safer
than its actually for the clients.
2. MODULES
Vehicle Tracking System
Tracking of vehicle is a process in which we track the vehicle location in form of Latitude
and Longitude (GPS coordinates). GPS Coordinates are the value of a location. This system
is very efficient for outdoor application purpose.
This circuit is designed for tracking the location of vehicles. Most of tracking systems are
made by using GPS. This is very simple and cheap. Tracking systems are mostly used by fleet
operators for tracking a vehicle location, routing and others. This is a very good method for
preventing our vehicles from stolen. This tracking system sends us the geographical
coordinates and by using these coordinates we can track our vehicle position on electronic
maps using internet. By using these tacking systems we can share real time information about
transportations. And also can be share real time information or position bus/taxi/cab with
passengers. Means passengers can see the real time of arriving bus/taxi/cab on Mobiles.
2.1 Arduino
Arduino is open source physical processing which is base on a microcontroller board and
an incorporated development environment for the board to be programmed. Arduino gains a
few inputs, for example, switches or sensors and control a few multiple outputs, for example,
lights, engine and others. Arduino program can run on Windows, Macintosh and Linux
operating systems (OS) opposite to most microcontrollers’ frameworks which run only on
Windows. Arduino programming is easy to learn and apply to beginners and amateurs.
Arduino is an instrument used to build a better version of a computer which can
control, interact and sense more than a normal desktop computer. It's an open-source physical
processing stage focused around a straightforward microcontroller board, and an environment
for composing programs for the board. Arduino can be utilized to create interactive items,
taking inputs from a diverse collection of switches or sensors, and controlling an assortment of
lights, engines, and other physical outputs. Arduino activities can be remaining solitary, or they
7
can be associated with programs running on your machine (e.g. Flash, Processing and
Maxmsp.) The board can be amassed by hand or bought preassembled; the open-source IDE
can be downloaded free of charge.
Focused around the Processing media programming environment, the Arduino programming
language is an execution of Wiring, a comparative physical computing platform.
The Arduino Uno is a microcontroller board based on the ATmega328. It has a 16 MHz ceramic
resonator, 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs,
8
a USB connection, a power jack, an In-Circuit Serial Programming header, and a reset button.
This board is very simple and can be easily used, everything you need to support the
microcontroller is in this board, just plug it in a computer via USB cable and power using an
AC-to-DC adapter or battery to get started. "Uno" means one in Italian and was chosen to mark
the release of Arduino Software (IDE) 1.0.
GPS stands for Global Positioning System and used to detect the Latitude and Longitude
of any location on the Earth, with exact Universal Time Co-ordinate time. This device
receives the coordinates from the satellite for each and every second, with time and date.
GPS offers great accuracy and also provides other data besides position coordinates. The
module connects to the Arduino through a 9600 bps Transistor-Transistor Logic-level
interface. Only four wires are needed to read the module's GPS data. This module
Compatible with 3.3V-5V interface. It also has an Electrically Erasable Programmable
Read-Only Memory and a Flash which is useful to save configuration data.
9
on and reset. It able to make and answer phone calls ,Sending and receiving SMS. It can send
and receive GPRS data through TCP/IP, HTTP protocol.
3. DESIGN
3.1. Project Flow
Gathering the Hardware though needed
10
3.3 Components were used
Arduino Uno R3
GPS Module NEO6MV2 NEO-6M
Thinklets™ A6 GSM GPRS Module
Power Supply (9V Batteries)
Connecting Wires(Jumper Wires)
GPS’s RX and TX pins are going respectively to the Arduino’s D2 and D3 pins.GPS’s
GND pin common to the Arduino’s GND pins and GPS’s VCC pin goes to arduino’s 5V
power source pin.
GSM’s RX and TX pins are going to Arduino’s D1 and D2 pins respectively and
GND pin of GSM Module are common to the Arduino’s GND pin.
11
3.6 Software and Technology Specification
❖ Software
• Arduino compiler version 1.8.5
• Programming Language: C
❖ Technology
• GSM
• GPS
• IoT - Internet of Things
12
4. Source Code
#include<SoftwareSerial.h>
int updates;
int failedUpdates;
int pos;
int stringplace = 0;
String timeUp;
String labels[12] {"Time: ", "Status: ", "Latitude: ", "Hemisphere: ", "Longitude: ", "Hemisphere:
", "Speed: ", "Track Angle: ", "Date: "}; /*Respective Labels for GPS data*/
/*Main() Function */
Serial.println("Vehicle Tracking");
13
stringplace = i + 1;
pos++;} //Those GPS data are in their GPS string format, not yet refine in normal form
updates++;
nmea[2] = ConvertLat();
nmea[4] = ConvertLng();
Serial.print(labels[i]);
Serial.print(nmea[i]);
Serial.println("");}
delay(300);
/* Sending SMS */
delay(2000);
Serial.print("AT+CMGS=\"");
Serial.write(0x22);
delay(2000);
Serial.print("Latitude:");
Serial.println(nmea[2]);
14
Serial.print("Longitude:");
Serial.println(nmea[4]);
Serial.print("https://www.google.co.in/maps/place/");
Serial.print(nmea[2]);
Serial.print(",");
Serial.print(nmea[4]);
delay(500);
failedUpdates++;}
stringplace = 0;
pos = 0;}
String ConvertLat() {
if (nmea[3] == "S") {
posneg = "-";}
String latfirst;
float latsecond;
if (nmea[2].substring(i, i + 1) == ".") {
15
char charVal[9];
dtostrf(latsecond, 4, 6, charVal);
for (int i = 0; i < sizeof(charVal); i++){
CalcLat += charVal[i];}
latfirst += CalcLat.substring(1);
return latfirst;}
String ConvertLng() {
if (nmea[5] == "W") {
posneg = "-";}
String lngfirst;
float lngsecond;
if (nmea[4].substring(i, i + 1) == ".") {
char charVal[9];
dtostrf(lngsecond, 4, 6, charVal);
CalcLng += charVal[i];}
lngfirst += CalcLng.substring(1);
return lngfirst;}
16
5. Output
17
6. RESULTS
This chapter discusses the results and any limitation and problems
encountered during the period of the project. Managed to
successfully apply the VEHICLE TRACKING SYSTEM USING
IoT and it was user friendly and cost effective. User friendly as in anyone can use
just a click of a URL on a smart phone screen and everything works. And it is cost
effective as in it will cost exactly as the project requires (optimum price). Figure shows
the prototype of the system.
• Designed a user friendly and a safe system to control vehicles especially aimed to
aid the elders.
18
7.2 Future Recommendations
There are some recommendations for Future works. Some of them are:
1. Better to use breadboard because without using any resistors connecting directly those
modules to arduino can goes wrong in the matter of voltage up-down.
2. Test each and every component before using them especially the relays for safety purposes.
ICSP : Abbreviated as In Circuit Serial Programming which consists of MOSI, MISO, SCK,
RESET, VCC, GND. It is either used to program USB or Microcontroller (For UNO, ATmega
328P-PU). ICSP allows the user to program the microcontroller when it is in circuits, In
Arduino UNO it allows to program ATmega328P-PU directly with AVR instructions without
using Arduino IDE.
19
SDA : Serial Data, It is the bidirectional data line that is used by I2C.
SCL : Serial Clock, It is used to indicate that data is ready on bidirectional data line that is used
by I2C.
AREF : Analog Read Reference, It is mainly used for analogReference() function calls, as
default it is not required but to use it you have to add some voltage source between 0V to 5V in
AREF Pin which will be considered as accurate reference voltage.
GND : Ground.
SCK : Serial Clock, which is used by SPI (Serial Peripheral Interface). It is clock generated by
‘Master’ which is used to clock the data to the ‘Slave’.
MOSI : Master Out Slave In, The data is transmitted from Master to Slave. (Master -> Slave)
MISO : Master In Slave Out, The data is transmitted to Master from Slave. (Slave - > Master)
SS : Slave Select, It is used to select the ‘Slave’. Make high to SS pin to deactivate & make low
to activate it.
INT1 & INT0 : These are hardware interrupts, it calls the ISR (Interrupt Service Routine)
when the pin change occurs.
TX : Transmit, It is used to transmit TTL serial data. It is also referred as ‘outwards’ since it
‘transmits’ data from Arduino to other connected peripheral device.
RX : Receive, It is used to receive TTL serial data. IT is also referred as ‘inwards’ since it
‘receives’ data from external hardware to Arduino.
Vin : Voltage In, If you’re powering your Arduino board from USB nothing is obtained from
Vin pin. But, if you’re powering the board with external supply then that supply is directly
obtained from Vin pin. However, the supply obtained at Vin pin is usually lesser by 1V than
voltage supplied to Power pin due to reverse polarity protection diode.
5V Pin : It is used to power external components connected to Arduino which needs 5V.
3.3V Pin : It is used to power external components connected to Arduino which needs 3.3V
IORef : Input Output Voltage Reference, It allows shields connected to Arduino board to
check whether the board is running at 3.3V or 5V.