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

Arduino UNO Based Fall Detection System with SMS Alerts Using ADXL345 and SIM800L

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based Fall Detection System with SMS Alerts Using ADXL345 and SIM800L

Circuit Documentation

Summary

This circuit integrates an Arduino UNO microcontroller with an Adafruit ADXL345 accelerometer, a SIM800L GSM module, and a blue LED with a series resistor. The Arduino UNO is responsible for controlling the accelerometer and GSM module, as well as driving the LED. The accelerometer is used to detect fall conditions, and upon detection, the GSM module sends an SMS alert. The LED serves as an indicator, presumably to signal the detection of a fall or other significant event.

Component List

Arduino UNO

Adafruit ADXL345

SIM800L GSM Module

LED: Two Pin (blue)

Resistor

Wiring Details

Arduino UNO

Adafruit ADXL345

SIM800L GSM Module

LED: Two Pin (blue)

Resistor

Documented Code

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>
#include <SoftwareSerial.h>

Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);

SoftwareSerial gsm(11, 10);  // RX, TX for GSM Module

void setup() {
  Serial.begin(9600);
  gsm.begin(9600);

  if(!accel.begin()) {
    Serial.println("No ADXL345 sensor detected");
    while(1);
  }
  accel.setRange(ADXL345_RANGE_16_G);

  // Initialize GSM module
  gsm.println("AT"); // Test the GSM module
  delay(1000);
}

void sendSMS() {
  gsm.println("AT+CMGF=1");  // Set SMS mode to text
  delay(100);
  gsm.println("AT+CMGS=\"+919664939499\"");  // Replace with your phone number
  delay(100);
  gsm.print("Fall Detected!");  // Message content
  delay(100);
  gsm.write(26);  // Send Ctrl+Z to end SMS
  delay(1000);
}

void loop() {
  sensors_event_t event; 
  accel.getEvent(&event);

  // Detect fall condition
  if (abs(event.acceleration.x) > 10 || abs(event.acceleration.y) > 10 || abs(event.acceleration.z) < 2) {
    sendSMS();  // Send SMS when fall is detected
    delay(5000);  // Prevent multiple SMS from being sent too frequently
  }
}

This code initializes the ADXL345 accelerometer and the GSM module. It continuously checks for a fall condition based on the accelerometer readings. If a fall is detected, it sends an SMS alert using the GSM module. The sendSMS function is responsible for sending the SMS message. The phone number and message content can be customized as needed.