---
name: "Fall Detection Device"
status: "done"
started: "2019-11"
summary: "Wearable fall alarm. ESP32."
url: "https://0xobat.com/projects/fall-detection-device"
author: "Obat"
---

# Fall Detection Device

A wearable that notices when its wearer falls. Built with a partner as a technology project at Lakehead. Commercial ones charge about $30 a month. Ours cost $59.73 in parts, once.

An ESP32 reads an MPU-6050 and serves a web page with the wearer's status. The thresholds are 3g of total acceleration and -100°/s of angular velocity. It runs on a 9V battery stepped down to 5V, in a 3D-printed case.

To set the thresholds, one of us wore it while walking, taking stairs, bending over, and falling from the knees onto something soft. Most movement stays under 1g. Stairs reach 2 to 3g. Falls reach 3 to 5g. Then we strapped it to a chair and tipped the chair over. It caught 5 of 5.

## What we learned

- Angular velocity in a fall overflowed its variable and came out negative. It did this every time, so we kept it and set the threshold below zero.
- The web page never refreshed, because the server never closed the connection. The fix was changing a 2 to a 1.
- An early version passed its tests by coincidence. The fall flag was being set after the page had already been sent.
- The case didn't fit. We had measured the converter without its solder joints, and used 9V battery dimensions from 2007. It also had no opening for the USB port.

## Links

- [PDF](https://0xobat.com/Fall-Detector.pdf)
