Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP8266-Based Woman Safety Device with OLED Display and GSM Alert

View and Edit Project In Cirkit DesignerImage of ESP8266-Based Woman Safety Device with OLED Display and GSM Alert

Circuit Documentation

Summary

This document provides a detailed overview of a Woman Safety Device circuit. The circuit includes various components such as a NodeMCU ESP8266, OLED Display, SIM800L GSM Module, Neo6MV2 GPS Module, Buzzer, LEDs, and other supporting components. The device is designed to send an emergency alert when a button is pressed.

Component List

  1. NodeMCU ESP8266

    • Description: A microcontroller with built-in Wi-Fi capabilities.
    • Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN
  2. 7.4V Battery

    • Description: Power source for the circuit.
    • Pins: +, -
  3. 7805 Voltage Regulator

    • Description: Regulates the voltage to 5V.
    • Pins: Vin, Gnd, Vout
  4. Ceramic Capacitor

    • Description: Provides noise filtering and stability.
    • Pins: pin0, pin1
    • Properties: Capacitance: 0.1 Farads
  5. Tantalum Capacitor

    • Description: Provides noise filtering and stability.
    • Pins: -, +
    • Properties: Capacitance: 0.22 Farads
  6. 0.96" OLED Display

    • Description: Displays information.
    • Pins: GND, VDD, SCK, SDA
  7. SIM800L GSM Module

    • Description: Sends SMS alerts.
    • Pins: NET, RST, VCC, RXD, TXD, GND
  8. GPS NEO 6M

    • Description: Provides GPS location data.
    • Pins: VCC, RX, TX, GND
  9. LM2596 Voltage Regulator

    • Description: Regulates the voltage.
    • Pins: IN, OUT
  10. Buzzer

    • Description: Provides audible alerts.
    • Pins: PIN, GND
  11. Resistor (200 Ohms)

    • Description: Limits current.
    • Pins: pin1, pin2
    • Properties: Resistance: 200 Ohms
  12. Resistor (1000 Ohms)

    • Description: Limits current.
    • Pins: pin1, pin2
    • Properties: Resistance: 1000 Ohms
  13. Electrolytic Capacitor

    • Description: Provides noise filtering and stability.
    • Pins: -, +
    • Properties: Capacitance: 0.000001 Farads
  14. Pushbutton

    • Description: User input for triggering alerts.
    • Pins: Pin 3 (out), Pin 4 (out), Pin 1 (in), Pin 2 (in)
  15. LED: Two Pin (red)

    • Description: Visual indicator.
    • Pins: cathode, anode

Wiring Details

NodeMCU ESP8266

7.4V Battery

7805 Voltage Regulator

Ceramic Capacitor

Tantalum Capacitor

0.96" OLED Display

SIM800L GSM Module

GPS NEO 6M

LM2596 Voltage Regulator

Buzzer

Resistor (200 Ohms)

Resistor (1000 Ohms)

Electrolytic Capacitor

Pushbutton

LED: Two Pin (red)

Documented Code

NodeMCU ESP8266 Code

/*
 * Woman Safety Device
 * Components: NodeMCU ESP8266, OLED Display, SIM800L GSM Module,
 * Neo6MV2 GPS Module, Buzzer, LEDs (Red, Red, Blue)
 * Functionality: This code initializes the components and provides
 * basic functionality for the safety device.
 */

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SoftwareSerial.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

SoftwareSerial sim800l(D1, D2); // RX, TX

#define BUZZER_PIN D7
#define SWITCH_PIN D2

void setup() {
  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(SWITCH_PIN, INPUT);
  digitalWrite(BUZZER_PIN, LOW);

  Serial.begin(115200);
  sim800l.begin(9600);

  if(!display.begin(SSD1306_I2C_ADDRESS, OLED_RESET)) {
    Serial.println(F("SSD1306 allocation failed"));
    for(;;);
  }
  display.display();
  delay(2000);
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.println(F("Woman Safety Device"));
  display.display();
}

void loop() {
  if(digitalRead(SWITCH_PIN) == HIGH) {
    digitalWrite(BUZZER_PIN, HIGH);
    sendAlert();
  } else {
    digitalWrite(BUZZER_PIN, LOW);
  }
}

void sendAlert() {
  sim800l.println("AT+CMGF=1");
  delay(1000);
  sim800l.println("AT+CMGS=\"+1234567890\"");
  delay(1000);
  sim800l.print("