Most DIY GPS trackers follow the same pattern. You add a GPS module to a microcontroller, then bolt on a GSM module and a SIM card so it can push location data somewhere. It works, but it adds cost, wiring, and one more thing that can go wrong.
This project takes a different route. It uses a Seeed Studio XIAO ESP32-S3 and a Neo-6M GPS module, but instead of cellular data, it sends coordinates over WiFi to a cloud service called GeoLinker. No SIM card. No GSM board hanging off the side. Just WiFi and HTTPS.
What makes this one slightly more interesting is the addition of a geofence with SMS alerts. So it is not just about watching a dot move on a map. It reacts when that dot crosses a boundary.
What the System Actually Does
In this GPS Tracker with Seeed Studio XIAO ESP32-S3 project , the Neo-6M listens to satellites and spits out NMEA sentences over UART at 9600 baud. The XIAO ESP32-S3 reads that stream through GPIO 44 and 43, parses it using TinyGPSPlus, and extracts latitude and longitude.
Once valid coordinates are available, the ESP32 sends them to the GeoLinker cloud every 15 seconds. That interval is defined in code and can be changed, but in its current state it is rigidly timed. Every 15 seconds, a push. No dynamic adjustment.
GeoLinker stores each data point with a timestamp. On the map interface, you see the path forming gradually. It feels steady. Predictable. Every few seconds, a new point appears and the route extends.
The project also defines a fixed home latitude and longitude in the firmware. That becomes the center of a circular geofence. The code calculates the distance between the current location and the home coordinates using the Haversine formula. If that distance exceeds 50 meters, an SMS is triggered through the Circuit Digest Cloud API.
It is simple logic. Distance greater than 50 and alert not yet sent. Send SMS. Then lock it. When the tracker returns within 50 meters, reset the alert flag. Leave again and it will send another SMS.
There is no smoothing. No hysteresis. Just a hard threshold. That makes the behavior very clear when testing.
Hardware Setup in Practice
The wiring is straightforward. The Neo-6M gets 5V and GND from the XIAO ESP32-S3. TX goes to RX. RX goes to TX. An external antenna connects to the GPS module.
On a breadboard, it looks clean and minimal. The XIAO is tiny, and the Neo-6M sits beside it with the patch antenna attached.
When powered over USB, the board boots, connects to WiFi, and begins waiting for GPS lock. Indoors, the module struggles a bit. Once moved near a window or outside, it stabilizes and starts producing consistent coordinates.
The antenna matters. Without it, lock time increases and readings fluctuate more. With it connected, the tracker feels more reliable.
Cloud Setup and API Keys
Before anything works, you need an API key from the Circuit Digest Cloud. That key is used both for pushing GPS data and for sending SMS alerts.
The setup process is manual. You create an account, log in, generate the key, and copy it into the firmware. You also link a mobile number for SMS alerts.
There are usage limits. Ten thousand GPS data points per API key. One hundred SMS messages. Once you hit those, it stops. So while the system works smoothly, it is not unlimited. That becomes important if you reduce the update interval aggressively.
How the Code Behaves
The firmware pulls together GeoLinker, TinyGPSPlus, and WiFiClientSecure. In setup, it initializes serial communication with the GPS module and connects to WiFi.
The main loop does three things continuously. It processes GPS data from the serial buffer. It runs the GeoLinker loop for cloud communication and offline buffering. And it checks the geofence condition.
The offline buffering is one of the more practical features. If WiFi drops, coordinates are stored locally. When the connection comes back, buffered data uploads first, then real time updates resume.
During testing, turning off the hotspot simulates a network drop. The tracker continues running. No panic, no resets. When WiFi returns, the map fills in the missing segment. It feels seamless from the user side.
The SMS function builds a JSON payload with the mobile number and coordinates, then sends it via HTTPS POST. The client is set to insecure mode, which simplifies certificate handling but is not hardened security. It works, but it is not enterprise-grade TLS management.
Real World Testing
Using a phone hotspot as the internet source makes testing easy. Power the ESP32 from USB, enable hotspot, and it connects almost instantly.
On the GeoLinker map, you see the starting point appear. Then another point 15 seconds later. Then another. Walking around the block, the route forms like a dotted trail.
Leaving the defined 50 meter boundary triggers the SMS. The message includes the latitude and longitude at the moment of breach. It feels immediate enough for a hobby project. Not sub-second fast, but quick.
Re-entering the boundary resets the system. Leave again and it triggers again. The behavior is binary. Inside or outside. There is no graduated warning zone.
At the end of a longer walk or drive, the map shows the full route history. You can see exactly how far you traveled and where you turned. The visualization is simple but clear.
Limitations You Notice
The geofence is circular and centered on a single hardcoded point. If you want multiple zones, you need to modify the firmware.
The 50 meter threshold is fixed unless changed in code. There is no runtime adjustment from the cloud side.
The update interval is static. If you set it to 1 second, you will burn through your data point quota quickly. If you set it to 60 seconds, your route becomes coarse and segmented.
Also, the system depends entirely on WiFi coverage. Once you leave hotspot range or available networks, it goes into offline buffer mode. That is fine for short gaps, but it is not a replacement for GSM-based trackers in wide area deployments.
The SMS limit of 100 per API key also means you cannot treat this as a high-frequency alert system.
How It Feels Overall
The whole system feels lightweight. No bulky GSM module. No SIM card management. Just GPS, WiFi, and cloud.
When it works, it works smoothly. The 15 second rhythm becomes familiar. The geofence alert is clear and direct. Cross the line, get a text.
It is not trying to be a commercial fleet tracker. It is a focused DIY build that demonstrates real time mapping, offline buffering, and event-based SMS alerts using a compact ESP32 board.
And for students or hobbyists experimenting with location tracking and geofencing through an ESP32 project, it hits that sweet spot between simple and functional.
Sign in to leave a comment.