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, and other supporting components. The device is designed to send an alert message when a switch is activated.

Component List

esp8266 nodemcu

7.4v Battery

7805 Voltage Regulator

Ceramic Capacitor

Tantalum Capacitor

0.96" OLED

I2C LCD 16x2 Screen

Sim800l

GPS NEO 6M

LM2596

Rocker Switch

Buzzer

Resistor (200 Ohms)

Resistor (10000 Ohms)

Wiring Details

esp8266 nodemcu

7.4v Battery

7805 Voltage Regulator

Ceramic Capacitor

Tantalum Capacitor

0.96" OLED

I2C LCD 16x2 Screen

Sim800l

GPS NEO 6M

LM2596

Rocker Switch

Buzzer

Resistor (200 Ohms)

Resistor (10000 Ohms)

Code Documentation

esp8266 nodemcu 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("Emergency! Please help.");
  delay(1000);
  sim800l.write(26);
  delay(1000);
}

0.96" OLED Code

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

Buzzer Code

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

This documentation provides a comprehensive overview of the circuit, including component details, wiring connections, and the code used for the microcontrollers.