System Architecture

End-to-end cyber-physical data processing pipeline:

CPR Manikin Overlay
Pressure & Hall Sensors
ESP32-C3 Firmware
Local MQTT & LocalHub
Dashboards & SQLite

Embedded Sensing

ESP32-C3 microcontroller running FreeRTOS acquires raw pressure and magnetic flux readings, performing zero-rest baseline calculations and state transitions.

Local Networking

Low-latency telemetry and commands are exchanged over a local Wi-Fi router via a dedicated MQTT broker hosted on the instructor's PC without internet dependencies.

LocalHub Desktop Suite

Tauri-based Windows application supervising the local Spring Boot backend engine, local SQLite session database, and web dashboard instances in a one-click setup.

Role-Gated Dashboards

Web interfaces render real-time time-series depth/rate graphs, calculate rule-based coaching flags, and persist structured session records for CSV/JSON export.

Hardware & Mechanical Specifications

Component Current Prototype Specification Functional Purpose
Retrofit Overlay Soft outer cover housing TPU air-bladder structure Fits onto existing training manikins; provides compliant chest response
Pressure Sensing Multi-zone pressure array across compression area Measures compression force, pressure distribution, leaning, and hand drift
Depth Sensing Linear Hall-effect sensor with permanent N52 magnet Tracks vertical sternum displacement and complete chest recoil in mm
Microcontroller ESP32-C3 RISC-V SoC with non-volatile storage (NVS) High-speed ADC sampling, FreeRTOS state engine, Wi-Fi, and MQTT client
User Interface / LEDs Two labelled LEDs (State & Activity) + 2 Multifunction Buttons Displays connection/calibration/session status and handles manual recovery
Audible Metronome Onboard piezo buzzer (~110 CPM rhythm) Provides cadence support to trainees during active practice sessions

Firmware State Machine & Calibration

Nominal Operational Workflow

BOOT → CONFIG_CHECK → PROVISIONING → WIFI_CONNECTING → BACKEND_REGISTERING → MQTT_CONNECTING → PAIRED_IDLE → CALIBRATING → READY_FOR_SESSION → SESSION_ACTIVE → READY_FOR_SESSION

Safety Gating: A training session cannot start until the controller is successfully registered, paired, operating in SENSOR mode, and calibrated against rest baseline P0.

Pre-Session Calibration Checks

  • Rest Position: Verifies that overlay is unloaded and mechanically stable.
  • Sensor Stability: Detects electronic noise, channel drift, or stuck ADC values.
  • Reference Pressure: Establishes zero-rest baseline P0 for force calculations.
  • Displacement & Recoil: Validates Hall-effect voltage curve for accurate depth conversion.
  • Pressure Balance: Checks uniform response across multi-zone bladder array.

Measured CPR Metrics & Targets

Compression Depth

Target: 50–60 mm (AHA Guidelines)

Source: Hall-effect sensor displacement converted via calibrated linear regression model.

Compression Rate

Target: 100–120 cpm

Calculation: Moving average calculated over a rolling 10-second compression window.

Full Chest Recoil

Target: 100% complete release

Detection: Measures whether the chest returns completely to rest position P0 between compressions.

Pause & Interruption Time

Target: < 10 seconds per minute

Detection: Tracks cumulative seconds when compression force remains below active threshold.

Hand-Placement Balance

Target: Centered force distribution

Calculation: Analyzes differential pressure values across multi-zone TPU bladder chambers.

Overall CPR Score

Target: 0–100 Composite Score

Calculation: Configurable, explainable rule-based algorithm evaluating combined compliance.

Software Stack & Desktop Infrastructure

Windows LocalHub Host

  • Tauri desktop app framework with Rust host integration
  • One-click supervisor for local services
  • Automatic LAN IP detection & QR setup generation
  • Native execution on Windows 10 / 11

Backend & Data Layer

  • Spring Boot embedded service framework
  • Embedded MQTT broker for low-latency messaging
  • Local SQLite database persistence
  • Role-based authorization engine

Web Dashboards

  • HTML5 / CSS3 / Vanilla JavaScript frontend
  • Real-time telemetry chart rendering via Chart.js
  • Server-Sent Events (SSE) push updates
  • Responsive layouts for desktop, tablet, and mobile

Reporting & Security

  • CSV / JSON raw and summary data endpoints
  • Instructor coaching notes and session tagging
  • Local-first storage ensuring data privacy
  • Non-blocking optional cloud synchronization