Women safety device using esp32

Smart Women Safety Device Project for Kids | ESP32 Arduino Robotics
Safety Tech Project

Build a Smart Safety Device
That Can Save Lives 🛡️

Press one button → your phone gets your GPS location → a loud alarm goes off. Learn to build this real-world safety gadget using ESP32!

🎓 Ages 12–17
⏱️ About 3 Hours
🔧 Intermediate
💰 ₹800–₹1200
SOS
The Big Idea

How does this safety device work? 🧠

Imagine your friend is in trouble and needs help fast. She presses one button on this small wearable gadget. Instantly, the device does three things at the same time — it screams loudly with a buzzer, lights up a red warning LED, and sends a text message with her exact GPS location to a trusted person's phone.

The "brain" of our device is an ESP32 — a powerful little microcontroller with built-in Wi-Fi and Bluetooth. It talks to a GPS module (to find location) and a GSM module (to send SMS messages).

🔴

Button Pressed

Person presses the panic button

📡

GPS Locates

GPS module finds latitude and longitude

📲

SMS Sent

GSM sends location SMS to trusted number

🔊

Alarm Sounds

Buzzer screams to scare away danger

🚨

LED Flashes

Red LED blinks to signal distress

What It Can Do

Key features of our safety device ✨

🆘 Emergency

One-Button SOS

Hold the panic button for 2 seconds to trigger everything automatically — no typing needed.

📍 Location

Real GPS Tracking

The NEO-6M GPS module gives real latitude and longitude coordinates accurate to within 3 metres!

📱 Alert

SMS to 3 Numbers

Sends a Google Maps link with location to up to 3 trusted phone numbers instantly.

🔋 Portable

Battery Powered

Runs on an 18650 rechargeable battery. Lasts 6–8 hours on a full charge.

Shopping List

Components you need 🛒

Get these parts from your local electronics shop or online (Amazon, Robu.in, Flipkart). Total cost: roughly ₹800–₹1200.

1
ESP32 Dev Board
The brain — dual-core with Wi-Fi/BT
2
NEO-6M GPS Module
Finds real-world location via satellites
3
SIM800L GSM Module
Sends SMS using a SIM card
4
Active Piezo Buzzer
Makes the loud alarm sound
5
Red LED
Flashes to signal SOS
6
Push Button (Momentary)
The panic button — waterproof if possible
7
18650 Li-ion Battery
Power source — 3.7V, 2000–3000 mAh
8
TP4056 Battery Charger
Safely charges the 18650 battery
9
1K & 220Ω Resistors
Protect components from too much current
10
Small Nano SIM Card
Any active prepaid SIM for the GSM module
11
Breadboard + Jumper Wires
For connecting everything together
12
Small Project Box
To house the device (optional but nice!)
💡 SIM Card tip: Use a Jio or Airtel prepaid SIM. Make sure it has balance for outgoing SMS. Insert the SIM into the SIM800L module before powering on.
Circuit Design

How to connect everything 🔌

The circuit diagram below shows all connections. Take your time — double-check every wire before turning it on!

Smart Women Safety Device Circuit Diagram ESP32 Dev Board RX2(16) TX2(17) RX1(D4) TX1(D5) D12 → D13 → ← D2 (BTN) 3.3V / 5V GND USB-C NEO-6M GPS ceramic antenna VCC TX RX GND SIM800L GSM SIM SLOT ANT VCC TX RX GND needs 4V (LiPo) BUZZER + → D12 – → GND RED LED + →220Ω→D13 –→GND PANIC BTN SOS one leg→D2 other→GND 18650 + TP4056 Charger 3.7V → boost to 4V for SIM800L 5V USB for ESP32 & GPS ━━ GPS wires (teal) ━━ GSM / LED (rose) ━━ Buzzer (amber) ━━ Button (violet) ━━ Power (blue) - - - Signal (dashed)

Pin Connection Table 📌

ComponentComponent PinESP32 PinNotes
NEO-6M GPSVCC3.3VGPS runs on 3.3V only!
NEO-6M GPSGNDGND
NEO-6M GPSTXGPIO 4 (RX1)GPS sends data here
NEO-6M GPSRXGPIO 5 (TX1)ESP32 sends to GPS
SIM800L GSMVCCBattery 4VSIM800L needs 3.7–4.2V — do NOT use 5V!
SIM800L GSMGNDGNDCommon ground
SIM800L GSMTXGPIO 16 (RX2)GSM sends data to ESP32
SIM800L GSMRXGPIO 17 (TX2)ESP32 sends AT commands to GSM
Buzzer+ (positive)GPIO 12Active buzzer — no resistor needed
Buzzer– (negative)GND
Red LEDAnode (+)GPIO 13 → 220ΩAlways use a resistor with LED!
Red LEDCathode (–)GND
Panic ButtonPin 1GPIO 2Also connect 1kΩ pull-up to 3.3V
Panic ButtonPin 2GND
TP4056 ChargerB+ B–18650 batteryOUT+ → VIN ESP32 via boost
⚠️ Important: The SIM800L GSM module needs 3.7V–4.2V — connecting it directly to the ESP32's 5V pin will damage it! Power it directly from the 18650 battery terminals or use a 4V voltage regulator.
Build Guide

Step-by-step instructions 🔧

Follow every step carefully! Ask an adult to help especially with the battery connections.

1

Insert the SIM card into SIM800L

Before anything else, insert an active prepaid nano SIM card into the SIM800L module's SIM card slot. Make sure the SIM has balance for SMS. The module won't work without a working SIM.

💡 Jio SIMs work great for this project in India. Activate it first on a smartphone.
2

Set up the ESP32 on the breadboard

Place the ESP32 in the centre of the breadboard so that pins are accessible on both sides. Connect the breadboard's red (+) rail to ESP32's 3.3V pin and the blue (–) rail to a GND pin.

💡 The ESP32 has multiple GND pins — you can use any of them.
3

Connect the NEO-6M GPS module

Connect GPS VCC to the 3.3V rail (not 5V!), GND to the GND rail, GPS TX pin to ESP32 GPIO 4, and GPS RX pin to ESP32 GPIO 5 using jumper wires.

⚠️ The NEO-6M GPS module runs on 3.3V only. Connecting it to 5V will destroy it permanently!
4

Connect the SIM800L GSM module

Connect SIM800L VCC directly to the positive terminal of the 18650 battery (through the TP4056 OUT+). Connect GND to common ground. Connect SIM800L TX to ESP32 GPIO 16, and SIM800L RX to ESP32 GPIO 17.

💡 Use a short antenna wire (about 10 cm) soldered to the ANT pad on the SIM800L for better signal strength.
5

Connect the buzzer

Place the active piezo buzzer on the breadboard. Connect the positive (+) pin to ESP32 GPIO 12, and the negative (–) pin to GND. No resistor needed for an active buzzer!

6

Connect the red LED

Place the LED on the breadboard. Connect the longer leg (anode/+) to ESP32 GPIO 13 through a 220Ω resistor. Connect the shorter leg (cathode/–) to GND.

⚠️ Never connect an LED directly without a resistor — the LED will burn out in seconds!
7

Connect the panic button

Place the push button on the breadboard. Connect one leg to ESP32 GPIO 2. Connect the other leg to GND. Also add a 1kΩ resistor between GPIO 2 and the 3.3V rail — this is called a pull-up resistor and makes the button work properly.

💡 A pull-up resistor keeps the pin at 3.3V when the button is not pressed, and pulls it to GND when pressed. This stops false triggers!
8

Connect the battery and charger

Connect the 18650 battery to the TP4056 charger module (B+ and B–). The OUT+ and OUT– of TP4056 power the SIM800L directly. Use a separate 5V USB power bank or the same battery through a boost converter to power the ESP32's VIN pin.

💡 You can also power the ESP32 through its USB port during testing — just use a USB cable from your computer.
9

Upload the code and test!

Connect the ESP32 to your computer via USB. Open Arduino IDE, install the TinyGPS++ library and SoftwareSerial, copy the code below, change the phone numbers, and click Upload. Open the Serial Monitor at 115200 baud to see what's happening.

🎉 When you press the panic button, you should hear the buzzer, see the LED blink, and receive an SMS with a Google Maps link!
The Code

ESP32 Arduino code 💻

Copy this into Arduino IDE. Change the phone numbers to real trusted numbers before uploading. Every section is explained with comments!

📦 Install these libraries first in Arduino IDE → Sketch → Include Library → Manage Libraries:
TinyGPS++ by Mikal Hart  |  ESP32 board via Board Manager
women_safety_device.ino
// =========================================================
// SMART WOMEN SAFETY DEVICE
// Uses ESP32 + GPS + GSM to send SOS with location
// Built for kids learning robotics!
// =========================================================

#include <HardwareSerial.h>   // For ESP32 serial ports
#include <TinyGPS++.h>        // Reads GPS coordinates

// ---- Pin Definitions ----
const int PANIC_BTN  = 2;   // Panic button pin
const int BUZZER_PIN = 12;  // Buzzer pin
const int LED_PIN    = 13;  // Red LED pin

// ---- GPS Setup ----
// GPS uses ESP32's UART1: RX=GPIO4, TX=GPIO5
HardwareSerial gpsSerial(1);
TinyGPSPlus gps;

// ---- GSM Setup ----
// GSM uses ESP32's UART2: RX=GPIO16, TX=GPIO17
HardwareSerial gsmSerial(2);

// ---- TRUSTED PHONE NUMBERS ----
// ⚠️ CHANGE THESE to real trusted numbers!
const char* phone1 = "+919876543210";  // Mom/Dad
const char* phone2 = "+919123456789";  // Trusted friend
const char* phone3 = "+919000000000";  // Family member

// ---- Button timing ----
const unsigned long HOLD_TIME = 2000;  // Hold 2 seconds
unsigned long btnPressTime = 0;
bool btnHeld = false;
bool sosActive = false;

// =========================================================
// SETUP — runs once when ESP32 turns on
// =========================================================
void setup() {
  Serial.begin(115200);           // For debugging
  gpsSerial.begin(9600,  SERIAL_8N1, 4, 5);   // GPS baud rate
  gsmSerial.begin(9600,  SERIAL_8N1, 16, 17); // GSM baud rate

  pinMode(PANIC_BTN,  INPUT_PULLUP);  // Button with internal pull-up
  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(LED_PIN,    OUTPUT);

  Serial.println("Safety Device Starting...");
  initGSM();   // Wake up the GSM module

  // Quick startup blink — 3 times = ready
  for (int i = 0; i < 3; i++) {
    digitalWrite(LED_PIN, HIGH);
    delay(200);
    digitalWrite(LED_PIN, LOW);
    delay(200);
  }
  Serial.println("Device Ready! Press button for 2s to activate SOS.");
}

// =========================================================
// LOOP — checks button and GPS every moment
// =========================================================
void loop() {
  // Feed GPS data continuously
  while (gpsSerial.available()) {
    gps.encode(gpsSerial.read());
  }

  int btnState = digitalRead(PANIC_BTN);

  // Button pressed (LOW because of pull-up)
  if (btnState == LOW) {
    if (!btnHeld) {
      btnPressTime = millis();   // Start timer
      btnHeld = true;
    }
    // Check if held long enough
    if (millis() - btnPressTime >= HOLD_TIME && !sosActive) {
      Serial.println("SOS TRIGGERED!");
      sosActive = true;
      triggerSOS();
    }
  } else {
    btnHeld = false;
  }
}

// =========================================================
// TRIGGER SOS — the main safety action
// =========================================================
void triggerSOS() {
  Serial.println("🚨 SOS Activated!");

  // 1. Start alarm — buzzer ON, LED blinking
  digitalWrite(BUZZER_PIN, HIGH);

  // 2. Wait for GPS fix (up to 30 seconds)
  float lat = 0.0, lng = 0.0;
  unsigned long gpsWait = millis();

  while (millis() - gpsWait < 30000) {
    while (gpsSerial.available()) gps.encode(gpsSerial.read());

    // Blink LED while waiting
    digitalWrite(LED_PIN, (millis() / 300) % 2);

    if (gps.location.isValid()) {
      lat = gps.location.lat();
      lng = gps.location.lng();
      Serial.print("GPS Fix! Lat: "); Serial.print(lat, 6);
      Serial.print(" Lng: "); Serial.println(lng, 6);
      break;
    }
  }

  // 3. Build the SMS message
  String message = "🆘 SOS ALERT! I need help!\n";
  if (lat != 0.0) {
    message += "📍 My Location:\n";
    message += "https://maps.google.com/?q=";
    message += String(lat, 6) + "," + String(lng, 6);
    message += "\nPlease come quickly!";
  } else {
    message += "GPS signal not found. Please track my phone!";
  }

  // 4. Send SMS to all 3 trusted numbers
  Serial.println("Sending SMS...");
  sendSMS(phone1, message);
  delay(2000);
  sendSMS(phone2, message);
  delay(2000);
  sendSMS(phone3, message);

  Serial.println("SMS sent! Alarm will ring for 30 seconds.");

  // 5. Alarm rings for 30 seconds, then standby
  delay(30000);
  digitalWrite(BUZZER_PIN, LOW);
  digitalWrite(LED_PIN, HIGH);  // LED stays ON = SOS sent
  sosActive = false;
}

// =========================================================
// SEND SMS using AT Commands
// =========================================================
void sendSMS(const char* number, String message) {
  gsmSerial.println("AT+CMGF=1");       // Set SMS text mode
  delay(500);
  gsmSerial.print("AT+CMGS=\"");
  gsmSerial.print(number);
  gsmSerial.println("\"");             // Enter phone number
  delay(500);
  gsmSerial.print(message);            // Type the message
  delay(200);
  gsmSerial.write(26);               // CTRL+Z = send SMS!
  delay(3000);
  Serial.print("SMS sent to: "); Serial.println(number);
}

// =========================================================
// INIT GSM — wake up and configure the SIM800L
// =========================================================
void initGSM() {
  Serial.println("Initialising GSM...");
  gsmSerial.println("AT");           // Test communication
  delay(1000);
  gsmSerial.println("AT+CMGF=1");   // SMS text mode
  delay(500);
  gsmSerial.println("AT+CNMI=1,2,0,0,0"); // SMS notification
  delay(500);
  Serial.println("GSM Ready!");
}
Try It!

SOS Simulator 🎮

See exactly what happens when someone presses the panic button — simulate the SMS and alarm sequence right here!

📟 Serial Monitor Simulator
DEVICE STATUS: Ready and waiting...
Press a button below to simulate an event →
Level Up!

Cool upgrades to try 🚀

Once your basic device works perfectly, try adding these features to make it even more powerful!

📱

WhatsApp Alerts

Use Twilio API with ESP32 Wi-Fi to send WhatsApp messages instead of SMS

📹

Live Camera

Add an ESP32-CAM module to automatically take a photo and send it along with the SOS

Wearable Design

Put everything into a small wristband case with a hidden button — like a real smartwatch!

🗺️

Live Tracking

Build a web dashboard that shows the live moving location on Google Maps in real time

🔔

Shake Detection

Add an MPU-6050 accelerometer to automatically trigger SOS if the device senses a fall or struggle

🔋

Solar Charging

Add a tiny solar panel to keep the battery charged through the day — no plugging needed!

Questions & Answers

Questions kids often ask ❓

Why does the button need to be held for 2 seconds and not just tapped?
Great question! If SOS triggered with a single tap, it could fire accidentally when you bump something in your bag or pocket. Holding it for 2 seconds means it only activates when you really mean it. This prevents false alarms — just like your phone's emergency SOS button!
How does the GPS module know where I am?
The NEO-6M GPS module has a tiny receiver inside that listens to signals from satellites orbiting Earth — about 20,000 km above us! It receives signals from at least 4 satellites, then uses clever maths (called trilateration) to calculate exactly where you are. That's why you need to be outdoors or near a window for it to work best.
What are AT commands used in the SMS code?
AT commands are special text instructions that we send to the SIM800L GSM module to control it — like telling it to send an SMS. "AT" stands for "Attention"! They were invented in 1981 by Dennis Hayes and are still used in mobile modems today. When we type AT+CMGS="number", we're telling the GSM chip: "Hey! Send a message to this phone number!"
Can this device work indoors where there's no GPS signal?
If GPS can't get a satellite signal indoors, our code still sends the SMS — it just says "GPS signal not found. Please track my phone!" instead of sending coordinates. This is why it's smart to also share your live location on WhatsApp with trusted people when you go somewhere new.
Is this project similar to what real safety apps do?
Absolutely! Apps like bSafe, Nirbhaya, and the built-in Emergency SOS on iPhones and Android work in exactly the same way — detect a trigger (shake, button, voice), find GPS location, and send alerts to contacts. Our project is a hardware version of exactly the same idea. Companies building safety products use very similar technology!
Can I use an Arduino UNO instead of ESP32?
Yes! You can use an Arduino UNO with Software Serial for both GPS and GSM, but you'll need to be careful because UNO only has one hardware serial port. The code will need small changes — use SoftwareSerial library instead of HardwareSerial. The ESP32 is better for this project because it's faster, has more serial ports, and has built-in Wi-Fi for future upgrades like sending WhatsApp messages!

Smart Women Safety Device — Robotics Project for Kids

Technology that protects people — built by young engineers with big hearts 💕

Great for school science fairs, STEM competitions, and robotics clubs

Keywords: smart women safety device arduino ESP32, GPS SOS project kids, panic button robotics project, women safety electronics India, STEM safety gadget school project

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
Young inventors love it!
🖨️
3D Print
All parts
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course