2nd place at the ABINC IoT Award 2025 (Universities category), announced at Futurecom 2025 in São Paulo. Full coverage at UNIFOR
Real-time fall detection system based on weight sensors and artificial neural networks, developed at the VORTEX laboratory of Tec Unifor (Universidade de Fortaleza). The project originated from the dissertation of Marcela Bezerra Lima Deodato in the Professional Master's in Technology and Innovation in Nursing (MPTIE), with interdisciplinary development following the MIDTs methodology.
Falls in elderly people represent the second leading cause of death from unintentional injuries worldwide. The approach uses four load cells installed under the bed legs to monitor the occupant's weight distribution. A neural network model embedded in the ESP32 microcontroller classifies the user's position in real time and triggers an audible alarm when a fall is detected, with no need for wearables.
┌─────────────────────────────────────────────────────────────────┐
│ PHASE 1: DATA COLLECTION │
│ 4x Load Cells (HX711) → ESP32 → Serial → CSV │
│ (coletar-dadosR02.ino) │
└───────────────────────────┬─────────────────────────────────────┘
│ dados_analisado.csv
┌───────────────────────────▼─────────────────────────────────────┐
│ PHASE 2: TRAINING │
│ Preprocessing → MLP + comparative algorithms → Weights │
│ (quedas-R02.ipynb) │
└───────────────────────────┬─────────────────────────────────────┘
│ weights1.h / weights2.h / weights3.h
┌───────────────────────────▼─────────────────────────────────────┐
│ PHASE 3: INFERENCE │
│ 4x Load Cells → ESP32 (embedded MLP) → MP3 Alarm │
│ (firmware_esp32.ino) │
└─────────────────────────────────────────────────────────────────┘
| Component | Qty | Connection (ESP32 GPIO) |
|---|---|---|
| HX711 Module + Load Cell | 4 | A: DT=13, SCK=12 · B: DT=14, SCK=27 · C: DT=26, SCK=25 · D: DT=33, SCK=32 |
| JQ6500 MP3 Module | 1 | RX=16, TX=17 |
| ESP32 | 1 |
The four load cells are installed under the bed legs, one at each corner. The sum of readings and the distribution across A/B/C/D determine the occupant's position and state.
| Index | Description | Safe |
|---|---|---|
| 0 | Out of bed | ✅ |
| 1 | Side BC0 | ✅ |
| 2 | Sitting at D | ❌ |
| 3 | Side AD0 | ✅ |
| 4 | Side BC1 | ❌ |
| 5 | Lying in the middle | ✅ |
| 6 | Diagonal BD | ✅ |
| 7 | Side AD1 | ❌ |
| 8 | Sitting in the middle | ❌ |
| 9 | Sitting at C | ❌ |
| 10 | Diagonal AC | ✅ |
| 11 | Detecting fall | ❌ |
The MLP trained in the notebook and embedded in the firmware has the following architecture:
Input (4) → Dense 1024 (ReLU) → Dense 200 (ReLU) → Output 12 (Softmax)
Training hyperparameters:
- Optimizer: Adam (lr = 0.0005)
- Loss: Categorical Cross-Entropy
- Epochs: 50 · Batch: 5000
- Cross-validation: K-Fold (k=5)
- Regularization: ReduceLROnPlateau
Evaluated on 2 held-out test volunteers (unseen during training):
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Decision Tree | 77.34% | 81.30% | 81.74% | 80.44% |
| Random Forest | 83.71% | 92.41% | 86.83% | 88.53% |
| K-Nearest Neighbors | 87.26% | 89.30% | 89.75% | 89.20% |
| Naive Bayes | 87.39% | 89.83% | 89.59% | 89.43% |
| MLP (Neural Network) | 95.11% | 96.02% | 96.54% | 96.21% |
The MLP significantly outperforms all other algorithms, with a gain of approximately 8 percentage points over the second best (KNN/Naive Bayes).
PROJ-00-prevencao_de_quedas/
├── coletar-dadosR02.ino # Data collection firmware (ESP32)
├── firmware_esp32.ino # Real-time inference firmware (ESP32)
├── quedas-R02.ipynb # Notebook: preprocessing, training and comparison
├── dados_analisado.csv # Dataset with readings from 14+ volunteers (~19 MB)
└── README.md
Note: the files
weights1.h,weights2.handweights3.hcontaining the trained network weights are generated by the notebook and must be added to the Arduino project folder before compiling the firmware.
pip install numpy pandas tensorflow scikit-learn matplotlibjupyter notebook quedas-R02.ipynbThe notebook runs in order:
- Data anonymization and cleaning (outlier removal via IQR)
- One-hot encoding of position classes
- MLP training with K-Fold and weight export
- Comparison with Decision Tree, Random Forest, KNN and Naive Bayes
- Metrics and confusion matrix generation
Arduino dependencies:
HX711(load cell readings)BluetoothSerial(wireless monitoring)JQ6500_Serial(MP3 alarm)
To compile:
- Generate the weight files by running the notebook completely
- Copy
weights1.h,weights2.h,weights3.hto the sketch folder - Compile and flash
firmware_esp32.inoto the ESP32 board
To collect new data:
- Use
coletar-dadosR02.inoand monitor the serial output (format:line/A/B/C/D/SUM/command) - Available serial commands:
pause,reboot,zero(tare)
| Name | Role |
|---|---|
| Marcela Bezerra Lima Deodato | Lead researcher (MPTIE master's student) |
| Heitor de Castro Teixeira | Development (Computer Science graduate) |
| Joel Sotero da Cunha Neto | Coordinator |
Developed at the VORTEX Laboratory of Tec Unifor, institution maintained by Fundação Edson Queiroz, with MIDTs interdisciplinary methodology.
Property of the VORTEX Laboratory, Universidade de Fortaleza (UNIFOR).
- heitor: [email protected]
- [email protected]