Wednesday, November 13, 2024

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages

Fall Detection Using IndusBoard

Comment errors or corrections found for this circuit, and get the chance to win big!

Fall detection using Indusboard involves monitoring the accelerometer data to detect when a person falls. Upon detecting a fall, the system activates a blue LED to visually indicate the fall event. Simultaneously, a message is printed to the serial monitor, notifying caregivers or monitoring systems that a fall has been detected, prompting them to check on the individual.

After some time, the accelerometer senses that the person is no longer moving significantly, indicating that they are at rest. At this point, the system switches the blue LED off and activates a red LED. The red LED serves as a secondary visual indicator that the person is now at rest. Another message is sent to the serial monitor, confirming that the person is now in a stable state.

This dual-LED system and serial communication ensure that caregivers or monitoring systems are continuously updated about the person’s status, facilitating timely responses to fall incidents and providing reassurance when the person is resting peacefully.

- Advertisement -

Applications of fall detection system

  1. Elderly Care: Ensures rapid response to falls among seniors, reducing the risk of injuries and ensuring timely medical attention.
  2. Home Monitoring: Provides peace of mind to family members by alerting them to falls or emergencies when they occur.
  3. Hospital Settings: Enhances patient safety by alerting healthcare providers to falls in real-time, facilitating swift intervention.
  4. Remote Monitoring: Allows for continuous monitoring of individuals in remote or isolated locations, ensuring assistance is dispatched promptly.

Bill of Materials (BoM)

ComponentsDescriptionQuantity
IndusBoard3cm sized dev board1
LED5mm LED2
Resistor1Kohm2
Zumper wires
As required

Coding

#include <LSM303AGR_ACC_Sensor.h>
#include <LSM303AGR_MAG_Sensor.h>

#if defined(ARDUINO_SAM_DUE)
#define DEV_I2C Wire1   //Define which I2C bus is used. Wire1 for the Arduino Due
#define SerialPort Serial
#else
#define DEV_I2C Wire    //Or Wire
#define SerialPort Serial
#endif

// Components.
LSM303AGR_ACC_Sensor Acc(&DEV_I2C);
LSM303AGR_MAG_Sensor Mag(&DEV_I2C);

int fall=7;
int rest=6;

// Threshold values for fall detection (can be adjusted)
const float fallThreshold = 2.5; // Adjust this threshold based on testing
const float restThreshold = 0.5;

void setup() {
  // Led.
  pinMode(fall, OUTPUT);
  pinMode(rest, OUTPUT);
  // Initialize serial for output.
  SerialPort.begin(9600);
 
  // Initialize I2C bus.
  DEV_I2C.begin();

  // Initlialize components.
  Acc.begin();
  Acc.Enable();
  Acc.EnableTemperatureSensor();
  Mag.begin();
  Mag.Enable();
}

void loop() {
  // Read accelerometer LSM303AGR.
  int32_t accelerometer[3];
  Acc.GetAxes(accelerometer);

  // Calculate the magnitude of the acceleration vector
  float magnitude = sqrt(sq(accelerometer[0]) + sq(accelerometer[1]) + sq(accelerometer[2])) / 1000.0; // Convert to g
  // Check for fall detection
  if (magnitude > fallThreshold) {
    SerialPort.println("Fall detected!");
    digitalWrite(fall, HIGH);
    delay(5000);
    digitalWrite(fall, LOW);
    delay(5000);

    // Wait until the sensor detects the person is at rest
    while (magnitude > restThreshold) {
      Acc.GetAxes(accelerometer);
      magnitude = sqrt(sq(accelerometer[0]) + sq(accelerometer[1]) + sq(accelerometer[2])) / 1000.0;
      delay(100);
    }
    SerialPort.println("Person is at rest.");
    digitalWrite(rest, HIGH);
    delay(1000);
    digitalWrite(rest, LOW);
    delay(1000);
  }
  // Output data.
  SerialPort.print("| Acc[mg]: ");
  SerialPort.print(accelerometer[0]);
  SerialPort.print(" ");
  SerialPort.print(accelerometer[1]);
  SerialPort.print(" ");
  SerialPort.print(accelerometer[2]);
  SerialPort.println(" |");
}

Connection

Testing

Connect the indusBoard with the USB and upload the code. And open the serial monitor to see the output. Hold the IndusBoard in your hand and check the fall detection system. If you fall then the blue LED is “ON”.


Author(s): Manjeet Vishwakarma,  Abhay Verma and Satywanti Kundu are B.Tech ECE students at GJUS&T HISAR

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics