Automobile Tracking System Using Gps and GSM: Jaya Ram Khatri Chhetri
Automobile Tracking System Using Gps and GSM: Jaya Ram Khatri Chhetri
Automobile Tracking System Using Gps and GSM: Jaya Ram Khatri Chhetri
Bachelor’s Thesis
Abstract
Date
Degree Programme Information Technology
An automobile tracking system is an essential tool for monitoring the vehicle. This project
mainly illustrates the development and implementation of an automobile tracking system.
The tracking system uses GPS and GSM technology for providing the data of the move-
ment of the vehicle in a real-time. The main three parts of the complete automobile track-
ing system are a GPS receiver, a microcontroller, and a GSM module.
This project covers both hardware and software development parts. Hardware develop-
ment includes all the necessary wirings with other related physical components like Ar-
duino UNO, SIM808, LCD, power connection etc. and software development covers all the
essential coding for microcontroller and GSM message command using Arduino C lan-
guage.
The tracking device provides the opportunity to remotely access the real-time data of the
vehicle's position with latitude and longitude at any point on the earth regardless of the
weather. Besides, it delivers the google map link to determine the location of the automo-
bile.
The anti-theft device is more reliable, cost-efficient, and easy-to-use. It provides security
over any unauthorized use of the vehicle.
V- Volts
I/O- Input/Output
AT- Attention
2 Objectives 2
3 Concept 2
4 Scope 7
6 Hardware Requirement 8
7 NMEA data 14
8 AT COMMANDS 14
9 GSM Technology 15
10 GPS Technology 16
11 Software Requirement 16
12 Data Stream 19
13 Implementation 20
15 LCD status 32
16 Final Testing 33
17 Results 35
18 Conclusion 35
References 37
Appendices
1 Introduction
The automobile tracking system is one of the essential devices which locates the cur-
rent position of the vehicle in real-time using GPS and GSM technology at any location
of the earth. The tracking system is an integrated combination of a GPS receiver, a mi-
crocontroller and GSM module. The GPS technology, termed as a navigation system
based on satellite communication, provides information on time, speed, and location to
the GPS receiver. It gives the position of a vehicle in terms of latitude and longitude at
any pinpoint on the earth. The device also retrieves the data of the geographic location
on Google map of a car. It hence can be adopted anywhere in the earth surface re-
gardless of time and weather condition. GSM technology transmits voice and data ser-
vices operating on a different frequency band, i.e. 850MHz, 900MHz, 1800MHz and
1900MHz [1]. It is possible to access the GPS Coordinates remotely through the mobile
network. The tracking device places into the automobile in a hidden and safe location.
Vehicle security is the most exciting and concerning topic as it always has a significant
threat and risk of theft. The priority of the automobile's protection against robbery is
more demanding all over the world as it can be traceable in a real-time into the cell
phone via the mobile network. It is highly motivated to develop a tracking system using
GPS and GSM technologies.
It provides security and acts as a safeguard to all the automobile owners. It is the most
reliable, flexible, user-friendly, and cost-efficient device. The device is easy to install.
The usage of the automobile tracking device is for both individuals and commercial
purposes. Individuals use the tracking system when their vehicle is missing or stolen.
The usage of the tracking system also varies from small scale to big scale companies.
The companies can quickly locate the cars and find whether if it has used correctly. It
avoids the risk of using autos for any personal purposes without any official notice.
2 Objectives
The objectives of the whole project are to build a GPS and GSM based vehicle tracking
system with selective hardware and software and apply it in everyday life for supervis-
ing the automobile. The following are a few more objectives of the whole project.
• To enhance the knowledge on the operation of the GPS and GSM module
• To know more about the property and functionality of the hardware chosen
3 Concept
The overall idea of the thesis project is to build the automobile tracking device, as illus-
trated in the figures below. In this type of tracking system, Global Navigation Satellite
System (GNSS) network combines with many satellites to provide data signals to a
GPS device. GPS/GSM module, LCD Display and Power supply interface with Arduino
to give a complete structure of tracking device. Arduino Uno consists of ATMEGA328P
microcontroller (MCU), which is the central processing unit as it controls all other pe-
ripheral components according to the instruction given. GPS receiver in tracking device
is the main elements since it gets the geographical Coordinates from the satellites in a
real UTC with the date, direction, and vehicle speed. GSM modem sends the location
of the vehicle in a real-time to the designated phone through a text message on-de-
mand after a microcontroller executes received information from a GPS receiver. Fig-
ure 1 is the architecture of an automobile tracking device.
3
Power Supply
SIM808
L
Arduino GPS Module
C Get GPS Coordinates
UNO
D
Connection GSM Module
Mobile
Send a message to the preferred GSM with
UTC, GPS Co-ordinates of a vehicle including a map link.
The device fetches GPS information of a vehicle as soon as the automobile owner text
message to the tracking devices. 16x2 LCD screen operating in 4-bit mode configura-
tion displays various information that retrieves from Arduino UNO during the execution
of the program. GSM module sends the GPS position of the vehicle on a real-time to
the owner of the automobile via SMS. However, If the GPS does not get any signal
from the satellite, the device sends just an empty coordinate, considers being an error.
Figure 2 illustrates the flow chart of the tracking system.
4
• System Ready
Begin
• Send the GPS time, latitute and longitude to the preferred mobile
Sendgp number via sms
s
• End of session
End
The power supply is a crucial part of any electronic component. Unregulated alternate
supply damage the whole circuits. Thus, a regulated power supply, which converts AC
to steady DC, must apply to electrical units.
Figure 3 presents a sample model of the overall concept of the regulated power supply.
Step down transformer decreases a high primary voltage 230V, 50Hz AC mains to a
secondary output of 12V, 500mA. Bridge D1 rectifies a 12V transformer output which
uses 1N4007 diodes. Then C1, the capacitor filters the output where IC 7805, which is
a three-terminal voltage regulator, regulates to generate steady 5V DC. Capacitor C2
5
filters the remains present in the regulator. R1 limits the current through the power indi-
cator, LED D2.[2]
Figure 4 shows the power supply section on the Arduino UNO. The input voltage
ranges from 7-12V from DC power jack or VIN pin and 5V from the USB connector.
12V, 1A DC adapter must use if AC power applies to Arduino to run. +5V gets as an
output as a regulated power supply.
6
Figure 5 below demonstrates the complete circuit schematic of the automobile track-
ing system. Arduino UNO, LCD 16x2 and SIM808 shield interface each other. LCD
pins RS (PIN 4), Enable (PIN 6), DB4, DB5, DB6 and DB7 wire into Arduino UNO
digital I/O pins 12, 11, 5, 4, 3 and 2, respectively. +5V and GND connect across a
10k ohm potentiometer with its wiper, links to VO pin of LCD to adjust the contrast of
the display. The display gets appropriate voltage supply via Arduino to Pins VSS
(GND) and VDD (+5V). 220ohm resistor connects through the positive terminal of
power supply and PIN 15. PIN 16 connects to GND. LED- and LED+ pins display the
backlight of LCD.
Digital I/O Pins 7 and 8 create software serial communication between Arduino and
the shield. RX and TX pins of SIM808 connects to pins D8 and D7 separately. Ar-
duino IDE's serial monitor baud rate sets at 9600 bits/second. It is essential to set the
exact baud ratel for successful software serial communication between two modules.
SIM808 shield gets power from the Arduino board. Arduino UNO receives an exter-
nal power supply of 12V.
7
SIM808
GND
Ar-
duino
LCD TX
UNO
16x2
RX
5v
4 Scope
The scope of this project is to study and construct a location tracker for an automobile
that uses the adopted GPS and GSM technology. The design of the device allows ex-
tending the knowledge on GPS and GSM technology, including SIM interface. It pro-
vides a range of information on vehicle position, speed, direction, and date in real-time
using GPS receiver. The microcontroller is another significant part to study, which
shows how the instruction in it executes with the codes. AT commands control the
GSM module.
8
Massimo Banzi and David Guartilles created and introduced Arduino in 2005 at the In-
teraction Design Institution Ivera, Italy. It was a simple, inexpensive, easy-to-connect
and reliable 8-bit microcontroller of the AVR family programmable device for interactive
art design projects. It aimed for the students as a helpful tool for fast prototyping who
lacked the knowledge of electronics and programming. David Mellis developed the Ar-
duino Software. [4, p.1] The AVR family microcontrollers possess many unique fea-
tures which are highly configurable and highly versatile.
There are many popular Arduino boards designed at Arduino.cc such as Arduino Nano,
Arduino Mini/Mini Pro, Arduino Mega, Arduino UNO etc. With the help of these popular
inexpensive Arduino boards, it is possible to build the different applicable applications,
monitoring devices, small robots, automation, performance art and many more these
days.
6 Hardware Requirement
Arduino UNO, the first series of USB Arduino board and the reference model of the Ar-
duino platform, is the most robust, used, and documented board of the whole Arduino
family [5]. It is the open-source microcontroller small board based on ATMEGA328P
microcontroller of AVR family. There are 14 digital I/O pins numbered from 0 to 13. Six
digital pins marked with a tilde (~), i.e. pins 3, 5, 6, 9,10, and 11 provide PWM output. It
also consists of the power and analogue sockets in which the analogue plugs contain
six analogue Input (A0-A5 pins). The UNO board has the USB connector which con-
nects to a computer for either supplying power, uploading the sketch, or transmitting
data. The recommended input voltage is 7-12V whereas as the operating voltage is 5V.
However, the input voltage limits to 6-20V. The frequency or clock speed is 16 mega-
hertz. A separate power connector is available in the board for external power supply.
The appropriate voltage supply to corresponding digital I/O pins reduces the risk to
9
damage hardware. The reset button of the Arduino UNO restarts the system on any
technical issue upon pressing on it. Figure 6 shows the Arduino UNO board.
From the above picture, LEDs labelled with TX and RX inside the blue bracket light up
at the time of receiving and sending data via the serial port or USB between the Ar-
duino and other attached devices. LED L connects to digital PIN 13 for own use. The
small microcontroller inside the orange bracket controls over the USB interface be-
tween Arduino and the computer during data transmission. [6, p.22-23]
Arduino UNO has one serial port, UART for serial communication to communicate with
the pc via USB or another external serial device. PIN 0 (RX) receives data, and PIN 1
(TX) transmits data. The microcontroller ATmega328P uses 5V TTL serial communica-
tion.
6.1.1 Shield
A shield is a circuit board that plugs on top of the Arduino PCB via pins to extend its ca-
pabilities and functionality [7]. There are many shields available like ethernet shield,
GPS receiver shield, MicroSD shield, SIM808 Shield etc.
10
Arduino shield is stack in design. It allows connecting with the external board or an-
other device through the sockets on its sides. [8, p.162]
GPRS module SIM808 is compatible with Arduino UNO, that delivers and receives
GPRS data, Voice and SMS messages. It gets GPS along with A-GPS data. [11]
SIM808 has many different features as listed below.
o SIM808 powered through Arduino UNO
o One SIM Card interface and holder of standard size
o GPRS mobile station class B.
o Operated via AT commands
o 68 pins SMT pads
o Time-to-first fix (TTFF) and accuracy
o UART interface
o Reduce power consumption
12
o Support various functions like GPS, NMEA protocol, BT, Real-time Clock and
3V-5V logic level
o Supply Voltage 5V ~ 12V
o GSM, Bluetooth, and GPS Antenna pad
o USB interface
o GPIO. [12]
SIM808 interface function shows the connection, performance, and status of the rela-
tive hardware. Bluetooth, GSM and GPM port connect with an individual outer antenna.
5-12V direct current supplies via Vin. Serial select port gives the possibility to choose
hardware serial or software serial select for connecting GPS and GSM shield with Ar-
duino. The different LED lights show the different status of the device.
The SIM808 UART joins with select serial ports to interface either with software serial
or hardware serial communications. Pin7 and pin8 of Arduino connect with GPRS RX
and TX shield for Software serial communication separately. Pin0 and pin1 pins of Ar-
duino connects for hardware serial communication.
16x2 Liquid Crystal Display is alphanumeric that has an 8-bit and 4-bit mode. It has 16
columns, two rows and 32 characters with 1280 pixels. It has HD44780U dot-matrix
small LCD controller which gets the instruction from the microcontroller unit and exe-
cute it to provide information on the display. There are 16 characters in each row, and
each character has a 40-pixel box. The operating voltage is 4.7V to 5.3V with 1mA cur-
rent, not including the backlight.[14]
Universal Serial Bus connects different components to the computer to exchange data
between them. The USB use standard interface to communicate with other devices.
Different types of USB are available.
14
Subscriber Identity Module (SIM), is a detachable smart plastic card that stores user's
information including network, ID, data plan, phone number and country code. It has a
specific memory to store contacts and messages. It is for cellular phones, mobile com-
puters, tablets and so on. It uses IMSI 64-bit number to recognize every subscriber on
a cellular network distinctively. SIM is transferable to any GSM mobiles. It uses a four-
digit PIN to activate on the net. Standard, Micro and Nano are different sizes of SIM
card available in the market. GSM requires a SIM card.
7 NMEA data
NMEA data parse into a sentence in ASCII characters that uses a serial communica-
tion protocol, including carriage return (CF) and line feed (LF). NMEA 0183 electrical
interface uses 4800 baud rate, 8 bits of data in total, zero parity including stop bits one
or multiple. NMEA sentence always begins with a "$" sign and finished with a carriage
return and line feed. [15]
8 AT COMMANDS
of the instruction or code. The device uses those commands to communicate with com-
puters.
The table 1 below shows a few required samples AT command and their description
used in the project.
AT Command Description
AT Match baud rate/Check interface
ATI Recognition of shield
AT+CCID SIM confirmation
AT+CREG Check network registration
AT+CSQ Provide signal quality
AT+CMGF Text message format
AT+CNMI To specify how to handle the newly arrived
message
AT+CMGS Send message
AT+CMGR Read message
AT+CGNSTST Send GNNS data to AT UART
AT+CGNSPWR Power control of GNSS
AT+CGNSSEQ Define the last NMEA sentences that parsed
AT+CGNSINF Read NMEA sentences
9 GSM Technology
GSM, a short form of Global System for Mobile Communication, is a cellular network
that operates in various frequency ranges, i.e. 850MHz, 900MHz, 1800MHz and
1900MHz for transmitting data and broadly used by mobile phone customers in Europe
and Asia including other parts of the world. The technology is accepted globally for digi-
tal cellular communication.
16
10 GPS Technology
11 Software Requirement
Arduino IDE has two main parts, setup () and loop () parts. Setup () function runs once
the power is on or pressing the reset button. The function uses to initialize pin modes,
setting the initial values, variables and so on. The opening brace ({) and closing brace
(}) in a setup function tells what the program executes as a result. Loop () part uses for
looping purposes that allows the application to change and react controlling the Ar-
duino Board uninterruptedly until the power is off or presses the reset button.
17
Arduino Web Editor is an online open-source software development platform that al-
lows to write programs and upload them to any genuine Arduino devices. Online IDE
allows to backup and saves the sketches into the cloud. Therefore, it opens from all
possible devices after a successful login. The latest features of this IDE support for all
genuine Arduino Board. Figure 11 shows the online IDE.
Command area
Sketch Area
Comment Area
11.2 Libraries
Libraries are a vast collection of functions precompiled into a library file. They are the
header files and marked a filename as .h at the end. The programmer can extract and
put the code from the library to call any additional functionality in their system. Arduino
IDE includes different standard libraries that are available to sketch the program. Some
of the essential libraries supplied are LiquidCrystal, EEPROM, Ethernet, SoftwareSerial
and so on. LiquidCrystal libraries have all the required functions needed for liquid crys-
tal displays. There are various libraries available provided by the hardware vendor,
supplier or another developer. It is also possible to create and add your library. In the
Arduino IDE, anyone can insert library by just selecting sketch > Import Library. [18,
p.277-290]
SoftwareSerial Library contains all the operational instructions for serial communication
between Arduino and other board.
SIM808 library includes various features of SIM808 GPS and GPRS module. It allows
accessing the property of SIM808 like sending SMS, getting geo-location, sending GET
and POST HTTP(s) requests etc. The library applies 64 bytes buffer to transmit data
19
with a GPS-GSM module and consume less memory. SIM808 parse response confirms
that the executed instructions from the module are accurate.[19]
Arduino IDE has a separate pop-up window called serial monitor, in which the com-
puter interface with Arduino to communicate with GPRS/GPS/GSM module. The serial
monitor interacts by sending and receiving serial data. It shows the status of the com-
ponent. The serial monitor makes it easier to debug Arduino sketches.
12 Data Stream
Data Stream protocol is the regular generation of data in real-time at a regular interval
in a wide variety and velocity from various sources. It is necessary to understand how
the data streams between PC, Arduino and GPRS module. Arduino IDE installs into a
laptop and connects via hardware UART to Arduino UNO from USB to establish a com-
munication. GPRS module links via software UART with Arduino through jumper wires
by a cross-connection to receive and transmit data through the terminals. The baud
rate is 19200 bps at 8-N-1 for synchronization.
20
Figure 13. Data Stream between PC, Arduino, and Shield [20].
13 Implementation
The implementation of the whole project started by giving a concrete design to the au-
tomobile tracking system using a Global Positioning System and Short Message Ser-
vice concept. In the initial phase, the model was drafted and outlined the operational
structure.
Figure 14 showed the operational block diagram of a GPS and GSM based tracking
module, which revealed the functional overview of the system. 5V regulated power sup-
ply applied to every unit in the system. GPS receiver received the signal from the satel-
lite in the form of latitude and longitudes of the vehicle. The retrieved data would show
21
into the display. The accumulated data would execute in the microcontroller and pro-
cessed to the GSM modem that contained the SIM card. GSM modem would then for-
ward the data to mobile once it got a command from the phone.
GPS Display
Receiver
Figure 14. Operational block diagram of GPS and GSM based tracking module.
13.2 Components
The setup began with assembling the hardware parts used in the project. The compo-
nents used in building the device are listed below in Table 2.
Quantity Components
Arduino Uno
1
SIM808 module
1
Liquid Crystal Display(16X2)
1
2
USB
1 GPS Antenna
1 GSM Antenna
1 SIM card
The essential step of the project was to install all the parts relating to each other. Ar-
duino UNO connected to LCD through jumper wires with the help of their circuit dia-
gram studied from "Arduino Projects Book" that came with Arduino starter kit as a man-
ual. The supplied voltage to the display was 5V provided from Arduino.
Serial port selection in SIM808 was essential to configure the communication port
whether the connection was a software serial or hardware serial. SIM808 and Arduino
UNO connected through jumper wires into their RX and TX terminals. SIM808_TX and
SIM808_RX pins of the module plugged into D7(RX) and D8(TX) pins of Arduino UNO
separately. The noticeable part was the stackable design of the shield that gave an op-
tion to plug into the Arduino UNO.
A six-pin holder valid unlocked SIM card inserted into SIM808 module which automati-
cally detects the required voltage. But as an option, a 3V CR1220 Lithium battery in-
serted into the battery holder at the backside of the shield. Powering of SIM through
this battery would provide the internal Real-Time Clock. The GPS and GPRS antenna
connection to SIM808 was necessary to get the signals from the towers.
The USB linked Laptop, and Arduino UNO provided power supply to Arduino beside
data transformation. SIM808 received the voltage of 5V another USB port separately.
Arduino powered up the LCD supplying 5V energy.
Figure 11. shows the necessary parts used for constructing a device.
23
The next phase was to establish a hardware test to check whether all the assembled
elements configured correctly. Two LED lights, LED ON and LED L blinked on Arduino
UNO after a 9V source applied along with successful power-up on a display screen.
Red LED in the modem flashed on after it got the voltage. Work and NET status LED
light switched on when the power key triggered for 2 seconds. The GPS status LED
light (blue) started functioning after the modem connected to the satellite signal. The
blinking nature of the network led provided the following information for visual confirma-
tion.
• 64ms on and 800ms off- the network was not connected
• 64ms on, 3 seconds off-cellular connection was successful and could send/re-
ceive voice and SMS
• 64ms on, 300ms off - the GPRS data connection was working.[21]
24
Software serial port selection from jumper cap was a crucial part of serial communica-
tion. SIM808 hooked up to Arduino through software UART connecting the RX and TX
terminal of the shield to D8 and D7 of the board, so-called a cross-linked between
ports.
A serial monitor from Arduino Desktop IDE popped up once the connection was con-
firmed, and the sketch was uploaded to a device through USB to ATMEGA328P micro-
controller. The shield remained shut down before uploading the program. Arduino
UNO and SIM808 connected through jumper wires and monitored the status of the sys-
tem, as shown in Figure 10. AT commands were sent to check the various conditions.
25
NMEA message format like RMC, GGA, GSA, GLL and VTG studied during the project
research. RMC message format chosen while writing the programming language. The
format of the RMC (Recommended Minimum sentence C) message is as shown below.
$GPRMC,hhmmss,Status,Latitude,N,Longitude,E,SOG,COG,ddmmyy,MV,MVE,Mode
*CS<CR>>LF>
In the example below the parse NMEA data sentence is in RMC. The sentence has a
specific meaning explained under the GPS PVT (position, velocity, time) data.
$GPRMC,184729.000, A,6017.9927, N,02503.8122, E,0.21,316.38, 190520, A*64
Where:
RMC Recommended Minimum sentence C
184729.000 Fix taken at 18:47:29 UTC
A Data Active, V- Data not valid
6017.9927 N Latitude 60 deg 17.9927' N
02503.8122 E Longitude 25 deg 3.8122' E
26
The GPRS/GPS module power triggered through software. Sim808 has a specified pin
for the switch. Pin 9 assigned to write the corresponding program to control ON and
OFF, as shown in Appendix 2.
SIM808 module contained libraries that defined software serial communication on pins
D7 (RX to TX connection) and D8 (TX to RX connection) of Arduino UNO. The module
configured with the name sim808 in the software serial constructor where digital I/O
pins were assigned to communicate with GPS and GPRS module. The setup part was
most important, where the baud rate set as 9600 for both Serial and sim808. Se-
rial.begin() started serial communication with Arduino and software monitor that
popped up when the code uploaded to Arduino IDE for monitoring. The output ob-
served after selecting "Both NL & CR" at 9600 baud rates. The function sim808.begin()
started serial communication with Arduino and the shield. The delay with 150 millisec-
onds imposed. The loop() included the main program that decided how to control the
device over and over.
The sim808.available() checked the presence of data in the pins 7 and 8. The module
would return a-1 if no data were detected.
The sim808.read() read the returning data from the serial port.
The SIM808 software UART provided the GPS signal that retrieved from the receiver
through GPS antenna and sent to the ATMEGA328P. All the necessary data grabbed
through AT commands.
27
void setup() {
delay(200);
delay(200);
Void loop() {
Figure 11 shows the return single RMC data received from sim808 to the microcontrol-
ler.
The two initial lines built in the programming above the void setup() whose purpose
was to include the library for the display.
28
#include <LiquidCrystal.h>
//LiquidCrystal lcd (12, 11, 5, 4, 3, 2); // pins for RS, E, DB4, DB5, DB6, DB7
The lcd.begin(16, 2) in the sketch in the void setup() alerted Arduino that the display
got 2 rows and 16 characters in each row. The lcd.clear() cleared the screen whereas
lcd.setCursor(0,0) or lcd.setCursor(0,1) function positioned and located the data.
In this project, Arduino UNO programmed to send a text message to the specified num-
ber ("my number= +358xxxxxxxxx") followed by the preferred text message ("Track").
The module did not response anything until and unless the SMS and phone got vali-
dated. The functionality of the AT commands for sending message were studied and
implemented.
AT+CMGS=" +358000000000" – The module sent the text message to a number spec-
ified.
The content of the messages was to send the UTC, latitude, longitude and google map
link to the specified number with (OX1A) command, which was equivalent to CTRL+Z
or character (26). The information dispatched whenever the module received the mes-
sage" Track" from a specified number.
Arduino UNO programmed to read all the incoming text. Figure 13 showed the receiv-
ing message output in the serial monitor.
The AT+CMGF=1 command converted the received SMS into the text mode.
AT+CNMI=1,2,0,0,0 provided the live arriving text message once the module received
the SMS. "Track" message sent to the sim card inserted to the module that responded
with +CMT: in the serial monitor. The responded field was phone number, name of the
sender, time and message separated by a comma as shown in figure 13 except origi-
nal text.
The design of the system started with including SoftwareSerial library and defined pins
7 and 8 as RX and TX of Arduino for serial communication. Display performance imple-
mented by initially adding the LiquidCrystal library followed by assigning the Input and
Output pins inside the LiquidCrystal constructor named with LCD. String variables were
initialized at the time of array declaration and in the program loop.
The LCD showed the "Automobile Tracking Device" display information as a welcome
message once LCD and Arduino UNO initialized with serial communication. The dis-
play showed the various status of the system like received the SMS, sending the text,
sent a message including latitude and longitude. Software triggered the power" ON and
OFF" of the module.
The received message first converted to text mode, assigned the command to read a
live SMS. All the received message was then deleted.
When the GNSS power turned on, AT+CGNSSEQ=" RMC" command parsed the
NMEA sentence in RMC message format. This functionality was set in the setup ().
With the AT+CGNSINF (specific to SIM808 only) in the loop function, returned the sin-
gle RMC data like UTC, latitude, longitude, speed etc. that included the required infor-
mation for the project.
The device system got ready and waited for the message to receive. The module re-
ceived the "Track" text from a specified number and returned with a fetched updated
GPS data including google map link as SMS. The module accepted message only from
the precise GSM number as demonstrated in the section of code below.
if (sim808.available() > 0) {
String B = sim808.readString();
B.trim();
And the module sent back a message to the same number as explained above in the
sending message section.
31
15 LCD status
The display showed various condition such as message status (received, sending, and
sent result) together with latitude and longitude, as shown in the figures.
Figure 16.1. SMS received Figure 16.2. Getting location from satellite
Figure 16.3. GPS location Sending to phone Figure 16.4. Latitude and longitude sent
16 Final Testing
The device fitted into the car and tested in various location. The system provided lati-
tude and longitude with GPS time at every position in real-time. "Track" SMS sent to
every point from my number and got a valid vehicle's position. The data below showed
the final testing of the device.
When "Track" message sent to the module from a number, the system sent back the
complete information to the designated GSM showing UTC, latitude and longitude in-
cluding a google map link. Figure 17 showed the result of automobile tracking system
achieved on a mobile phone via SMS query.
34
Figure 17. Result of SMS query on a mobile phone to get the location of a vehicle
17 Results
The sim808 shield was a complete, efficient package to build a tracking system with Ar-
duino UNO as a primary operational part. The outcome of the entire method's perfor-
mance observed was highly acceptable. The series of test conducted, and the result
was excellent. Figure14 to 18 showed the set of the results of a tracking system.
18 Conclusion
The automobile tracking device was created and implemented successfully with the
support of GPS and GSM technology from Arduino UNO and SIM808. The automobile
was traceable at any location of the earth on a real-time via SMS request. The system
can be used in the vehicle shortly as it is fully functioning.
36
Vehicle theft is a threat to security. The increasing risk of stealing a vehicle is incredibly
rising. The development of such a tracker reduces the risk of robbing, which provides
vehicle's position data at every interval of time. Hence, it provides security over the bur-
glary of our car.
The implementation of the tracking device motivated to learn and experience into auto-
mation engineering.
All in all, the result obtained to meet the requirement of the project and provide a good
result. However, much more works need for better performance.
37
References
4. Hughes JM. The Arduino Family. In: Arduino: a technical reference: a hand-
book of technicians, engineers, and makers. Sebastopol: O'Reilly; 2016. p. 1.
5. Arduino Uno Rev3 [Internet]. Arduino Uno Rev3 | Arduino Official Store. [cited
24 April, 2020]. Available from: https://store.arduino.cc/arduino-uno-rev3
6. Boxall J. Exploring The Arduino Board And The IDE. In: Arduino workshop: a
hands-on introduction with 65 projects. San Francisco: No Starch Press; 2013.
p. 22–23.
11. SIM808 GPRS/GSM GPS Shield v1.1 [Internet]. Elecrow. [cited 25 April 2020].
Available from: https://www.elecrow.com/wiki/index.php?ti-
tle=SIM808_GPRS/GSM+GPS_Shield_v1.1
12. SIM808 Shield - GSM&GPRS GPS [Internet]. Seeed Studio. [cited 26 April
2020]. Available from: https://www.seeedstudio.com/SIM808-Shield-GSM-
GPRS-GPS-p-2524.html
38
13. SIM808 GPRS/GSM+GPS Shield v1.1 [Internet]. Elecrow. [cited 2 May 2020].
Available from: https://www.elecrow.com/wiki/index.php?ti-
tle=SIM808_GPRS%2FGSM%2BGPS_Shield_v1.1
14. 16x2 LCD Module [Internet]. Pinout, Diagrams, Description & Datasheet. [cited
28 April 2020]. Available from: https://components101.com/16x2-lcd-pinout-
datasheet
15. National Marine Electronics Association [Internet]. NMEA. [cited 11 May 2020].
Available from: https://www.nmea.org/content/STAND-
ARDS/NMEA_0183_Standard
16. AT commands [Internet]. IBM Knowledge Center. [cited 7 May 2020]. Available
from: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/net-
work/asynch_atcommand.html
18. Purdum JJ. Arduino Libraries. In: Beginning C for Arduino: learn C program-
ming for the Arduino. New York: Apress; 2015. p. 277–90.
20. SIM808 GPRS/GSM GPS Shield v1.1 [Internet]. Elecrow. [cited 9May 2020].
Available from: https://www.elecrow.com/wiki/index.php?ti-
tle=SIM808_GPRS/GSM+GPS_Shield_v1.1#Turn_on_the_SIM808_GPRS.2F
GSM.2BGPS_shield
21. Mini GSM/GPRS GPS Breakout - SIM808. [cited 10 May, 2020]. Available
from: https://seeeddoc.github.io/Mini_GSM-GPRS_Plus_GPS_Breakout-
SIM808/
22. Read and Parse NMEA Data Directly From GPS Receiver [Internet]. Read and
Parse NMEA Data Directly From GPS Receiver - MATLAB & Simulink. [cited
19 May, 2020]. Available from: https://www.mathworks.com/help/fusion/exam-
ples/read-and-parse-nmea-data-directly-from-gps-receiver.html#d120e12070
Appendix 3
1 (4)
Appendices
#include <SoftwareSerial.h>
void setup() {
delay(150);
void loop() {
if (sim808.available())
Appendix 3
2 (4)
Serial.write(sim808.read()); {
if (Serial.available())
sim808.write(Serial.read());
Int pin= 9 ;
void setup() {
void loop() {
}
Appendix 3
3 (4)
//most important part of the code for receiving and sending message
#include <SoftwareSerial.h>
void setup() {
Serial.begin(9600);
sim808.begin(9600);
delay(150);
delay(1000);
void loop() {
delay(1000);
delay(1000);
Appendix 3
4 (4)
delay(1000);