Skip to content

About

IoT-based wearable emergency SOS and GPS tracking device using ESP32, SIM800L, and Neo-6M GPS.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Women Safety Wearable Device ๐Ÿšจ

Wearable Demo

ESP32 C++ IoT GPS GSM

An IoT-based wearable emergency alert system. Press one button โ€” ESP32 fetches your live GPS coordinates and sends them as a clickable Google Maps link via SMS to predefined contacts. No smartphone. No internet. No app.

SOS in <2s, SMS delivery in 8โ€“12s over 2G GSM โ€” no smartphone or internet required. Resolved SIM800L 2A current spike with AMS1117 + 1000ยตF.


๐ŸŒ Live Demo

๐Ÿ”— Open Website


๐Ÿ“Š Performance Results

Metric Result
GPS Accuracy (outdoor, open sky) 2.5โ€“5 meters
SMS Delivery Time 8โ€“12 seconds (good network)
SOS Response Time < 2 seconds (interrupt-driven)
Battery Life (GPS + GSM active) ~6 hours continuous
Cancel Window After SOS Press 10 seconds
Networks Required 2G GSM only โ€” no internet needed

โš™๏ธ System Architecture

Layer Component Role
Input SOS Push Button Interrupt-driven trigger (GPIO4, active LOW)
Location Neo-6M GPS NMEA sentence parsing via TinyGPS++
Processing ESP32 / Arduino Coordinate formatting, SMS message assembly
Communication SIM800L GSM AT command SMS transmission to contacts
Power Li-ion + AMS1117 Regulated 4V supply for GSM stability

๐Ÿš€ Features

  • ๐Ÿšจ One-click SOS emergency alert
  • ๐Ÿ“ Real-time GPS location tracking (2.5โ€“5m accuracy)
  • ๐Ÿ“ฉ SMS alert with clickable Google Maps link
  • โฑ๏ธ 10-second cancel window to avoid false triggers
  • ๐Ÿ“ก Works on 2G GSM โ€” no internet required
  • ๐Ÿ”‹ ~6 hours battery life
  • ๐Ÿ’ป Web dashboard via Bluetooth (ESP32 version)
  • ๐Ÿ”’ Interrupt-driven firmware for instant response

๐Ÿ› ๏ธ Hardware Components

Component Quantity Purpose
ESP32-WROOM-32 1 Main MCU โ€” Wi-Fi, Bluetooth, GPIO
SIM800L GSM Module 1 Sends SMS via 2G network
Neo-6M GPS Module 1 Real-time latitude/longitude
SOS Push Button 1 Emergency trigger (active LOW, pull-up)
Cancel Button 1 Cancel SOS within 10-second window
Li-ion Battery (3.7V) 1 Portable power
AMS1117 Voltage Regulator 1 Steps 5V โ†’ 4V for SIM800L stability
Capacitor (1000ยตF) 1 Buffers GSM current spikes
Perfboard 1 Final assembly

๐Ÿ”Œ Pin Connections

ESP32 + Bluetooth Version

ESP32 Pin Connected To
GPIO16 (RX2) GPS TX (Neo-6M)
GPIO17 (TX2) GPS RX (Neo-6M)
GPIO4 SOS Button (INPUT_PULLUP, active LOW)

Arduino + SIM800L Version

Arduino Pin Connected To
D2 SOS Button (INPUT_PULLUP)
D3 Cancel Button (INPUT_PULLUP)
D7 (RX) GSM TX (SIM800L)
D8 (TX) GSM RX (SIM800L)
D4 (RX) GPS TX (Neo-6M)
D5 (TX) GPS RX (Neo-6M)

๐Ÿ’พ Firmware Overview

Two firmware variants are included:

sim800l-code/ โ€” Arduino + SIM800L (SMS version)

  • Interrupt-driven SOS button with 10-second cancel window
  • Sends Google Maps link via SMS using AT commands
  • Uses TinyGPS++ for NMEA sentence parsing
  • Handles GPS cold start with cached last-known-location fallback

esp32-code/ โ€” ESP32 + Bluetooth (web dashboard version)

  • Broadcasts GPS coordinates every 10 seconds via Bluetooth Classic
  • On SOS press: sends SOS,lat,lng to paired browser
  • 50ms hardware debounce on SOS button
  • Uses BluetoothSerial + Hardware UART2 for GPS

โ–ถ๏ธ Setup Instructions

Flash the SMS Version (SIM800L)

  1. Open sim800l-code/ in Arduino IDE
  2. Edit phone_number[] with your emergency contact number
  3. Select board: Arduino Uno/Nano
  4. Upload via Arduino IDE

Flash the Bluetooth + Web Version (ESP32)

  1. Open esp32-code/ in Arduino IDE
  2. Select board: ESP32 Dev Module
  3. Upload via Arduino IDE
  4. Open index.html in Chrome
  5. Click Connect ESP32 โ†’ pair with WearableSOS
  6. Add emergency contacts โ€” live location appears on map

๐Ÿงช How It Works

  1. On power-up, ESP32 initialises GPS and GSM modules
  2. GPS streams NMEA sentences continuously; ESP32 caches latest valid fix
  3. SOS button pressed โ†’ GPIO interrupt fires instantly
  4. 10-second cancel window starts (press cancel button to abort)
  5. After 10 seconds without cancel โ†’ ESP32 formats SMS: "SOS ALERT! Location: https://maps.google.com/?q=lat,lng"
  6. SIM800L sends SMS via AT commands to predefined contact
  7. Recipient clicks Google Maps link โ†’ sees exact location

๐Ÿ“ท Project Images

Wearable Demonstration

Wearable Demo

Full System Overview

Full System

Hardware Prototype

Hardware Prototype

ESP32 Prototype

ESP32 Prototype

Hardware Closeup

Hardware Closeup


๐Ÿ”ง Technical Challenges & Solutions

UART conflict between GPS and GSM modules Both Neo-6M and SIM800L use UART. Running both simultaneously on the same bus caused data corruption and garbled AT command responses. Solved using SoftwareSerial with carefully timed sequential reads โ€” GPS parses continuously in the main loop, GSM transmits only on SOS trigger.

SIM800L voltage instability The module requires exactly 4.0V ยฑ0.2V but draws ~2A peaks during SMS transmission. These spikes caused ESP32 to reset mid-transmission. Fixed by adding an AMS1117 voltage regulator and a 1000ยตF capacitor on the SIM800L power line to buffer the current surge.

GPS cold start delay First satellite fix after power-on takes 30โ€“60 seconds outdoors. If SOS is triggered before a fresh fix is acquired, the system falls back to the last cached coordinates so the SMS still sends with a location rather than failing silently.

Button debouncing false triggers Mechanical switch contact bounce generated multiple interrupt triggers on a single press. Fixed with both hardware (pull-up resistor keeping pin HIGH at rest) and software (50ms debounce delay before re-arming the interrupt).

Indoor GPS accuracy degradation GPS accuracy drops to 10โ€“15 metre error range indoors due to signal attenuation. Partially mitigated with an external patch antenna. Full indoor accuracy would require supplementary Wi-Fi or BLE positioning โ€” noted as future scope.


๐Ÿ“‚ Repository Structure

women-safety-wearable-device/
โ”‚
โ”œโ”€โ”€ esp32-code/
โ”‚   โ””โ”€โ”€ esp32_bluetooth.ino      โ† ESP32 Bluetooth + GPS firmware
โ”‚
โ”œโ”€โ”€ sim800l-code/
โ”‚   โ””โ”€โ”€ sim800l_gsm.ino          โ† Arduino + SIM800L SMS firmware
โ”‚
โ”œโ”€โ”€ images/                      โ† Hardware photos
โ”‚
โ”œโ”€โ”€ index.html                   โ† Web dashboard (Bluetooth + Mapbox)
โ”œโ”€โ”€ script.js
โ”œโ”€โ”€ style.css
โ””โ”€โ”€ README.md

๐Ÿ”ฎ Future Scope

  • Miniaturize onto custom PCB โ€” wristband/pendant form factor
  • Accelerometer-based automatic fall detection (no button press needed)
  • Firebase/Blynk cloud integration for live tracking dashboard
  • Two-way voice call via SIM800L
  • Multi-contact SMS blast
  • Panic buzzer + LED confirmation on SOS trigger
  • ML-based distress movement pattern detection

๐Ÿ‘ฉโ€๐Ÿ’ป Team

Name GitHub
Diya Sharma @diyasharma22
Eipshita Basuli @riiverse
Richa Datta @richaaaa2005

Institution: VIT Bhopal University โ€” B.Tech ECE (AI & Cybernetics)


๐Ÿ“œ License

MIT License โ€” Open for learning, academic reference, and innovation.

About

IoT-based wearable emergency SOS and GPS tracking device using ESP32, SIM800L, and Neo-6M GPS.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors