Back to project map
Independent project · Use CaseBiomedical Hardware · Database Connectivity · Clinical Platform & Patient Management

Patient Monitoring Bracelet

An end-to-end remote monitoring system combining an IoT wristband prototype with a telemedicine web platform.

IoTESP32C++FastAPISvelteKitPostgreSQLMQTTDocker
10.0 / 10Final GradeHonours Degree (Matrícula de Honor)
100 HzSampling RateMAX30102 PPG Red/IR
RAM BufferOffline ResilienceZero loss on Wi-Fi drops
End-to-EndEcosystemC++ · MQTT · FastAPI · SvelteKit
System Topology & Pipeline

End-to-End IoT & Telemedicine Architecture

01 · Sensors
I2C (100Hz)
02 · Edge Core
Wi-Fi · MQTT
03 · Broker
Ingest REST
04 · Cloud Server
HTTPS / Nginx
05 · Telemedicine UI
Selected Architecture Node

ESP32 LilyGO TTGO T-Display

Edge Processing & Circular Buffer

C++FreeRTOSNTP Clock SyncTFT 1.14" DisplayRAM FIFO
Engineering Function

Dual-core 240MHz SoC. Runs signal filtering, handles TFT screen UI, synchronizes timestamps via NTP, and maintains an in-memory circular buffer for offline resilience.

Data Pipeline Role

Packages metrics into compact JSON payloads. If Wi-Fi is lost, buffers readings locally and flushes automatically upon reconnection.

ENGINEERING CASE STUDY

System Architecture & Implementation Story

01

The Clinical & Engineering Challenge

Passive home telemonitoring with guaranteed reliability

Demographic aging demands continuous, non-invasive home monitoring that enables clinicians to supervise patient vitals without requiring technical intervention from the elderly.

The core challenge was designing a complete end-to-end system: from custom biomedical sensor circuitry and embedded firmware up to a multi-tenant clinical web platform. The system needed to guarantee data integrity across unstable home Wi-Fi networks, detect falls in real-time, and provide clinicians with actionable historical trends.

  • Passive telemetry without elder burden
  • Multi-sensor fusion: Optical PPG + 6-Axis IMU
  • Automatic fallback during wireless dropouts
Hardware test bench on breadboard Enlarge
Laboratory breadboard circuit integrating the ESP32 TTGO T-Display and operational I2C sensors.
02

Embedded Firmware & Edge Processing

Dual-core ESP32, optical PPG sampling & offline circular buffer

The wearable device is built on an ESP32 LilyGO TTGO T-Display SoC with an integrated 1.14" color TFT screen. The C++ firmware orchestrates two primary biomedical sensors over an I2C bus:

  • MAX30102 Optical PPG: Emits red and infrared wavelengths at 100 Hz through capillary tissue to extract raw photoplethysmogram waveforms, estimating pulse (BPM) and blood oxygen saturation (SpO₂).
  • MPU-6050 6-Axis IMU: Samples triaxial accelerometer and gyroscope vectors. An edge algorithm computes signal vector magnitude (SVM) to detect abrupt impact spikes followed by post-fall immobility.
  • Resilient Circular Buffer: If Wi-Fi connectivity drops, readings are preserved in a local RAM ring buffer with synchronized NTP timestamps, avoiding data loss until the broker becomes reachable again.
  • C++ firmware with modular sensor drivers
  • NTP epoch timestamping for analytical consistency
  • Local TFT visual status and battery feedback
Wristband prototype measuring heart rate on finger Enlarge
Live optical photoplethysmography acquisition and on-screen metrics presentation on the wearable prototype.
03

IoT Messaging & Decoupled Broker Pipeline

Lightweight publish/subscribe model using Eclipse Mosquitto

To optimize battery life and minimize network overhead on the wearable, the system implements MQTT through an Eclipse Mosquitto broker:

  • Structured Topics: Clear namespace partitioning (patient/{id}/vitals, patient/{id}/alerts/fall, patient/{id}/events).
  • Compact JSON Payloads: Efficient data serialization containing biometric metrics, signal quality indicators, and NTP timestamps.
  • Quality of Service (QoS 1): Critical events like emergency button triggers and detected falls use confirmed delivery to ensure reception by medical ingest services.
  • Asynchronous event decoupling
  • Minimal byte transmission overhead
  • QoS guarantees for patient safety alerts
04

Telemedicine Web Platform & Clinical UX

SvelteKit frontend, async FastAPI backend & role-based workflows

The clinical web application was built with a modern containerized microservice architecture using Docker Compose:

  • Asynchronous FastAPI Core: REST API written in Python with SQLAlchemy and Pydantic validation, storing long-term clinical records in PostgreSQL and temporal sessions in Redis.
  • SvelteKit Clinical Portal: Highly responsive frontend providing three role-tailored dashboards:
    • Doctor Portal: Patient cohort overview, pathology tagging, alarm resolution center, and daily study charts with interactive time-series powered by Chart.js.
    • Patient Portal: Accessible self-monitoring view with intuitive health status indicators and secure doctor chat.
    • Administrator Portal: System configuration and access management.
  • Interactive daily studies and Chart.js graphs
  • Color-coded risk ranges for abnormal vitals
  • Complete containerized Docker Compose deployment
Clinical daily study screen Enlarge
Interactive doctor dashboard with vital sign progression charts, risk ranges, and activity breakdown.
Media & Demonstration Gallery

Visual Artifacts & Working Prototypes

Wristband prototype measuring heart rate on finger EnlargeHardware & Sensors
Live Wristband Prototype Measuring Vitals

Real optical pulse acquisition and OLED/TFT display feedback during laboratory evaluation.

Hardware test bench with ESP32 TTGO T-Display and sensors EnlargeHardware & Sensors
Breadboard Circuit with ESP32 & Sensors

Integrated test bench showing LilyGO TTGO T-Display connected to MAX30102 and MPU-6050 modules.

Electronic circuit schematic diagram EnlargeHardware & Sensors
Electronic Wiring & Pinout Schematic

Hardware wiring diagram connecting TTGO GPIOs to I2C lines (SDA/SCL), power rails (3.3V), and physical push buttons.

Clinical daily study screen with vital signs charts EnlargeWeb Platform
Daily Clinical Study & Vital Signs Charts

Medical dashboard view displaying daily steps, average BPM, SpO₂ levels, activity breakdown, and time-series progression.

Physical Wristband Hardware Demonstration

Video walkthrough demonstrating sensor reading, step counting, and on-screen TFT interface on the physical prototype.

Telemedicine Web Platform Demonstration

Video walkthrough of the web application: authentication, patient monitoring, charts, alarms, and doctor-patient chat.

Academic Recognition

BSc Dissertation in Health Engineering & Bioinformatics

Presented at the University of Málaga with maximum grade: 10.0 / 10 and Honours Distinction (Matrícula de Honor). Supervised by Cristian Martín Fernández and Daniel Garrido Márquez.