An arduino gps tracker sim808 project is one of the most rewarding builds in the maker world — combining GPS positioning, GSM communication, and cloud mapping into a portable device you can slip into a vehicle, backpack, or any asset you want to track. The SIM808 module packs a complete GPS receiver and GSM/GPRS modem into a single affordable chip, making it the go-to choice for Indian makers building vehicle trackers, personal safety devices, and remote monitoring systems. This guide covers the complete build from wiring to SMS alerts and live Google Maps tracking.
Table of Contents
- Understanding the SIM808 Module
- Hardware and SIM Card Requirements
- Wiring the SIM808 to Arduino
- Essential AT Commands for SIM808
- Complete Arduino GPS Tracker Code
- SMS Location Alerts with Google Maps Link
- Live Tracking via GPRS and Google Maps
- Power Supply Design for Field Use
- Frequently Asked Questions
Understanding the SIM808 Module
The SIM808 is a quad-band GSM/GPRS + GPS module manufactured by SIMCom. It integrates:
- GPS receiver: 22-channel, -148 dBm sensitivity, NMEA 0183 protocol output
- GSM modem: Quad-band 850/900/1800/1900 MHz (works on Indian Airtel, Jio, Vi, BSNL networks)
- GPRS: Class 10, up to 85.6 kbps downlink — sufficient for sending GPS coordinates to a server
- Communication: AT command interface via UART (serial)
- Operating voltage: 3.4–4.4V (typically powered by a LiPo battery)
The module comes in two common breakout board formats: the standalone SIM808 breakout (requiring antenna connections), and the SIM808 shield for Arduino Uno/Mega that snaps directly onto the board. For beginners, the shield version is far easier to use.
Hardware and SIM Card Requirements
Component List
- Arduino Uno or Mega 2560
- SIM808 GSM+GPS module (breakout or shield)
- GPS antenna (active, 3.3V/5V, SMA or IPEX connector)
- GSM antenna (typically included with module)
- LiPo battery 3.7V 2000mAh+ (or 5V 2A regulated supply)
- SIM card (nano/micro/standard, depends on module socket)
- Jumper wires, small enclosure
SIM Card Requirements for India
Use a GSM-capable SIM card — specifically one that supports 2G networks. In India in 2024–25, Airtel and Vi (Vodafone-Idea) still maintain 2G networks. Jio does not operate a 2G network; Jio SIMs will NOT work with SIM808. BSNL 2G works in most regions. Ensure the SIM is activated with at least a basic recharge for SMS and GPRS data. A ₹19–₹29 recharge is typically sufficient for tracking use.
Antenna Placement
GPS signal reception is critically dependent on antenna placement. The GPS antenna must have a clear view of the sky — roof-mounted is ideal for vehicle trackers. Never operate the GPS module inside a metal enclosure without an external GPS antenna. The GSM antenna is less sensitive to placement but should not be coiled or bent sharply.
Wiring the SIM808 to Arduino
Power Connections (Critical)
The SIM808 is power-hungry during GSM transmission bursts — it can draw up to 2A instantaneously. The Arduino’s 5V/3.3V regulators cannot supply this. Always power the SIM808 from an independent power source:
- 3.7V LiPo battery directly to SIM808 VBAT and GND (most breakout boards have onboard LiPo charging)
- Or use a dedicated 4.0V regulated supply from a buck converter fed by a 12V vehicle battery
- Arduino powered separately from USB or its own 5V supply
- Connect GND of Arduino and SIM808 together (common ground)
UART Serial Connections (Arduino Uno)
Arduino Uno has only one hardware UART (pins 0 and 1), which is shared with USB. Use SoftwareSerial on other pins:
- SIM808 TX → Arduino D10 (SoftwareSerial RX)
- SIM808 RX → Arduino D11 (SoftwareSerial TX) via 1kΩ voltage divider (3.3V logic)
- Arduino GND → SIM808 GND
UART Serial Connections (Arduino Mega — Recommended)
- SIM808 TX → Arduino Mega Serial1 RX (Pin 19)
- SIM808 RX → Arduino Mega Serial1 TX (Pin 18)
- Arduino GND → SIM808 GND
Essential AT Commands for SIM808
The SIM808 is controlled entirely through AT commands sent over the serial port. Test these commands in Arduino’s Serial Monitor before writing your full sketch:
| Command | Function | Expected Response |
|---|---|---|
| AT | Test communication | OK |
| AT+CPIN? | Check SIM card status | +CPIN: READY |
| AT+CSQ | Signal quality (0-31) | +CSQ: 18,0 |
| AT+CREG? | Network registration status | +CREG: 0,1 |
| AT+CGNSPWR=1 | Power on GPS | OK |
| AT+CGNSINF | Get GPS fix info | +CGNSINF: 1,1,… |
| AT+CMGF=1 | Set SMS text mode | OK |
| AT+CMGS=”+91XXXXXXXXXX” | Send SMS to number | > (then type message + Ctrl+Z) |
Complete Arduino GPS Tracker Code
// Arduino GPS Tracker with SIM808
// Sends location via SMS with Google Maps link
// Compatible with Arduino Mega (uses Serial1 for SIM808)
#include <Arduino.h>
// For Arduino Uno, uncomment and use SoftwareSerial:
// #include <SoftwareSerial.h>
// SoftwareSerial sim808(10, 11); // RX, TX
// #define SIM808 sim808
#define SIM808 Serial1 // Arduino Mega: use hardware Serial1
// Configuration
const char* PHONE_NUMBER = "+919876543210"; // Your number with country code
const int GPS_POWER_PIN = 9; // If your board has GPS power control
const unsigned long UPDATE_INTERVAL = 30000; // Send location every 30 seconds
// GPS data
float latitude = 0;
float longitude = 0;
float speed_kmh = 0;
float altitude = 0;
bool gps_fixed = false;
void sendAT(String cmd, int waitMs = 1000) {
SIM808.println(cmd);
delay(waitMs);
while (SIM808.available()) {
Serial.write(SIM808.read());
}
}
bool parseGPS() {
SIM808.println("AT+CGNSINF");
delay(500);
String response = "";
unsigned long t = millis();
while (millis() - t < 2000) {
if (SIM808.available()) response += (char)SIM808.read();
}
if (response.indexOf("+CGNSINF:") == -1) return false;
// Parse: +CGNSINF: run,fix,datetime,lat,lon,alt,speed,...
int idx = response.indexOf("+CGNSINF:") + 9;
String data = response.substring(idx);
data.trim();
int fields[10];
int fieldIdx = 0;
int pos = 0;
String vals[10];
for (int i = 0; i < data.length() && fieldIdx < 10; i++) {
if (data[i] == ',') {
vals[fieldIdx++] = data.substring(pos, i);
pos = i + 1;
}
}
if (fieldIdx = UPDATE_INTERVAL) {
sendLocationSMS();
lastSend = millis();
}
delay(5000);
}
SMS Location Alerts with Google Maps Link
The code above sends a formatted SMS containing both raw coordinates and a clickable Google Maps link. When the recipient taps the link on their smartphone, it opens Google Maps at the exact tracker location. For vehicle tracking, send the SMS every 5–10 minutes to stay within typical prepaid data plan limits.
Geofence Alert
Add geofencing logic to trigger an alert when the tracker leaves a defined area. Calculate the distance from a home point using the Haversine formula and send an SMS if the distance exceeds your threshold:
float haversineDistance(float lat1, float lon1, float lat2, float lon2) {
const float R = 6371000; // Earth radius in metres
float dLat = radians(lat2 - lat1);
float dLon = radians(lon2 - lon1);
float a = sin(dLat/2) * sin(dLat/2) +
cos(radians(lat1)) * cos(radians(lat2)) *
sin(dLon/2) * sin(dLon/2);
return R * 2 * atan2(sqrt(a), sqrt(1-a));
}
// In loop:
float dist = haversineDistance(HOME_LAT, HOME_LON, latitude, longitude);
if (dist > 500) { // 500 metres geofence radius
sendLocationSMS(); // Alert!
}
Live Tracking via GPRS and Google Maps
For real-time live tracking (position updates every 10–30 seconds visible on a web map), you need a backend server to receive and store GPS coordinates. The SIM808 sends an HTTP POST request via GPRS to your server, which writes the coordinates to a database and serves them on a Google Maps JavaScript API embed.
Free backend options for Indian makers include:
- ThingSpeak: Free IoT platform supporting GPS data fields and map widgets. Send coordinates via HTTP GET.
- Traccar: Open-source GPS tracking server; self-host on a ₹200/month VPS. Supports SIM808’s OsmAnd protocol natively.
- IFTTT + Google Sheets: Send a webhook from the SIM808 to append location rows to a Google Sheet; view in Google My Maps.
Power Supply Design for Field Use
A tracker deployed in a vehicle or outdoors needs a robust power supply. Consider these strategies:
Vehicle 12V Power
Use a 12V to 5V DC-DC buck converter (LM2596 or similar) with at least 2A output rating. Connect to the vehicle’s permanent +12V circuit (not the ignition-switched line) so the tracker continues working when the engine is off.
Battery Backup
A 3.7V LiPo with a TP4056 charging module allows the tracker to run from the LiPo when vehicle power is disconnected. This is essential for anti-theft use — the tracker keeps reporting even after someone cuts the main power.
Sleep Mode for Power Saving
Use the SIM808’s sleep mode commands (AT+CSCLK=2) and Arduino’s deep sleep libraries to reduce power consumption between GPS transmissions. A tracker waking every 60 seconds and transmitting via SMS can run for weeks on a 2000 mAh LiPo.
Frequently Asked Questions
Will the SIM808 work with a Jio SIM card?
No. Reliance Jio operates exclusively on 4G LTE and VoLTE — there is no 2G network. The SIM808 is a 2G GSM module and will not connect to Jio’s network. Use Airtel, Vi (Vodafone-Idea), or BSNL SIM cards for 2G connectivity in India.
How long does it take to get a GPS fix?
Cold start (first fix after power-on with no cached data) typically takes 1–5 minutes outdoors with a clear sky view. Subsequent fixes (warm/hot start) take 15–45 seconds. Always wait for the GPS fix LED or +CGNSINF fix field to confirm positioning before relying on coordinates.
Can I track the device indoors?
Standard GPS does not work indoors. For indoor positioning, the SIM808 supports GSM cell-tower-based positioning (AT+CLBS) as a fallback — accuracy is 100–2000 metres but provides a rough location when GPS signal is unavailable.
How many SMS messages can I send per day?
Most prepaid Indian SIM cards allow 100 SMS per day. For higher-frequency tracking, use GPRS data transmission (much cheaper) instead of SMS. A typical GPS coordinate packet is under 100 bytes — you can send thousands of updates per day for a few rupees of data.
Is it legal to track a vehicle in India?
Vehicle tracking with owner consent is legal. The Motor Vehicles (Amendment) Act 2019 mandates GPS trackers in commercial vehicles. For personal vehicles, you must have the owner’s consent. Tracking someone’s vehicle without consent is a criminal offence under the IT Act.
Ready to start building? Browse our complete Arduino project components at Zbotic.in — including Arduino boards, sensors, and development tools delivered across India.
Add comment