The Heart Box is a modular system for real-time physiological monitoring, designed for indoor cycling sessions (spinning classes) and stationary bike training. It collects heart rate and body temperature data using PPG sensors, smartwatches, and thermal cameras. The system integrates an Android app, smartwatch app, ESP32 microcontrollers, and a cloud backend for both individual and group usage.
- Caroline Ribeiro
- João Rodrigues
- Júlia Abrantes
- Mateus Fonte
- Nicole Rakov
- Theo Paschôa
- Supervisor: Prof. José Maria Fernandes
- Microcontrollers: ESP32-DevKitC, ESP32-CAM
- Sensors: MLX90640 (thermal camera), SEN0203 PPG sensor
- Mobile App: Android (Kotlin, Jetpack Compose)
- Smartwatch: Samsung Galaxy Watch 4 (WearOS)
- Communication: BLE (Bluetooth Low Energy), MQTT (Mosquitto)
- Cloud: Microsoft Azure (Dockerized backend)
- Backend Stack: Node-RED, InfluxDB, Grafana
- Other Tools: OpenCV, Docker, DataStore, RTC
- User profile setup with HRmax estimation
- Real-time display of heart rate and temperature
- Heart rate zone tracking and feedback
- Support for both solo and group training modes
- MQTT publishing to backend (cloud/local)
- Offline mode with local storage
- BLE/WebSocket auto-reconnect
- PPG heart rate acquisition (using Galaxy Watch 4 sensors)
- BLE broadcasting to Android app
- Lightweight UI with Jetpack Compose
- Low power consumption design
- Docker on Azure VM
- Services: Mosquitto (MQTT), Node-RED (logic), InfluxDB (time-series DB), Grafana (dashboards)
- User and group dashboards
- Real-time monitoring for instructors
To replicate this project, you will need the following hardware components:
-
ESP32-DevKitC
A development board based on the ESP32 microcontroller used for reading sensor data and sending it via BLE or Wi-Fi.
ESP32-S3-WROOM-1 Datasheet -
SEN0203 PPG Sensor
A photoplethysmography (PPG) sensor used for measuring heart rate by detecting blood volume changes.
SEN0203 Datasheet -
ESP32-CAM
An ESP32 board with a built-in camera module, optionally used for image capture or future enhancements.
ESP32-CAM Datasheet -
MLX90640 Thermal Camera
An infrared thermal imaging sensor for non-contact body temperature measurement.
MLX90640 Datasheet -
DS3231 RTC (Real-Time Clock)
A high-precision clock module to timestamp sensor data accurately.
DS3231 Datasheet -
Samsung Galaxy Watch 4
A WearOS smartwatch used to collect heart rate data through its built-in optical sensors. Communicates with the smartphone app via BLE.
Product Page
To set up and run the project, you will need:
-
Android Studio
For building and deploying both the smartphone and smartwatch applications. -
ESP-IDF or Arduino IDE
For compiling and uploading the ESP32 firmware that interfaces with the sensors. -
Azure account or local machine
To host the backend infrastructure (Dockerized services). -
Physical devices
- ESP32-DevKitC
- SEN0203 PPG sensor
- MLX90640 thermal sensor
- ESP32-CAM (optional)
- DS3231 RTC
- Samsung Galaxy Watch 4 (WearOS)