System architecture, hardware design, firmware state models, and software specs for the ResQ platform
End-to-end cyber-physical data processing pipeline:
ESP32-C3 microcontroller running FreeRTOS acquires raw pressure and magnetic flux readings, performing zero-rest baseline calculations and state transitions.
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.
Tauri-based Windows application supervising the local Spring Boot backend engine, local SQLite session database, and web dashboard instances in a one-click setup.
Web interfaces render real-time time-series depth/rate graphs, calculate rule-based coaching flags, and persist structured session records for CSV/JSON export.
| 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 |
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.
Target: 50–60 mm (AHA Guidelines)
Source: Hall-effect sensor displacement converted via calibrated linear regression model.
Target: 100–120 cpm
Calculation: Moving average calculated over a rolling 10-second compression window.
Target: 100% complete release
Detection: Measures whether the chest returns completely to rest position P0 between compressions.
Target: < 10 seconds per minute
Detection: Tracks cumulative seconds when compression force remains below active threshold.
Target: Centered force distribution
Calculation: Analyzes differential pressure values across multi-zone TPU bladder chambers.
Target: 0–100 Composite Score
Calculation: Configurable, explainable rule-based algorithm evaluating combined compliance.