Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home IoT & Smart Home

How to Use GSM/GPS Module for IoT Tracking

How to Use GSM/GPS Module for IoT Tracking

March 11, 2026 /Posted byJayesh Jain / 0

Building a real-time vehicle tracker or remote sensor with GSM and GPS modules on Arduino is one of the most practical IoT projects you can undertake. Unlike WiFi-based solutions, a GSM+GPS tracker works anywhere in India with mobile network coverage – your car, courier package, or livestock on a remote farm. This comprehensive tutorial covers the SIM800L GSM module, the NEO-6M GPS module, wiring both to an Arduino or ESP32, sending coordinates via SMS, uploading data via GPRS to a cloud server, and solving the real-world challenges like power spikes and Indian SIM card requirements.

Table of Contents

  • GSM Module Basics: SIM800L and SIM800C
  • GPS Module Basics: NEO-6M
  • Wiring GSM + GPS to Arduino/ESP32
  • Sending GPS Coordinates via SMS
  • Uploading Data via GPRS to a Server
  • Building a Vehicle Tracker
  • Power Considerations: SIM800L Current Spikes
  • Indian SIM Card Requirements
  • Antenna Placement
  • NMEA Data Parsing
  • Combining with a Cloud Platform
  • FAQ

GSM Module Basics: SIM800L and SIM800C

The SIM800L is a compact GSM/GPRS module based on SIMCom’s SIM800L chip. It supports quad-band GSM (850/900/1800/1900 MHz), which covers all Indian operator frequencies. Key capabilities include:

  • Voice calls and SMS (send and receive)
  • GPRS Class 10 data (85.6 kbps download, 42.8 kbps upload) – think of it as 2G internet
  • TCP/IP stack built into the module (you send AT commands to open sockets)
  • Operating voltage: 3.4-4.4V (important – it is NOT 5V tolerant and NOT 3.3V directly; it needs 3.7-4.2V)

The SIM800C is an improved variant with better power management and a slightly larger footprint, available as a standalone modem board with onboard antenna and SMA connector.

🛒 Recommended: TTGO T-Call V1.4 ESP32 + SIM800L Module – Integrates ESP32 and SIM800L on one PCB with onboard SIM slot and antenna – the cleanest all-in-one solution for ESP32-based GSM IoT projects.
🛒 Recommended: GSM SIM800C Modem with Antenna – Complete SIM800C modem with onboard antenna, SIM slot, and UART interface. Plug-and-play GSM connectivity for Arduino or ESP32 projects.

GPS Module Basics: NEO-6M

The u-blox NEO-6M is the most popular entry-level GPS module for maker projects. It provides:

  • Position accuracy: 2.5 m CEP (Circular Error Probable) in open sky
  • Cold start time to first fix (TTFF): 27 seconds typical with no almanac
  • Hot start (has almanac): 1 second
  • Update rate: 1 Hz standard (5 Hz max)
  • Output: Standard NMEA 0183 serial protocol at 9600 baud
  • Onboard flash memory to save almanac data (speeds up future fixes)
  • Operating voltage: 3.3V (some breakout boards have a 3.3V regulator for 5V input)

The NEO-6M outputs sentences like and which contain latitude, longitude, speed, and time. You parse these to extract location data.

🛒 Recommended: GPS NEO-6M Module for Arduino/STM32 – Breakout board with onboard antenna, EEPROM for almanac storage, and 4-pin header for direct Arduino/ESP32 connection.

Wiring GSM + GPS to Arduino/ESP32

Both modules communicate via UART serial. Since Arduino Uno has only one hardware UART, use SoftwareSerial for one of them. ESP32 is better suited here because it has three hardware UART ports.

Connections (ESP32 recommended):

// NEO-6M GPS Module
GPS TX  --> ESP32 GPIO 16 (UART2 RX)
GPS RX  --> ESP32 GPIO 17 (UART2 TX)
GPS VCC --> 3.3V
GPS GND --> GND

// SIM800L GSM Module
SIM800L TX  --> ESP32 GPIO 26 (use SoftwareSerial or UART1)
SIM800L RX  --> ESP32 GPIO 27
SIM800L VCC --> 3.7-4.2V (from LiPo or buck converter - see power section!)
SIM800L GND --> GND (common with ESP32 GND)
SIM800L RST --> ESP32 GPIO 5 (optional, for hardware reset)

For Arduino Uno (with SoftwareSerial):

GPS TX  --> Arduino Pin 4 (SoftwareSerial RX)
GPS RX  --> Arduino Pin 3 (SoftwareSerial TX)
SIM800L TX --> Arduino Pin 8 (another SoftwareSerial)
SIM800L RX --> Arduino Pin 9
// Note: SIM800L VCC cannot come from Arduino 5V pin - too low current!

Sending GPS Coordinates via SMS

This is the simplest tracking application: call or SMS the tracker, and it replies with a Google Maps link containing its current location.

#include <HardwareSerial.h>
#include <TinyGPS++.h>   // Library Manager: TinyGPS++ by Mikal Hart

HardwareSerial gpsSerial(2);  // UART2 for GPS
HardwareSerial simSerial(1);  // UART1 for SIM800L

TinyGPSPlus gps;
String ownerPhone = "+919876543210"; // Your phone number

void sendSMS(String phone, String message) {
  simSerial.println("AT+CMGF=1"); // Text mode
  delay(500);
  simSerial.println("AT+CMGS="" + phone + """);
  delay(500);
  simSerial.print(message);
  simSerial.write(26); // Ctrl+Z to send
  delay(3000);
}

void setup() {
  Serial.begin(115200);
  gpsSerial.begin(9600, SERIAL_8N1, 16, 17);
  simSerial.begin(9600, SERIAL_8N1, 26, 27);
  delay(3000); // Wait for SIM800L to register on network
  simSerial.println("AT"); // Basic test
  delay(1000);
}

void loop() {
  while (gpsSerial.available()) gps.encode(gpsSerial.read());

  if (gps.location.isValid() && gps.location.isUpdated()) {
    float lat = gps.location.lat();
    float lng = gps.location.lng();
    String link = "https://maps.google.com/?q=" + String(lat, 6) + "," + String(lng, 6);
    sendSMS(ownerPhone, "Tracker Location: " + link);
    delay(60000); // Send every 1 minute
  }
}

To trigger on demand, add code to read incoming SMS using AT+CNMI=2,2,0,0,0 (new message indication) and respond only when you send the word “LOCATE” to the SIM card number.

Uploading Data via GPRS to a Server

For continuous tracking with a live map, use GPRS to send GPS data to a server. The SIM800L has a built-in TCP/IP stack controlled by AT commands:

void gprsConnect(String apn) {
  simSerial.println("AT+SAPBR=3,1,"Contype","GPRS"");
  delay(500);
  simSerial.println("AT+SAPBR=3,1,"APN","" + apn + """);
  delay(500);
  simSerial.println("AT+SAPBR=1,1");  // Open bearer
  delay(3000);
  simSerial.println("AT+HTTPINIT");
  delay(500);
}

void sendGPStoServer(float lat, float lng) {
  String url = "http://your-server.com/api/track?lat=" + String(lat, 6)
             + "&lng=" + String(lng, 6)
             + "&device=tracker1";

  simSerial.println("AT+HTTPPARA="URL","" + url + """);
  delay(500);
  simSerial.println("AT+HTTPACTION=0"); // GET request
  delay(5000);
  // Parse response with AT+HTTPREAD
}

For the server, you can use a free tier on any cloud provider. A simple PHP script that stores lat/lng in a database and serves a Leaflet.js map is sufficient for basic tracking. Services like ThingsBoard, Traccar (open source), and GPSLogger platforms provide ready-made tracking backends.

Building a Vehicle Tracker

A complete vehicle tracker needs these components working together:

  1. GPS fix acquisition: Wait for a valid GPS fix (can take up to 60 seconds on cold start in an enclosed vehicle). Use the LED on the NEO-6M board – it blinks once per second when a fix is acquired.
  2. Ignition detection: Optionally detect vehicle ignition by reading 12V from the ignition wire through a voltage divider to an ADC pin. Start tracking only when the engine is on.
  3. Geofence alerts: Calculate distance from a home/office location using the Haversine formula. Send an SMS if the vehicle leaves the geofence radius.
  4. Data logging: If GPRS is unavailable (tunnel, underground parking), buffer GPS tracks in EEPROM or SPIFFS and upload when connectivity is restored.
  5. Power management: When parked, reduce GPS update rate to 0.1 Hz and SIM800L to sleep mode to save battery.
🛒 Recommended: NEO-M8N GPS Module with Compass – Upgraded M8N chip with 10x better satellite tracking (72 channels), magnetometer, and faster time-to-fix. Ideal for precision vehicle or drone tracking projects.

Power Considerations: SIM800L Current Spikes

This is the most common reason SIM800L projects fail. The SIM800L can draw up to 2A peak current during GSM transmission bursts (every 4.6 ms). Most 3.3V regulators on Arduino boards can only supply 150-800 mA continuously and cannot handle these spikes. Symptoms: the module resets randomly, sends incomplete AT command responses, or fails to register on the network.

Solutions:

  • Use a dedicated 3.7V LiPo battery for SIM800L: Connect the SIM800L VCC directly to a 3.7V LiPo cell (3.4-4.2V range is perfect) with a beefy ground connection. The LiPo can easily source 2A+.
  • Add a bulk capacitor: Place a 1000-4700 uF electrolytic capacitor (6.3V rating) across the SIM800L VCC and GND pins as close to the module as possible. This smooths the current spikes.
  • Use a buck converter: A DC-DC step-down module (like XL4016) set to 4.0V with a high-current input (12V car battery for vehicle trackers) provides stable supply.
  • TTGO T-Call board: This all-in-one ESP32+SIM800L board solves the power problem by design – use it for the easiest setup.

Indian SIM Card Requirements

For SIM800L and SIM800C modules to work in India:

  • SIM size: These modules use a standard/mini SIM (2FF, the large one). If your SIM is micro or nano, use a SIM adapter.
  • Operator compatibility: All major operators work – Jio, Airtel, Vi (Vodafone-Idea), BSNL. Jio is VoLTE-only (4G voice) so SMS works but voice calls may not on 2G-only modules like SIM800L. Airtel and Vi still maintain 2G networks ideal for SIM800L.
  • APN settings: Required for GPRS data:
    • Airtel: APN = airtelgprs.com
    • Jio: APN = jionet
    • Vi: APN = portalnmms
    • BSNL: APN = bsnlnet
  • Data plan: Get a basic 2G/GPRS data pack or use any active data plan – SIM800L uses standard GPRS which is supported by all plans.
  • SIM registration: Use your Aadhaar-linked SIM. Unregistered SIMs will not work. Outgoing SMS may need to be enabled – check with your operator if SMS fails.

Antenna Placement

GPS antenna: The NEO-6M has a small ceramic patch antenna on the module itself. It must have a clear view of the sky – GPS signals (1575.42 MHz) do not penetrate vehicle metal roofs or concrete walls. For a car tracker, mount the module on the dashboard near the windshield or use an active external GPS antenna (SMA connector) routed to the roof. GPS time to first fix degrades significantly inside buildings.

GSM antenna: The SIM800L module typically has a small spring or wire antenna. For better range and reliability, replace with a proper GSM rubber duck antenna (SMA connector). In a vehicle, mount the antenna away from the ignition system to minimise interference. The TTGO T-Call board and SIM800C modem both include proper external antennas.

NMEA Data Parsing

GPS modules output NMEA 0183 sentences over serial. The two most useful for tracking are:

//  - Recommended Minimum Sentence (position + speed + time)
,123519,A,1849.1234,N,07306.5678,E,0.00,054.7,191024,003.1,W*6A
//       time  status lat        N/S  lon        E/W speed course date  mag var

//  - Fix data (position + altitude + satellites)
,123519,1849.1234,N,07306.5678,E,1,08,0.9,545.4,M,46.9,M,,*47
//      time   lat        N/S lon        E/W fix sat  hdop alt

The TinyGPS++ library parses all NMEA sentences automatically. Just feed it serial bytes and query the parsed fields:

TinyGPSPlus gps;
// In loop(), feed GPS bytes:
while (gpsSerial.available()) gps.encode(gpsSerial.read());

// Then query:
float lat   = gps.location.lat();      // e.g. 18.8204
float lng   = gps.location.lng();      // e.g. 73.1098
float speed = gps.speed.kmph();        // Speed in km/h
float alt   = gps.altitude.meters();   // Altitude in metres
int   sats  = gps.satellites.value();  // Number of satellites
// Time (UTC):
int hour = gps.time.hour();   // Add 5.5 for IST
int min  = gps.time.minute();

Remember to convert UTC to IST by adding 5 hours 30 minutes. Store the offset as 5 * 3600 + 30 * 60 = 19800 seconds and add it to the Unix timestamp.

Combining with a Cloud Platform for Real-Time Tracking

For a professional-grade tracking system, connect your GPRS data upload to one of these platforms:

  • Traccar (self-hosted, free): Open-source GPS tracking platform. Install on any VPS. Supports 170+ device protocols. Use the OsmAnd protocol for easy HTTP-based position upload from SIM800L.
  • ThingsBoard (free community edition): Full IoT platform with live map widget, alerts, and data export. Send GPS data as JSON via MQTT over GPRS.
  • Google Maps Platform: Build a custom tracking page with Maps JavaScript API. Store positions in Firestore (free tier: 50,000 reads/day) and display live markers on a map embedded in a webpage.
  • WhatsApp alerts: Use CallMeBot API (free WhatsApp message API for personal use) to send GPS links directly to your WhatsApp. Much more convenient than SMS for most users.

Frequently Asked Questions

Q: Why is my SIM800L not registering on the network?

The most common causes are: (1) insufficient power supply – the module resets during transmission; add a 1000-4700 uF capacitor and use a dedicated 4V supply; (2) SIM card not inserted properly – the spring contacts are fragile; (3) no 2G coverage – check if your area has GSM 900/1800 MHz coverage (Airtel/Vi work best for 2G in India); (4) SIM not activated for data/SMS – contact your operator.

Q: How long does the NEO-6M take to get a GPS fix indoors?

Typically it cannot get a reliable fix indoors. GPS signals are extremely weak (below -130 dBm) and concrete/metal roofs block them almost completely. Place the module near a window or use an external active antenna on the roof. Outdoors, cold start is 30-60 seconds, warm start (almanac from previous session) is 5-15 seconds, and hot start is under 2 seconds.

Q: Can I use SIM800L and SIM800C with Jio SIM?

Jio is a 4G/VoLTE-only network – they shut down their 2G network. The SIM800L and SIM800C only support 2G (GPRS/EDGE). Therefore, Jio SIMs will NOT work for data/calls on SIM800L. Use Airtel, Vi, or BSNL which still maintain 2G/GSM networks across India as of 2026.

Q: What is the difference between NEO-6M and NEO-M8N?

The NEO-M8N is a significantly newer and more capable GPS chip. It supports multiple GNSS systems simultaneously (GPS + GLONASS + BeiDou + Galileo vs GPS-only on NEO-6M), has 72 tracking channels (vs 16 for NEO-6M), achieves 2.5 m accuracy in optimal conditions, and includes an onboard compass (HMC5883L) on the module from Zbotic.in. The M8N achieves first fix in a fraction of the time and is much more reliable in urban canyons. Choose M8N for any serious project.

Q: Can the tracker work without internet (no GPRS plan)?

Yes – the SMS mode works without a data plan. Your tracker can send coordinates as SMS messages to your phone number. SMS is billed per message (or included in your plan) and works even in areas with only 2G voice coverage. SMS-based tracking is ideal as a fallback when GPRS is unavailable.

Build Your IoT Project

Shop ESP32, sensors, and wireless modules at Zbotic.in – fast shipping across India.

Browse IoT Components →

Tags: Arduino, GPS, GSM, iot, NEO-6M, SIM800L, tracking
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Robotic Arm DIY Guide: Servo-B...
blog robotic arm diy guide servo based manipulator 594574
blog best robot chassis platforms for diy projects 594577
Best Robot Chassis & Platf...

Related posts

Svg%3E
Read more

IoT Home Insurance Sensor Kit: Leak, Smoke, and Motion

April 1, 2026 0
Table of Contents IoT and Home Insurance Water Leak Detection Smoke and Fire Detection Motion and Intrusion Sensing Building the... Continue reading
Svg%3E
Read more

IoT Pet Tracker: GPS Collar with Geofencing Alerts

April 1, 2026 0
Table of Contents Introduction and Overview Hardware Components Required GPS Module Integration with ESP32 Cloud Platform Setup Real-Time Tracking Dashboard... Continue reading
Svg%3E
Read more

IoT Aquaponics Controller: Fish and Plant Automation

April 1, 2026 0
Table of Contents The Water Monitoring Challenge in India Sensor Technologies for Water Building the Sensor Node Data Transmission and... Continue reading
Svg%3E
Read more

IoT Composting Monitor: Temperature and Moisture Tracking

April 1, 2026 0
Table of Contents Why Temperature Monitoring Matters Sensor Selection Guide Hardware Assembly and Wiring Firmware Development Cloud Data Logging Alert... Continue reading
Svg%3E
Read more

IoT Beehive Monitor: Weight, Temperature, and Humidity

April 1, 2026 0
Table of Contents Why Monitor Beehives Weight Measurement System Temperature and Humidity Sensing Building the Monitor Data Analysis for Bee... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now