Tekko BDSimSimulatorProjects

পড়ে যাওয়া ধরার এলার্ম (MPU6050)Elderly Fall Detection with Arduino and MPU6050

স্থির দাঁড়িয়ে থাকলে Z axis পড়ে ৯.৮ m/s² — মাধ্যাকর্ষণের পুরো টান। ফ্রি-ফল অবস্থায় এক মুহূর্তের জন্য তিনটা axis-ই প্রায় শূন্য। মোট ত্বরণ সীমার নিচে নামলেই buzzer আর লাল LED চিৎকার করে ওঠে — smartwatch-এর ভেতরের পদার্থবিজ্ঞান এটাই।

Standing still, the Z axis reads the full 9.8 m/s^2 of gravity. In free fall, every axis reads almost zero for a moment. When the total drops below a threshold, the buzzer and the red LED call for help — the physics inside the smart watches.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Elderly Fall Detection with Arduino and MPU6050 circuit diagram — Arduino Uno, Motion sensor MPU6050 (GY-521), Buzzer, Resistor 220Ω, LED (red), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Motion sensor MPU6050 (GY-521) VCC→Arduino Uno 5V
Motion sensor MPU6050 (GY-521) GND→Arduino Uno GND
Motion sensor MPU6050 (GY-521) SDA→Arduino Uno A4
Motion sensor MPU6050 (GY-521) SCL→Arduino Uno A5
Arduino Uno D8→Buzzer +
Buzzer -→Arduino Uno GND.3
Arduino Uno D7→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3

Code (Arduino C++)

#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
// Elderly-fall alarm: standing still, the Z axis carries the full 9.8 m/s^2 of
// gravity. In free fall every axis reads almost zero for a moment — a short
// window of near-zero total acceleration means the device (and its wearer) is
// dropping. That is the cheap trick wearables use before the fancy algorithms.
Adafruit_MPU6050 mpu;
const int buzzer = 8, alarmLed = 7;

void setup() {
  pinMode(buzzer, OUTPUT);
  pinMode(alarmLed, OUTPUT);
  Serial.begin(9600);
  if (!mpu.begin()) { Serial.println("MPU6050 not found"); while (1) delay(10); }
  mpu.setAccelerometerRange(MPU6050_RANGE_8_G);
}

void loop() {
  sensors_event_t a, g, temp;
  mpu.getEvent(&a, &g, &temp);
  float x = a.acceleration.x, y = a.acceleration.y, z = a.acceleration.z;
  float total = sqrt(x * x + y * y + z * z);
  if (total < 1.5) {
    digitalWrite(buzzer, HIGH);
    digitalWrite(alarmLed, HIGH);
    Serial.print("FALL! total="); Serial.println(total, 1);
  } else {
    digitalWrite(buzzer, LOW);
    digitalWrite(alarmLed, LOW);
  }
  delay(150);
}

আরো project · More projects