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

Arduino UNO Based SOS Alert System with GPS Location and GSM SMS Notification

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based SOS Alert System with GPS Location and GSM SMS Notification

Circuit Documentation

Summary

The circuit described in the provided inputs is designed to implement an SOS system using an Arduino UNO as the main controller. The system includes a GPS module (NEO 6M) for location tracking, an LCD screen (16x2 with I2C interface) for user feedback, a GSM module (SIM900A) for sending SMS messages, and a push switch to trigger the SOS signal. When the push switch is activated, the system sends an SMS with a distress message and the current GPS coordinates to a predefined phone number. The LCD screen displays a confirmation message once the SMS is sent.

Component List

Arduino UNO

GPS NEO 6M

LCD screen 16x2 I2C

SIM900A

2Pin Push Switch

Wiring Details

Arduino UNO

GPS NEO 6M

LCD screen 16x2 I2C

SIM900A

2Pin Push Switch

Documented Code

/*
 * SOS System
 * This code implements an SOS system using an Arduino UNO, LCD 16x2, GSM SIM900, 
 * and GPS NEO 6M. When a button is pressed, the system sends an SMS with the 
 * message "HELP I am in trouble. Find me in this location" along with the current 
 * GPS coordinates to a predefined mobile number. The LCD displays "MESSAGE SENT" 
 * after the SMS is sent.
 */

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

#define BUTTON_PIN 9
#define LED_PIN 13

char str[70];
char *test = "$GPGGA";
char longitude[10];
char latitude[10];

int i, j, k;
int temp;

void setup() {
  lcd.begin(16, 2); // Initialize the LCD
  Serial.begin(9600); // Start serial communication at 9600 baud rate
  pinMode(BUTTON_PIN, INPUT); // Set the button pin as an input
  pinMode(LED_PIN, OUTPUT); // Set the LED pin as an output
  digitalWrite(LED_PIN, LOW); // Ensure the LED is off
  lcd.setCursor(0, 0); // Set the cursor to the first line
  lcd.print("WOMEN SAFETY"); // Print the initial message on the LCD
  lcd.setCursor(0, 1); // Move to the second line
  lcd.print("ALERT SYSTEM"); // Print the second part of the initial message
  delay(3000); // Wait for 3 seconds
}

void loop() {
  if (digitalRead(BUTTON_PIN) == LOW) { // Check if the button is pressed
    digitalWrite(LED_PIN, HIGH); // Turn on the LED
    extractGPSData(); // Extract GPS data from the GPS module
    displayCoordinates(); // Display the coordinates on the LCD
    sendSMS(); // Send the SOS message via SMS
    lcd.clear(); // Clear the LCD
    lcd.print("MESSAGE SENT"); // Print the confirmation message
    delay(5000); // Wait for 5 seconds
    digitalWrite(LED_PIN, LOW); // Turn off the LED
  }
}

void extractGPSData() {
  // Function to extract latitude and longitude from the GPS data
  // Implementation details are omitted for brevity
}

void displayCoordinates() {
  // Function to display the extracted coordinates on the LCD
  // Implementation details are omitted for brevity
}

void sendSMS() {
  // Function to send the SOS message via SMS using the GSM module
  // Implementation details are omitted for brevity
}

void serialEvent() {
  // Function to handle incoming serial data from the GPS module
  // Implementation details are omitted for brevity
}

Note: The actual implementation details for the functions extractGPSData, displayCoordinates, sendSMS, and serialEvent are omitted for brevity. These functions would contain the logic to parse the GPS data, update the LCD, send the SMS, and handle serial communication, respectively.