Smallest Real-Time GPS Tracker

by techiesms in Circuits > Wireless

112 Views, 4 Favorites, 0 Comments

Smallest Real-Time GPS Tracker

I Built the Smallest Real-Time GPS Tracker! (SOS, Spy & Track) 🛰️📍
IMG_3294 2.jpg

This project is a complete guide to building an ultra-compact, real-time GPS tracker using the XIAO ESP32-C3, SIM800C GSM module, and a GNSS GPS module. The goal is to create a power-efficient, feature-packed tracker that works globally without any monthly subscription fees.

The Problem

A major problem with many GPS tracking solutions is that they are either not compact enough, consume too much power, or lack reliable emergency features. In real-world situations, a tracker should not only provide location data but also respond instantly during emergencies.

The Solution

This project provides a budget-friendly alternative that combines real-time tracking, security features, and smart power management in a compact design.

Key Features

  1. Real-time tracking using Circuit Digest Cloud with live location on a map
  2. SOS button that sends live location via SMS to up to three contacts
  3. Automatic voice call during SOS so the receiver can listen to surroundings using the built-in microphone
  4. Web configuration portal to update WiFi credentials and API keys without reprogramming

Hardware Overview

The system is built using the XIAO ESP32-C3 as the main controller, SIM800L for GSM communication, and a GP-02 GNSS module for GPS data. A custom PCB is used to make the device compact and reliable.

Software and Cloud Setup

The project runs on C++ code that manages GPS and GSM communication, button handling, and memory. It is connected to Circuit Digest Cloud, where the device location can be tracked in real time on a map.

Supplies

79c567e4-6c9f-4a55-8d20-fd5f0a6d8ea9.png

In this project, we have used the following components:

  1. GP-02 GNSS module
  2. XIAO ESP32-C3
  3. SIM800L GSM module
  4. Side switch
  5. Pushbutton
  6. Header pins
  7. SMD microphone
  8. 0.1uF capacitor
  9. 100uF capacitor
  10. 1k resistor
  11. 10k resistor
  12. BC847 transistor
  13. Battery

Schematic & Explanation

sheet_1.png

The schematic focuses on creating an ultra-compact, battery-powered tracking device with built-in emergency features. All components are connected in a way that allows efficient handling of location data, communication, and power management.

XIAO ESP32-C3

  1. Acts as the main microcontroller. It is selected for its compact size and built-in battery charging capability.

SIM800L GSM module

  1. Connected to the ESP32-C3 using UART communication. It handles SMS, voice calls, and data transmission.

GP-02 GNSS module

  1. Also connected via UART. It provides accurate GPS location data to the ESP32-C3.
  2. Microphone
  3. Connected to the SIM800L module to enable audio during calls, allowing the receiver to hear the surroundings.

SOS button

  1. A pushbutton connected to a GPIO pin. When pressed, it sends the current location via SMS and initiates a voice call.

Configuration button

  1. Used to enter setup mode, where WiFi credentials, API keys, and contact numbers can be updated without reprogramming.

Power switch

  1. A side switch connected to the EN pin of the ESP32-C3. It controls power and ensures almost zero battery drain when the device is turned off.


PCB Design & Explanation

5d2a0f47-92b1-4556-bd3a-203bffc649ed.png
360759bf-4f75-4478-a69c-08e868535116.png
77a3106e-d1f8-4e01-a753-93efc0efd91e.png

The PCB is designed to make the tracker as compact as possible while properly handling power and signal requirements. Special attention is given to placement, power control, and signal reliability.

Component placement

  1. Both sides of the PCB are used to save space. The XIAO ESP32-C3 and SIM800L are placed on the top side, while the GP-02 GNSS module is placed on the bottom side. This reduces the overall size of the device.

Microphone and buttons

  1. The microphone is positioned in a way that it can clearly capture surrounding audio during a call. The SOS button is placed for easy and quick access in emergency situations, and the configuration button is positioned to avoid accidental presses.

Power management

  1. The side switch is connected to the EN pin of the XIAO ESP32-C3. When the switch is turned off, it pulls the EN pin low, completely shutting down the microcontroller. This ensures almost zero power consumption instead of just putting the device into sleep mode.

Antenna considerations

  1. Proper spacing is maintained between the GSM (SIM800L) and GPS (GP-02) modules to avoid signal interference. This is important for stable communication and accurate location tracking.

Design for manufacturing

  1. Before manufacturing, the PCB design is checked using DFM tools to ensure there are no issues like overlapping traces, insufficient spacing, or incorrect board outlines. This helps avoid errors during fabrication and improves reliability.

Sponsored by NEXTPCB: Your Trusted PCB & PCBA Partner:

NextPCB is a professional PCB fabrication and PCB assembly (PCBA) service provider, part of the Huaqiu Group.

They support:

  1. PCB prototyping and mass production
  2. Multilayer boards
  3. HDI boards
  4. Flexible and rigid-flex PCBs
  5. SMT assembly and turnkey PCBA solutions

Their DFM analysis tools help identify design issues before manufacturing, reducing errors and saving development time. Competitive pricing and scalable production make them suitable for students, hobbyists, startups, and professional hardware teams.

For this project, the Gerber files were uploaded, verified, and manufactured to achieve a clean, compact, and high-quality PCB finish.

Circuit Digest Cloud Setup

1st.png
2.png
3.png
4.png
5.png
6.png

This step connects your tracker to the cloud so you can view its location in real time on a map.

Account login

  1. Go to the Circuit Digest Cloud website and log in. You can sign in using your Google account for quick access.

Access dashboard

  1. After logging in, open the dashboard and go to the Geolinker GPS Visualizer section. Click on the view option to proceed.

Add device

  1. Go to the Devices tab and click on Add Device.
  2. Enter a device name (for example, Xiao Tracker). Make sure this name matches exactly with the name you will enter later in the device’s web configuration portal.
  3. You can also add the SIM number and IMEI number for reference, but this is optional.

Get API key

  1. Open the API Key section in the dashboard and copy your unique API key.
  2. This key is important and will be used in your device configuration to send data to the cloud.

Usage limits

  1. The GPS visualizer provides free usage up to 10,000 API calls.
  2. Other features like notifications may have monthly limits, so keep that in mind while using additional services.

Once this setup is complete, your device will be able to send location data to the cloud and display it on a live map.

Program Setup

The program setup is designed so that the device can be configured without editing the code every time. It uses internal storage and a web portal to make the process simple and flexible.

Initialize SPIFFS memory

  1. On startup, the ESP32-C3 initializes its internal flash storage (SPIFFS). This is used to store all configuration data.

Initialize GPS and GSM modules

  1. The GP-02 GNSS module and SIM800L GSM module are initialized so the device can start receiving location data and enable communication.

Configuration file (config.json)

  1. The system checks for a config.json file in memory. This file stores important details like API key, APN settings, SOS numbers, and data upload interval.

Web configuration portal

  1. If the config file is missing or the configuration button is held during startup, the device creates a WiFi access point. Users can connect using a phone or laptop and enter details like API keys and SOS numbers. These are then saved into the config file.

Initial SMS confirmation

  1. After successful setup, the device sends a startup SMS to the configured SOS numbers to confirm that it is online and working.

LED indications

  1. LEDs on the PCB are used to show device status. They indicate power, network connection, and activity like data transmission or SOS trigger.

Power behavior

  1. The device remains powered through the battery connected to the XIAO ESP32-C3. Efficient handling and deep-sleep logic ensure low power consumption during idle states.

Travel summary

  1. The tracker continuously collects location data and uploads it to the cloud. This data can be used to generate travel history and movement summaries on the platform.

SOS logic

The SOS feature is triggered by pressing and holding the SOS button for more than 5 seconds.

  1. The device immediately sends an SMS with a Google Maps link of the current location to up to three saved numbers
  2. At the same time, it makes a voice call to the primary SOS contact
  3. Once the call is answered, the receiver can listen to the surroundings using the built-in microphone
  4. Authorized numbers can also request location anytime by sending "send location", and the device replies with its current position


Conclusion

This project demonstrates how to build a compact, low-power GPS tracker with real-time tracking and emergency features without relying on subscription-based services. By combining the XIAO ESP32-C3, SIM800L, and GP-02 modules, the system provides a reliable and practical solution for location tracking and personal safety.

The device is not only capable of live tracking through the cloud but also adds an extra layer of security with the SOS feature, allowing instant alerts and real-time monitoring during emergencies.

There is still room for improvement. The design can be enhanced by adding a larger battery for longer usage, improving enclosure design for durability, and optimizing power consumption further. Additional features like geofencing, motion detection, or a mobile app interface can also make the system more advanced.

This tracker can be used in multiple real-world scenarios such as personal safety, vehicle tracking, child or elderly monitoring, and asset tracking. Its compact size and low power usage make it practical for everyday use.