Friday, May 16, 2025

Smart GPS Tracker using Arduino: Ensure Safety for Kids and Vehicles

EFY Tested GPS Tracker

Today, we’re going to build a smart gps tracker using Arduino that can help you keep tabs on your child’s location – and as a bonus, it can also be used for tracking vehicles or other valuable items.

As parents, ensuring the safety of your child is always a top priority. Questions like ‘Has my child safely reached school?’, ‘Are they home alone?’, or ‘Are they at the playground with friends?’ often flood your mind when you’re away from them.

But what if you could have peace of mind by tracking their location in real-time using GPS?

- Advertisement -
GPS Tracker using Arduino
GPS Tracker using Arduino

Essential Components for DIY GPS Tracker

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

Key Setup Steps Before Building Smart GPS Tracker

First, install the necessary libraries: ‘Tiny GPS++’ and ‘FONA’ in the Arduino IDE. To do this, go to Tools → Library Manager → search for the required libraries → install them.

Step-by-Step Code Guide

In the first part of the code, initialize the libraries. Next, create variables to store the message, GPS location, and other necessary data. After that, define the pins for the GPS module and SIM800L module.

- Advertisement -

Then, create the setup function where you set the baud rates for the SIM800L and GPS modules to 4800 and 9600 respectively for serial communication.

Arduino Code for GPS Tracker
Arduino Code for GPS Tracker
Arduino code for initializing GPS tracker
Arduino code snippet for initializing GPS tracker

In this step, we’ve created a loop function to check if an incoming message has been received by the SIM800L module. If a message is received, it is converted into a readable string.

The function checks if the message contains the ‘get location’ command. If it does, the collected GPS data will be sent back to the requesting device.

Within the same loop function, the getLocation() function is called, which continuously updates the GPS data and returns the results to the loop function.

Arduino code loop function checking for 'get location'
Arduino code loop function checking for ‘get location’

Smart GPS Tracker Circuit

Now, connect the components as shown in the diagram below:

Circuit for Smart GPS Tracker using Arduino
Connection created in Fritzzing

Arduino based GPS Tracker – Testing

Power the device with a battery and wait for a few minutes for it to initialize. Once ready, you can begin using it.

To use, simply send the message ‘get location’ to the smart device, and you’ll receive a response with the location URL, which you can view on Google Maps.

Google Maps displaying real-time GPS location
Google Maps displaying real-time GPS location

Download Source Code

As we wrap up this exciting journey of creating a smart tracker with Arduino, we hope you feel empowered to explore even more innovative Arduino projects.

This device not only enhances the safety of your loved ones but also opens the door to a world of possibilities in tracking and monitoring various objects.

Your creativity knows no bounds!

We encourage you to share your thoughts, questions, or even your own experiences in the comments below. Your insights can inspire others and contribute to our vibrant community of makers.

So, let’s keep the conversation going and make technology work for us!

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

111 COMMENTS

  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)

    Lukas

    Register or Login to leave a comment.
    • 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

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

    Register or Login to leave a comment.
    • 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.

      Register or Login to leave a comment.
  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?

    Register or Login to leave a comment.
    • 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

      Register or Login to leave a comment.
  4. 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

    Register or Login to leave a comment.
  5. 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?
    Regards.

    Register or Login to leave a comment.
  6. 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

    Register or Login to leave a comment.
    • 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

      Register or Login to leave a comment.
        • 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

          Register or Login to leave a comment.
  7. 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?

    Register or Login to leave a comment.
    • 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.

      Register or Login to leave a comment.
    • 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

      Register or Login to leave a comment.
    • 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.

      Register or Login to leave a comment.
  8. 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..

    Register or Login to leave a comment.
    • 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

      Register or Login to leave a comment.
    • 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

      Register or Login to leave a comment.
  9. 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!

    Register or Login to leave a comment.
  10. 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

    Register or Login to leave a comment.
      • 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

        Register or Login to leave a comment.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics