This article is for Women Safety Alarm Circuit using GPS GSM NodeMCU, it uses NodeMCU ESP8266 board as brain.
Here, GPS module give location, GSM module send SMS to family and one push button used to send alert.
Arduino Code:
#include <SoftwareSerial.h>
#include <TinyGPS.h>
SoftwareSerial gpsSerial(D6, D5);
SoftwareSerial gsmSerial(D3, D2);
TinyGPS gps;
float lat, lon;
int buttonPin = D1;
void setup() {
pinMode(buttonPin, INPUT_PULLUP);
Serial.begin(9600);
gpsSerial.begin(9600);
gsmSerial.begin(9600);
delay(1000);
gsmSerial.println("AT");
delay(1000);
gsmSerial.println("AT+CMGF=1");
delay(1000);
}
void loop() {
while (gpsSerial.available()) {
gps.encode(gpsSerial.read());
gps.f_get_position(&lat, &lon);
}
if (digitalRead(buttonPin) == LOW) {
sendLocationSMS(lat, lon);
delay(10000);
}
}
void sendLocationSMS(float lat, float lon) {
gsmSerial.println("AT+CMGF=1");
delay(500);
gsmSerial.println("AT+CMGS="+911234567890"");
delay(500);
gsmSerial.print("I am in danger. My Location: ");
gsmSerial.print("https://maps.google.com/?q=
");
gsmSerial.print(lat, 6);
gsmSerial.print(",");
gsmSerial.print(lon, 6);
gsmSerial.write(26);
delay(5000);
}Coding Explanation:
- TinyGPS library read latitude and longitude.
- SoftwareSerial create extra serial pins for GPS and GSM.
- Button press send SMS with location link.
- Message send through GSM module.
- Google Maps link make easy to see location.
Circuit Working:

Parts List:
| Components | Quantity |
|---|---|
| NodeMCU ESP8266 Board | 1 |
| GPS Module (NEO-6M) | 1 |
| GSM Module (SIM800L or SIM900) | 1 |
| Tactile Switch | 1 |
| USB Cable or Battery (5V) | 1 |
NodeMCU ESP8266 is a main controller controls GPS and GSM.
The GPS module (NEO-6M) connects to the NodeMCU TX/RX pins and provides real-time latitude and longitude data to the NodeMCU.
Then the GSM module sends an SMS to the stored phone number.
After that, push button tactile switch when pressed sends signal to NodeMCU to start alert process.
The NodeMCU powers the GPS and GSM modules using its 3.3V and VIN pins, with a common GND connection, the NodeMCU itself receives power through a USB connection or a battery.
The GPS continuously sends location data to the NodeMCU and the NodeMCU also detects button presses.
NodeMCU collects GPS location and then NodeMCU sends SMS with location through GSM module and finally, alert reaches family or emergency contacts.
How to Build:
To build a Women Safety Alarm Circuit using GPS GSM NodeMCU follow the below steps for connections:
- First, gather all the parts as shown in circuit diagram
- Next, connect GPS Module GND pin to NodeMCU GND pin and connect GPS Module RX pin to NodeMCU D5 pin
- After that, connect GPS Module TX pin to NodeMCU D6 pi and connect GPS Module VCC pin to NodeMCU 3.3V pin
- Now GSM Module Vcc pin connect to NodeMCU pin Vin or 5V and GSM Module GND pin connect to NodeMCU pin GND
- Also, GSM Module RX pin connect to NodeMCU pin D and then GSM Module TX pin connect to NodeMCU pin D3
- Finally, connect one end of tactile switch to NodeMCU D1 and other end to GND
Conclusion:
To conclude, this small circuit helps women in danger; one button press will send location SMS fast.
Also, this circuit is simple, low cost and portable.
Leave a Reply