0% found this document useful (0 votes)
90 views

Real-Time Object Tracking System SIM808 Arduino (Github - Com Sarehsoltani) - BSc-Thesis Report

This document is a thesis submitted by Sareh Soltani for the degree of Bachelor of Science in Computer Engineering. It discusses the design and implementation of a real-time object tracking system. The system uses GPS modules on each tracked object to determine their location every two minutes and send it via GSM modem to software servers. A web application was then developed to process, store, and display the location data on a map in real-time along with speed and direction of movement. The application also includes a heatmap to show frequently visited locations.

Uploaded by

Antoiine
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

Real-Time Object Tracking System SIM808 Arduino (Github - Com Sarehsoltani) - BSc-Thesis Report

This document is a thesis submitted by Sareh Soltani for the degree of Bachelor of Science in Computer Engineering. It discusses the design and implementation of a real-time object tracking system. The system uses GPS modules on each tracked object to determine their location every two minutes and send it via GSM modem to software servers. A web application was then developed to process, store, and display the location data on a map in real-time along with speed and direction of movement. The application also includes a heatmap to show frequently visited locations.

Uploaded by

Antoiine
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Department of Computer Engineering and Information Technology

Amirkabir University of Technology

B.Sc. Thesis

Design and Implementation of a Real-Time


Object Tracking system

Submitted in partial fulfillment of


the degree

Bachelor of Science
in
Computer Engineering

Submitted by
Sareh Soltani

Conducted in
Aolab (The Academy for Amirkabir IoT Laboratory)

Under the guidance of


Prof. Bahador Bakhshi
June 2019
Abstract

In recent years, IoT technology has grown significantly and has been able
to meet diverse and complex needs in various fields. One of the applica-
tions of the Internet of Things is real-time tracking. The positioning and
tracking system has provided reliable solutions to ensure the safety of people
and vehicles, and also has a significant impact on optimizing the quality of
monitoring. This system can be used for a broad range of applications such
as traffic management and vehicle tracking/anti-theft system, and finally,
traffic routing and navigation. it can be applied in many business cases,
like public transportation, so passengers can track their buses and trains by
following the vehicle account on social networks.
In this project, a system was developed to accurately determine the lo-
cation, direction of movement, and speed of moving objects at any given
time using SIM808 Module. In this system, each object is equipped with a
GPS (Global Positioning System) module that receives its location every two
minutes from the satellite and sends it to the software servers via the GSM
modem. Software servers analyze the information after receiving it. In this
part of the project, a web application was developed to process the trans-
mitted data and then store it in a database and finally convert the stored
information to visible to users. This allows you to see the speed, direction of
movement, and the object’s locations on the map. Furthermore, a heatmap
was implemented to show the frequently visited places by users.
Contents

1 Introduction 1

2 Tracking system components 4


2.1 System design and architecture . . . . . . . . . . . . . . . . . 4
2.2 System components . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Hardware components . . . . . . . . . . . . . . . . . . 6
2.2.2 Software components . . . . . . . . . . . . . . . . . . . 8

3 Implementation and Performance Analysis 9


3.1 Evaluate Tracking system performance . . . . . . . . . . . . . 10
3.1.1 Circuit performance evaluation . . . . . . . . . . . . . 10
3.2 Circuit Architecture evaluation . . . . . . . . . . . . . . . . . 15
3.3 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.1 Display Information . . . . . . . . . . . . . . . . . . . 16
3.4 Information analysis . . . . . . . . . . . . . . . . . . . . . . . 20

4 Future Work 21

5 Conclusion 22

References 23

6 �Appendix 24

i
List of Figures

2.1 Block Diagram of Tracking System [6] . . . . . . . . . . . . . 5


2.2 Architecture of Tracking System[3] . . . . . . . . . . . . . . . 6
2.3 Arduino Uno board . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 SIM 808 module . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.1 Designed Tracking System . . . . . . . . . . . . . . . . . . . . 10


3.2 Performance of implemented code on Arduino [3] . . . . . . . 11
3.3 Read Information diagram [8] . . . . . . . . . . . . . . . . . . 12
3.4 GSM [8] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 GSM [8] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6 SIM 808 - Arduino . . . . . . . . . . . . . . . . . . . . . . . . 15
3.7 Show the path of the object in the application . . . . . . . . . 16
3.8 Display the speed, time and date of movement of the object
in each location on the map . . . . . . . . . . . . . . . . . . . 17
3.9 Receive the message sent by the user to receive the location . 18
3.10 The recieved message . . . . . . . . . . . . . . . . . . . . . . . 19
3.11 See the position of the object on the map . . . . . . . . . . . . 19
3.12 high-traffic locations on the heatmap . . . . . . . . . . . . . . 20

ii
Chapter 1

Introduction

The concept of the Internet of Things refers to objects with a unique iden-
tity and the ability to transmit data over the network, without the need for
human interaction and intervention. Its primary purpose is to make objects
intelligent and provide a platform through which objects can send and receive
information. The Internet of Things (IoT) refers extensively to the devel-
opment of computing capabilities and network communications of objects,
devices, sensors, or any other item that is not typically considered a com-
puter. These smart objects can collect, analyze and manage data remotely
[1].
The Internet of Things is a wide range of sensors and actuators that
measure and process various environmental conditions. In recent years, IoT
technology has grown significantly and has met many complex needs in var-
ious fields. Due to the expansion of new technologies, the production of
intelligent sensors, the growth of communication technologies, and the com-
plexity of requirements, the Internet of Things has gained a lot of power. It
has led to the expansion of intelligent systems in the environment [2].
These systems must interact with each other to have a positive impact on
the environment. IoT-based technologies have different requirements com-
pared to other technologies. Typically, these systems have less memory,
power consumption, and bandwidth than other systems. Most smart sys-
tems are battery-powered and located in a remote location where they cannot
be charged continuously. As a result, the power consumption and coverage
range for these systems, especially those implemented at the macro level,
such as smart farming, smart city and home, and tracking issues, is very
important. There are several wireless communication protocols, each with
its unique characteristics.
The Internet of Things is a new communication platform for commu-
nicating between intelligent objects. The introduction of this platform has

1
provided new facilities for solving problems, such as locating and tracking
moving objects from vehicle attacks at the city, region, or country level. The
Internet of Things (IoT) is rapidly gaining access to telecommunications sce-
narios, and it is expected that the exchange of information in global resource
chains will facilitate.
Widely, Internet of Things can be used as the mainstay of pervasive
systems and the activation of intelligent environments for ease in identifying
objects and retrieving information from the Internet. From a conceptual
point of view, the Internet of Things relies on three principles related to
intelligent objects’ ability: Ability to identify, transfer and interact either
among themselves or with other users. Objects are usually classified either
individually or as a member of a category.
One of the most important issues today is the tracking of moving objects,
which refers to the immediate tracking of a specific moving object’s current
position. Moving object tracking systems is a solution to many problems,
including security issues. It is a technology used to determine the location
of an object.
One of the important applications of IoT is tracking systems that are
used in various technologies. Tracking systems were developed for the trans-
portation industry. One of the basic needs of the owners of this industry is to
check the position of vehicles. The earliest systems for locating were passive
systems that stored information in memory and could only be accessed when
a vehicle was available. These systems are not suitable for real-time applica-
tions because they need to provide information to the user immediately. For
solving this issue, active systems were created that allow the use of in-vehicle
hardware and remote tracking servers.
Today, the safety of people and vehicles has become a public concern.
The tracking system has provided reliable solutions to ensure people’s and
vehicles’ safety. It has a significant impact on optimizing the quality of moni-
toring and management of public transportation, vehicle movements, people
(children and the elderly), or It has every other moving object. Tracking
system is a technology that makes it possible to determine the exact posi-
tion and track of people, vehicles, or any other moving object using various
methods such as the Global Positioning System [3].
In addition to vehicles, tracking systems also play an important role in
remote monitoring and environmental monitoring applications. For example,
tracking animals, humans, and locating objects are some of this system’s
applications. In human monitoring, this system can be beneficial for the
elderly who have certain diseases such as Alzheimer’s and are more likely to
get lost, or for the safety of children. Families can use this system to find
the position of their elderly or child [4].

2
The system we have implemented in this project can be used in various
cases. One of the applications that can be imagined for the Internet of Things
is implementing a system that can determine the exact position and path of
each moving object at any time. In this project, we intend to build a tracking
system that can identify a moving object’s exact position and path.
In this project, our communication will be one-way in that the coordinates
of the moving object are continuously measured by the GPS module and
sent to a server. This module is continually connected to the satellite to get
coordinates. GPS data is sent to the Arduino. Finally, the GSM modem
sends this information to the software server. In this project, the software
servers analyze the information after receiving it, and we will not have a
request from the server since our communication will be one-way. In this
part of the project, web-based software will be developed to process the
submitted information, store it in the database, and finally convert the stored
information into a display for users. An application written using stored data
displays the location on a map. In this way, the object or person can be
found at the current time. In the end, the current position and direction of
the person will be displayed on the map. Another application of this system
is to obtain high-traffic locations by analyzing the collected information.
In the continuation of this dissertation, we talk about the general ar-
chitecture of the tracking system and its components. Then, we introduce
the implementation method of this system using the mentioned components.
Finally, we talk about the results of the system implementation and what
can be done in the future based on this project.

3
Chapter 2

Tracking system components

The main goal of our project is to design and implement a system that
can determine the exact position of each moving object at any time. The
mentioned system should be cost-effective in addition to proper performance.
To design such a system, we must first identify the system requirements
and the overall architecture of the system we want. Then we use this archi-
tecture to implement the appropriate modules. In this chapter, in section
2.1, we first explain the general design of the tracking system and then in
section 2.2, we introduce the components used in this design.

2.1 System design and architecture


In this section, we will design our system. According to the project’s require-
ments, we must specify the transmitter and receiver modules, communication
protocol, and application program for displaying information. The primary
purpose of a tracking system is to track a specific object and gain its path.
The tracking system provides information about the current location and
speed of the object.
In this project, our communication has been one-way, in which the coordi-
nates of the moving object are continuously measured and sent to a server.
Then, the necessary processing of this information is performed on the server-
side. According to the above explanations, we can mention three main parts
in this system [5]:
• Obtain the location of a moving object using the GPS module
• Send location information to software servers by GSM modem
• Store location information on the server-side and implement an appli-
cation to display the object’s path on the map

4
As we have seen, the architecture of our system has four main parts. The first
part is about locating the object from the satellite using the GPS module.
The second part is related to sending the received information to the server
using a GSM modem. The third part is the development of an application
that uses the received data to display the location of the object on the map.

Figure 2.1: Block Diagram of Tracking System [6]

Figure 2.1 shows an overview of the designed system architecture and the
relationship between its parts. �For selecting the modules, it is necessary to
know the task of each section accurately and choose the desired module for
it [7].

• In the first part, we need to measure the location of the object con-
tinuously. As soon as the object moves, the GPS module consistently
receives the moving object’s coordinate from the satellite. The signal
received from the satellite is weak, so we must use an antenna to am-
plify the desired signal, and at the end, sends the amplified signal to
the Arduino board.

• In the second part, the information received from the GPS module is
sent to the server by the GSM modem.

• Software servers analyze the information after receiving them. Our


communication in this project is one-way, and we will not have a request
from software servers. In this part of the project, web-based software
will be developed to process the submitted information and store them
in the database. In the last section, this information will be displayed
in the designed web page.

5
Figure 2.2: Architecture of Tracking System[3]

2.2 System components


In the previous section, we defined the system architecture. Now we will
express and introduce the components of this architecture in detail.

2.2.1 Hardware components


The hardware components used to implement this system are:

• Arduino module

• SIM808 module

• GPS antenna

• GSM modem

2.2.1.1 Arduino module


Arduino is an open-source microprocessor suitable for writing applications
that interact with the environment and objects outside. This board is ideal
for prototyping, and its software and hardware design are freely available to
all people. Any interested person, even with a little knowledge and experi-
ence in electronics, can use Arduino to do their projects.
Arduino has a simple programming environment that anyone with a little
knowledge of C and C++ can program in this environment and run the pro-
gram written in Arduino. Various sensors can be connected to the Arduino
microcontroller and controlled. The microprocessor used on the Arduino
board is based on the Arduino programming language and does not require

6
any additional software or compiler for coding.
Figure 2.3 shows the Arduino Uno board:

Figure 2.3: Arduino Uno board

2.2.1.2 SIM808 module


The 808 SIM module is a combination of GSM / GPS PRS 9 module and
GPS module with 1900 MHz support for data transmission, SMS and voice
calling. This module has a SIM card socket in which the SIM card is inserted.
Using the GSM / GPRS modem and the 808 SIM module, you can exchange
data over the GSM network via the USB interface and access the information
of devices located in remote locations.
In figure 2.4, You can see this chip.

Figure 2.4: SIM 808 module

7
2.2.2 Software components
2.2.2.1 Arduino IDE
The software used for programming is Arduino software, which you can see in
Figure 2.5. Using the C language, you can write the required program, and
after compiling, the generated hex code is uploaded on the Arduino. There
are different libraries that make coding easier. The program is written using
this software to receive data from satellite and send it to a mobile phone.

Figure 2.5: Arduino IDE

8
Chapter 3

Implementation and
Performance Analysis

In the previous section, we described the system’s general architecture and


the modules required to implement the tracking system. In this chapter, we
will explain how the different parts are connected, and we will explain the
implementation of the system.
The tracking system designed in this project uses Arduino module and the
�SIM 808, including the GSM and GPS antennas, for tracking. The core of
this project is the Arduino microcontroller. The geographical location of ob-
ject is received using a GPS antenna, and then this information is sent to the
webserver using GSM technology. A web application has been developed to
view and track an object on a map. This application consists of two parts:
Front-end and Back-end. The front-end part has developed using Angular
framework, and the Back-end part has developed using Express framework.
Initially, the SIM 808 module is initialized to get the location from the satel-
lite. The initial settings of this device are done using AT commands. By
connecting the GPS antenna, this module will be able to receive location co-
ordinates from the satellite. Then the settings related to the GPRS network
are done.
In fiqure 3.1 How to connect different modules in the tracking system is
shown:

9
Figure 3.1: Designed Tracking System

3.1 Evaluate Tracking system performance


As mentioned, the hardware part of our system consists of four modules, SIM
808, GSM receiver, GPS receiver, and Arduino microcontroller. This section
will explain the implementation of the designed system, how to connect the
various components and the implemented code.

3.1.1 Circuit performance evaluation


Before dealing with the modules and how to connect them, it is necessary to
observe the system microcontroller performance and processing information
in the flowchart. The overall performance of the system was described in the
previous section. Now we have a flowchart about the implemented algorithm,
and we can have a better understanding of the workflow in the hardware
circuit designed and the code written for it.
The following diagram shows the general process of the implemented code
on the Arduino.

10
Figure 3.2: Performance of implemented code on Arduino [3]

Firstly, for testing the system, the GPS antenna is connected to the SIM
808 module to receive the object’s location (latitude and longitude) from the
satellite. For doing this, the Arduino IDE software is used to program the
code written on the Arduino board.

11
The flowchart 3.3 shows how GPS works:

Figure 3.3: Read Information diagram [8]

For sending the object’s location to the user via the GSM network, SIM
808 module and the Arduino microcontroller connected to it are used. For
connecting 808 SIM module to the GSM network, we use AT commands to
program and control it.

12
The flowchart 3.4 shows how GSM works:

Figure 3.4: GSM [8]

13

Figure 3.5: GSM [8]

14
3.2 Circuit Architecture evaluation
In this section, we explain the hardware part of the proposed system. As
mentioned in the previous sections, using GPS antenna connected to the
SIM 808 module, location information is received from the satellite every
two minutes and then sent to the server via the GSM network.
In the following figure, you can see how to connect SIM 808 module to the
Arduino.

Figure 3.6: SIM 808 - Arduino

The 808 SIM module is connected to the Arduino using a serial interface;
it has two TX and RX pins connected to the 10 and 11 Arduino digital pins,
respectively. The ground pin of this module is also connected to the ground
connection base of the Arduino board. We supply the required voltage of the
808 SIM module through a 9-volt output adapter.

3.3 Application
In the Back-end, a web service with RESTful architecture has been devel-
oped, which stores the received data in the database, and the web application
receives and displays this information.
REST is a web service architecture that uses HTTP to exchange infor-
mation between two systems. The basic idea of this architecture is to use
HTTP to establish information between machines instead of using complex
mechanisms to connect devices.
In this section, we first describe the structure of the database and how to
communicate with it. Finally, we explain the written web application that
shows the path of the object on the map.

15
3.3.0.1 Database
We have used Mongo database to store information and manage the server.
Mongo DB is a NOSQL database that runs on various operating systems, in-
cluding Windows and Macintosh Linux. It also supports most programming
languages. Mongo DB provides high performance, accessibility, scalability,
fast repeatability, and automatic sharing. Due to the NOSQL structure,
Mongo DB only stores and searches data, thus significantly increasing data
acquisition and storage speed.
The database received information from the hardware side. Then we store
this information, including latitude, longitude, time, and date.

3.3.1 Display Information


3.3.1.1 Web Application
A web application has been developed to display the information stored in
the database. The front-end of this web application is implemented using
the Angular framework, and we use Google Maps to show the route.
This web application is available at the following address: http:// 103.216.62.79
Server-side processes were implemented using the Express framework.
The server-side code works in such a way that as soon as new data is received
from the hardware side, this data is stored in the Mongo database. The
hardware sends an HTTP request to the server each time it sends new data
to the server: /api/device/add/
The code written on the server side acts in such a way that it refers to
the database once every 60 seconds. According to the last time of receiving
information from it, it gets the received data from that time.
The following figure shows the designed application:

Figure 3.7: Show the path of the object in the application

16
If we click on any of the markers in the map that indicate the object’s position
at any time, we can see the speed of the object, time, and date in that
position. The following figure shows a view of this output:

Figure 3.8: Display the speed, time and date of movement of the object in
each location on the map

3.3.1.2 SMS
One of the unique features of the implemented tracking system is that you
can send a message to the SIM card number inserted on the SIM808 module
to get the object’s current position. After receiving the message, this module
also receives the object’s location via GPS and sends the necessary infor-
mation for tracking in response to the received message. This information
includes the latitude and longitude and speed of the object. There is also
a link attached to this message that the user can click to view the object’s
location on the map.

17
In the following figures, you can see the message sent and its response
through the designed system:

Figure 3.9: Receive the message sent by the user to receive the location

18
Figure 3-10 shows the message sent to the user.

Figure 3.10: The recieved message

By clicking on the received link, you can see the current position of the object
on the map.

Figure 3.11: See the position of the object on the map

19
3.4 Information analysis
Using the designed real-time tracking system, we were able to continuously
measure the location of the object and store this information in the database.
Another feature of this system is to get the frequently visited places of a
person in a certain period. To do this, we used the heat map. Heatmaps are
graphic and color data that enable us to identify the behavior of our users. In
this project, we implemented the heatmap using stored information, which
was the location of objects at different times. The most visited places of
a person, which are more frequent in our data set than the others, will be
visible as red areas on the map.
The designed application consists of two maps. �First shows the object’s
positions on the map, and by selecting the Heatmap option, you can view
the heatmap of these points. In Figure 3.12, you can see the high-traffic
locations of the object shown in red color.

Figure 3.12: high-traffic locations on the heatmap

20
Chapter 4

Future Work

The GPS antenna has a relatively high power consumption. There are two
proposed ways to reduce power consumption in this system. The first way
that can be suggested for this system is to use machine learning algorithms
to predict the object’s next move. Another way is using LoRaWAN protocol
instead of GPS to locate the object.
Another thing that can be done is to add sensors and actuators to this
system. For example, an accelerometer sensor can be used to monitor the
object’s movement, and only when it is moving, GPS information is sent to
the server, which will reduce power consumption.
A camera can also be installed on the designed system. Consequently, in
addition to the information sent through GPS, we can also use this camera’s
images to monitor the location.
As we have said, one of the features of this system was receiving the
position of the person by sending a message to the SIM card number inserted
in this system. Despite its advantages, it can create security risks for people.
Therefore, it is possible to improve the security of the desired tracking system
and specify that if it receives a message from a specified and predetermined
number, it will send the person’s location. Otherwise, no information will be
exchanged.
This system is designed in such a way that it can be customized for
different applications. For example, we can specify the permissible range
for the movement of the object. Therefore, if the object leaves the specified
range, the system will automatically contact institutions such as police and
minimize human errors.

21
Chapter 5

Conclusion

In this project, our goal was the implementation of a real-time tracking sys-
tem. Therefore, in this project, we implemented a tracking system to monitor
the position of a moving object via SMS as well as online on a map. The core
of the designed system is Arduino board and SIM 808 module. The GSM
modem is controlled using the AT commands and allows the exchange of
information using the GSM network. In this project, GPS module has been
used to find the position of the object. GPS Once every two minutes, the
object’s location is received from the satellite, and this information is sent
to the server. The server sends the received information to the implemented
web service. Finally, data is stored in the database and displayed in the
application, and we can see the path of the object on the map.
The program implemented on the Arduino is written in such a way that
it receives the location of the object using GPS every two minutes and sends
it to the server. On the server side, this information is stored in the Mongo
database. Using this information, we show the path of movement of an object
on the map. The server-side code is written so that it visits the database
every minute, and the map containing the path of the object is updated.
At the end of this project, we were able to design a real-time tracking
system. It is used in various fields, such as tracking vehicles, children and
the elderly, etc. By using it, we will be able to take the necessary actions in
the fastest possible time.

22
References

[1] M. Mukhtar, ”GPS based Advanced Vehicle Tracking and Vehicle Control
System,” International Journal of Intelligent Systems and Applications,
Feb. 2015.

[2] S. Hussain Shah and I. Yaqoob, ”A survey: Internet of Things (IOT)


technologies, applications and challenges,” 2016 IEEE Smart Energy
Grid Engineering (SEGE), Aug. 2016.

[3] Md. Rahman, J.Mou, K. Tara and Md. Sarkar, ”Real time Google map
and Arduino based vehicle tracking system,” 2016 IEEE Smart Energy
Grid Engineering (SEGE), Aug. 2016.

[4] J. Saranya and J. Selvakumar, ”Implementation of children tracking sys-


tem on android mobile terminals,” Implementation of children tracking
system on android mobile terminals, Apr. 2013.

[5] B. Bidabad and A. Tayebi, ”Design and implementation of vehicle track-


ing system using GPS/GSM/GPRS technology and smartphone applica-
tion,” 2014.

[6] M. Omar, H. Rashaand and T. Nicolae, ”Design and implementation


of real time tracking system based on Arduino Intel Galileo,” 2016 8th
International Conference on Electronics, Computers and Artificial In-
telligence (ECAI), Jun. 2016.

[7] T. Agrawal and M. Qadeer, ”Tracing Path with Arduino Uno using GPS
and GPRS/GSM,” 2018 International Conference on Computing, Power
and Communication Technologies (GUCON), Sep. 2018.

[8] A. ElShafee, M. Menshawi and M. Saeed, ”Integrating Social Network


Services with Vehicle Tracking Technologies,” International Journal of
Computer Applications, Jun. 2013.

23
Chapter 6

�Appendix

All codes are available on my GitHub: RealTimeTrackerSystem

1. The implemented code on Arduino board

24
25
26
27
2. Back-end development

28
29
30
31
3. Front-end development

32
33
4. The implemented code for sending and recieving an SMS

34
35

You might also like