This repository contains the source code, implementation details, and documentation for a Wearable Health Device (WHD) that monitors body temperature and detects falling events. The system is designed using an STM32 Nucleo-L432KC microcontroller and employs machine learning (CNN) for accurate fall detection. This project is my final Embedded System Design course assignment.
- Body Temperature Monitoring ๐ก๏ธ using the TMP102 sensor.
- Fall Detection ๐ using the ADXL345 accelerometer.
- LED and Buzzer Alerts ๐จ for abnormal temperature or falls.
- Machine Learning with CNN ๐ง to improve detection accuracy.
- Real-Time Data Visualization ๐ via serial communication.
-
Hardware
- STM32 Nucleo-L432KC
- TMP102 Temperature Sensor
- ADXL345 Accelerometer
- 9 LEDs & Passive Buzzer
- Breadboard and Jumper Wires
-
Software & Libraries
- PlatformIO (for STM32 development)
- Mbed OS Library
- Python 3.10 (for visualization)
torch,matplotlib,pyserial(for CNN training & visualization & Print information)
Project/: Source code to download into L432KC.Epoch_size_study/: Experiment files for finding the best epoch size.History/: Test files, just omitted.
The device consists of three main modules:
- Temperature Sensor Module ๐ก๏ธ (TMP102)
- Fall Detection Module ๐ (ADXL345 Accelerometer)
- Alert & Communication Module ๐ข (LEDs & Buzzer)
- Traditional threshold-based methods are unreliable.
- CNN learns complex patterns in acceleration data.
- Provides higher accuracy in real-world scenarios.
-
Input: Acceleration data in
$x$ ,$y$ ,$z$ axes (over 5-time steps). - Layers: Convolutional, MaxPooling, Fully Connected.
- Output: Probability of a fall event.
- Dataset: 167 manually labeled samples.
- Epoch Selection: 750 epochs found optimal.
- Accuracy: 76.9% for normal falls, 90% for slow falls.
The device supports real-time monitoring of temperature and acceleration data.
python visualization.pyThis will open a live plot showing:
- Temperature changes over time.
- Detected fall events.
- System status updates.
| Scenario | Total Falls | Correct Detections | False Positives | Success Rate |
|---|---|---|---|---|
| Normal Falling | 30 | 30 | 9 | 100% |
| Slow Falling | 22 | 9 | 1 | 40.9% |
| Temperature (ยฐC) | LED Status | Alert |
|---|---|---|
| 35.5 - 36.5 | Normal | โ |
| 37.0 - 38.3 | Warning | |
| 38.5 - 42.0 | Danger | ๐จ |
- Improve CNN accuracy using more training data.
- Reduce false positives by tuning model parameters.
- Implement wireless communication (Bluetooth/WiFi).
- Enhance power efficiency for prolonged battery life.
- TMP102 Datasheet: Texas Instruments
- ADXL345 Datasheet: Analog Devices
- Wearable Health Monitoring Devices - IEEE
๐ง Email: marcobisky@outlook.com
๐ GitHub: github.com/marcobisky





















