Smart GPS Tracker Using Arduino

Ashwini Kumar Sinha


Parents often worry about their children when they are away from them. Have they safely reached school? Are they alone at home? Or are they at the playground with friends? – these are some of the questions that bothers parents all over the world.  

So, today we are going to make a smart tracker that can keep track of a child. Besides this, the device can also be used to track your vehicle location and other objects. Let’s begin. 

First, collect the following components. 


  • GPS Module
  • Arduino Nano
  • SIM800L 
  • 2G SIM card 
  • OLED Display
  • Small 3V battery 
  • Wires 


First we need to install the libraries ‘Tiny GPS ++’ and ‘FONA’  in Arduino IDE. To do so, go to tools → click on library manager → search the required library → install the library.


In first part of the code, initialise the library in code. Next, create some variables that will store the message, GPS location and other data. Then we define the pins for GPS module and SIM800L module.

After that, we will create the setup function where the baud rate of SIM800L and GPS modules for serial communication are set to 4800 and 9600 respectively. 

Fig 1.
Fig 2.

Here, we have created a loop function to check whether the incoming message has been received by SIM800L or not. If the message has been received, then convert it into a readable string. It will check the message for a ‘get location’ command, after which the collected data (with respect to location) will be sent back to the original device..

Within the same loop function, a function named get location() will be called .This function will keep updating the GPS data and return the results to the loop function

Fig 3


Now connect the components as shown in the pic below:

Fig 4.Connection created in Fritzzing


Power the device with a battery and wait for a few minutes. The device will then become ready for use. 

Send the message ‘get location’ to the smart device and you will receive a message with the location URL, which you can check on Google Maps.

Fig 5.

Download Source Code


    • Code is attached at the bottom of page you can download directly.Just click on the “Code” written in DEEP Red color

      • Good evening,
        I have a project for my Baschelor that deals with the same subject and I really need your help. I’m begging you. Here’s my email. You can write me so we can exchange ideas.

        I would really appreciate it if you can help me.
        Thank you in advance

  1. Good evening,
    I have a project for my Baschelor that deals with the same subject and I really need your help. I’m begging you.
    Here’s my email. You can write me so we can exchange ideas.

    I would really appreciate it if you can help me.

    Thank you in advance
    004917687888597 (Watzap)


    • It depends on the GPS module. It is good for outdoor use in-home the GPS module takes a lot of time to get Position. Resolution is good up to 4 decimal points in lat and long

  2. Hi, I have done a project similar to yours.
    I cannot find a network with my module, kindly suggest the possible solution.

    • Power on your device and module and let it keep on for more than 6 to 7 hours and also try to get it in open space either in the garden or outside your house if it gets the FIX sat location then the red led start blinking and you will get the location.

      • it means .. i need to use 2 simcard .. one in the phone..and one in project ? macam pula dengan rangkaian..what types of rangkaian..using umobile simcard can?

  3. Hi! I would like to refer to this project to build a remote gps tracker of our own! I was wondering if this setup/circuit connections would work if I were to use a SIM900A mini GSM module? Also in this project, for what component do you use the 3V battery?

  4. can i have your email or number .. easy to me to contact you…bcs i use your project as my final year project…please madam

    • Arduino Uno, Nano, Mini all work for this project without changing any single line in code and connection.
      I have used Arduino Uno to test it as a pin connection using Jumper wire is easy. If you need your device looks small and compact you can use nano, mini

  5. Hy,
    I have my final year project on iot , ardiuno . I have to make a gas leakage detector that sense gas and send an email , an alarm system and GpS tracker that give location in email also.
    Can you please guide me which devices will be used in this . Pleaseee

  6. Hi! Thanks a lot!
    I have a question. Can the device share the location automatically without any “get loc” message? Maybe each minute or when it’s turning on? Or when someone press a buttom in the device?

  7. Hi, I did this project at home but it doesn’t works. The red led in SIM module turns on but in the GPS module doesn’t works. All the elements are new and funtional. I check the connections and the code, but it still not working. Can you help me please? Thank you

    • Check the Gps Module, Some GPS module takes time for first-time position fixing. Try put the GPS module in open space or at least near the window and wait until the GPS module LED to indicate the Position-fixing is done

        • Its limitations is you have to send message every time when you want to get location. Also for good GPS tracking you have to use better GPS modue that can catch location even indoor

  8. Hello .. Good night
    I speak of Brazil.
    I would like to carry out this project but without using the oled display.
    What changes do I need to make to the code?

    • It will work without OLED as well remove the OLED part of the code, or just leave whole code don’t connect it the project will work.

    • The module used is Neo 6MGPS. No cloud services used it based on SMS whenever you message “get locn” to the device it will reply with a link containing the location on google map

    • The location is sent to the number who send the specific code message getLOC or any other coded message of your choice

    • Two way one is to use google Maps API but you need a good microcontroller or SBC like raspberry pi for that. Another one is you can update the location data and transfer using services like a mosquito, Thingspeak, google cloud.

  9. I have a problem ;
    My oled display keeps showing “Couldn’t find SIM”
    Why is that ? I have insert it on SIM800l module and the network is working..

    • check its 2g sim and registered on 2g network.use font library example with AT command to check Simcard status

    • The article consists of all details of the project if the face in making and connection please let me know. synopsis you can create yourself

    • Check the default baud rate of sim800l and change in code. I am not sure if the sim900l works as I havn’t tasted the project with that but it should worl as both work on serial port and also use almost same AT commands

  10. Hello my friend.

    I download your code. I have already connected all the modules in my Arduino Nano, as you show before (Fig. 4). The code uploaded in Arduino. But when i open the Serial Monitor, shown that it find the SIM Module, but i’m getting this error here “No GPS detected: check wiring.”

    Can you help my please?

    Thank you in advance!

  11. Hi, I’m new for making this project. I understand all the codings etc, But one thing i can’t understand is when i use my simcard and put it in to module what simcard im gonna use to get the location? Please reply asap. This is my first project if i understand this this is the good start for me. Thanks

      • Another thing i want to ask, How about the routing from map i want to see when i get the location. Like when i get location i see all dots from the like having a route did you know what i mean? Thankyouu so much


Please enter your comment!
Please enter your name here