Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

GPS and GSM based Vehicle Tracking System Using Arduino

By Salman Khan May 31, 2014

 

This circuit is designed for tracking the location of vehicles. Most oftracking 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 of trains and buses with passengers. Means passengers can see the real time of arriving busses or trains at the platforms on LCD or on Mobiles.

Block Diagram of Arduino based Vehicle Tracking System

Fig. 1: Block Diagram of Arduino based Vehicle Tracking System

Here in this system we are using the GSM module for sending the coordinates of vehicle on mobile phone via message. GPS is sends the coordinates continuously in form of string. After reading this string using Arduino extract the required data from string and then sends it to mobile phone using GSM module via SMS. This information is called latitude and longitude. GPS used 3 or 4 satellite for tracking the location of any vehicle.

Prototype of Arduino based Vehicle Tracking System

Fig. 2: Prototype of Arduino based Vehicle Tracking System

 

Image of Arduino based Vehicle Tracking System in action

Fig. 3: Image of Arduino based Vehicle Tracking System in action

Image of Arduino based Vehicle Tracking System showing current GPS location of the vehicle

Fig. 4: Image of Arduino based Vehicle Tracking System showing current GPS location of the vehicle

In circuit diagram three main Components used. These are Global Positioning System(GPS), GSM Module and Arduino. GSM module’s Rx pin is directly connected to Tx pin of Arduino and Tx pin of GPS is directly connected Rx pin of Arduino. And a 16X2 liquid Crystal display is also connected with Arduino for displaying coordinate. It is assumed that the reader gone through How to strat with arduino and How to interface LCD with arduino.

Image of SMS received on Mobile phone showing current GPS location of vehicle

Fig. 5: Image of SMS received on Mobile phone showing current GPS location of vehicle

Image of display panel of vehicle tracking system showing current GPS location

Fig. 6: Image of display panel of vehicle tracking system showing current GPS location

Programming

Programming part of this project is also simple. GPS continuously sends coordinates to Arduino and Arduino read these coordinate and extract required character of coordinates. GPS sends many string to Arduino but we required only one of them. First we match required string which is

$GPGGA

The above given string is required string. In this string,

after first comma: this is the coordinates reading time.

After second comma: this is the Latitude

After third comma: this is longitude

Screenshot of Arduino Serial Port showing logged GPS data

Fig. 7: Screenshot of Arduino Serial Port showing logged GPS data

If this string matches then we start to store this string in a temporary array and then extract required coordinates from it and stores in another two arrays. And then send these array to Display and also sends these to user’s mobile phone via SMS. For sending SMS here we used GSM module which sends SMS to mobile phone. AT commands for sending SMS:

AT+CMGF=1

AT+CMGS=”9610126059”

>COORDINATES

Ctrl+z

In programming we used these commands for sending SMS using GSM:

Serial.println(“AT+CMGF=1”);    // for selecting text mode

Serial.println(“AT+CMGS=”9610126059””);  // Add user mobile number

Serial.println(“Latitude: ”);     // write Latitude in message

Serial.println(latitude);            // write Latitude array in SMS

Serial.println(“Longitude: ”);

Serial.println(longitude);

And then

Serial.write(26);    //  send SMS

After this configuration GSM Module sends GPS or Vehicle location to mobile phone.

Here Serial.write command is used for sending message. if you will use Serial.print of serial.prinln GSM module will not send any message. so we have to used Serial.write for sending message.

Here 26 decimal number is also used. 26 is the equivalent decimal number of ctrl+z.

Instead of these we can also use hexadecimal number 0x1A.

Note:This program or Systemdoes not work with FTDI burner. So when you run this system or programremove FTDI burner first and then connect external power supply with Arduino Pro Mini.’

Components Used:

1.     Arduino Pro mini

2.     GSM Module

3.     Global Positioning System (GPS)

4.     16X2 Liquid Crystal Display

5.     Connecting wires

Project Source Code

###



#include
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
char str[70];
char *test="$GPGGA";       
char logitude[10];
char latitude[10];
int i,j,k;
int temp;
int Ctrl+z=26;    //for sending msg
void setup() 
{
  lcd.begin(16,2);
  Serial.begin(9600);
  lcd.setCursor(0,0);
  lcd.print("GPS Besed Vehicle ");
  lcd.setCursor(0,1);
  lcd.print("Tracking System");
  delay(10000);
}
void loop() 
{
  if (temp==1) 
  {
    for(i=18;i<27;i++)          //extract latitude from string
    {
     latitude[j]=str[i];
     j++;
    }
    for(i=30;i<40;i++)          //extract longitude from string
    {
    logitude[k]=str[i];
     k++;
    }
    lcd.setCursor(0,0);        //display latitude and longitude on 16X2 lcd display  
    lcd.print("Lat(N)");
    lcd.print(latitude);
    lcd.setCursor(0,1);
    lcd.print("Lon(E)");
    lcd.print(logitude);
    delay(100);
    Serial.println("AT+CMGF=1");    //select text mode
    delay(10);
    Serial.println("AT+CMGS="9610126059"");  // enter receipent number
    Serial.println();
    Serial.print("Latitude(N): ");             //enter latitude in msg
    Serial.println(latitude);                  //enter latitude value in msg
    Serial.print("Longitude(E): ");            //enter Longitude in Msg
    Serial.println(logitude);                  //enter longitude value in msg
    Serial.write(Ctrl+z);                      //send msg  Ctrl+z=26
    temp=0;
    i=0;
    j=0;
    k=0;
    delay(20000);                        // next reading within 20 seconds
  }
}
void serialEvent()
{
  while (Serial.available())            //Serial incomming data from GPS 
  {
    char inChar = (char)Serial.read(); 
    str[i]= inChar;                  //store incomming data from GPS to temparary string str[]
     i++;
     if (i < 7)                       
     {
      if(str[i-1] != test[i-1])         //check for right string
      {
        i=0; 
      }
     }
    if(i >=60)
    {
     temp=1;
    } 
  }
}


###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Vehicle-Tracking-System

Project Video


Filed Under: Electronic Projects
Tagged With: Arduino, gps, GSM MODULE, lcd
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Right Half Plane Zero
  • Single ended measuring ports and balanced antenna
  • Thermal modelling of repetitive power pulse
  • Testing 5kW Grid Tied inverter over 200-253VAC
  • Resistor Selection for Amplifier Layout

RSS Electro-Tech-Online.com Discussions

  • Can I make two inputs from one??
  • Fun with AI and swordfish basic
  • Simple LED Analog Clock Idea
  • Is AI making embedded software developers more productive?
  • Behlke swich

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe