My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Women's Safety Device Using Arduino, GSM and GPS Module

Women's Safety Device Using Arduino, GSM and GPS Module

How to make a Woman Safety Device

Salman Shaikh's photo
Salman Shaikh
·Mar 11, 2022·

2 min read

It's not hard to build a safety device for women which will not only generate an emergency alarm but also send a message to your friends, family, or concerned person. Here we will build a band that can be worn by women, using which they can inform police or anyone, using SOS emergency SMS along with the current location. Using this information, the police will be able to save the victim from the location. For this, here we are using an Arduino which can be interfaced with GSM and GPS module for sending SMS alerts and getting the location coordinates.

Materials Used

  • Arduino UNO
  • SIM900 Modem
  • NEO6M GPS module
  • Push Button
  • Battery
  • Buzzer
  • Breadboard
  • Jumpers

Project Schematic

unnamed (8).png

Project Source Codes


#include <TinyGPS.h>

//replace *********** with your number

TinyGPS gps;

float flat, flon;

static void smartdelay(unsigned long ms);
static void print_float(float val, float invalid, int len, int prec);
static void print_int(unsigned long val, unsigned long invalid, int len);
static void print_date(TinyGPS &gps);
static void print_str(const char *str, int len);


int Buzzer = 13;
int sw = 5;

void setup(){
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
  delay(100);

  pinMode(Buzzer, OUTPUT);
  pinMode(sw, INPUT_PULLUP);
}


void loop(){


  if (digitalRead(sw) == LOW ) { SendMessage(); }
}



void ReadGPS(){
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  while (Serial.available()){
    char c = Serial.read();  
    if (gps.encode(c)) { newData = true; }
    }

  if (newData){
    unsigned long age;
    gps.f_get_position(&flat, &flon, &age);
    } 

}


void SendMessage(){
  digitalWrite(Buzzer,LOW);
  Serial.println("AT+CMGF=1"); delay(1000);           digitalWrite(Buzzer,HIGH);
  Serial.println("AT+CMGS=\"+91**********\"\r");      digitalWrite(Buzzer,HIGH); delay(1000);   
  Serial.println("I NEED HELP  MY LOCATION IS: ");    digitalWrite(Buzzer,LOW);  delay(100);
  Serial.print("https://maps.google.com/maps/place/");
  Serial.print(" ");                             digitalWrite(Buzzer,HIGH); delay(100);
  Serial.println(flat,6);                        digitalWrite(Buzzer,LOW);  delay(100);
  Serial.print(" ");                             digitalWrite(Buzzer,HIGH); delay(100);
  Serial.println(flon,6);                        digitalWrite(Buzzer,LOW);  delay(100);
  Serial.println(" FROM WOMEN SAFETY DEVICE ");

  Serial.println((char)26); digitalWrite(Buzzer,HIGH); delay(1000); digitalWrite(Buzzer,LOW);
}