MotionPI
Wearable biosignals · Free-living health data
MotionPI: a privacy-first wearable-sensing platform that captures clean, free-living PPG (for HR/HRV), tri-axial accelerometry, and ENMO for an NIH health study — with real-time on-device MVPA detection, ~7.7M records/day, and zero malformed writes.
Pacific Islanders.
The lab disappears into daily life.
Every data point — across every channel — carries its own timestamp into MongoDB.
From MongoDB the signals return — embeddings, activity, and denoising: keep what both wrists share, drop what only one saw.
Two wrists, one heart — and ENMO activity tracks the beat, validating the PPG (activity and heart rate move together).
MotionPI
MotionPI: a privacy-first wearable-sensing platform that captures clean, free-living PPG (for HR/HRV), tri-axial accelerometry, and ENMO for an NIH health study — with real-time on-device MVPA detection, ~7.7M records/day, and zero malformed writes.
100 participants, two wristbands each — PPG, motion, ENMO, GPS and in-the-moment surveys, 7.7M records a day into MongoDB with zero malformed writes.
Overview
Collecting clean biosignal data outside the lab
Wearable health-sensing models depend on the quality of the physiological data they are trained on, and that data is hardest to keep clean outside the lab. In free-living conditions phones run out of battery, Bluetooth connections drop, networks become unavailable, and the operating system suspends background applications. Each reading lost or corrupted by those failures is missing from the dataset.
MotionPI is designed on the assumption that each of these failures will occur and that no data may be lost when they do. It turns BLE wristbands and a smartphone into a reliable source of free-living physiological data — PPG for heart rate and HRV, tri-axial accelerometry, and wristband-computed ENMO — writing every reading locally, validating it against a schema, and syncing only when it is safe, so a dropped connection costs seconds of buffering rather than hours of sensor data.
I built and deployed it in the Kahlert School of Computing at the University of Utah, advised by Jeff M. Phillips, in close collaboration with the Department of Health & Kinesiology, the Huntsman Cancer Institute, the College of Social & Behavioral Science, and wearable-hardware teams at Ohio State’s College of Engineering.
The study
An NIH-funded field study of physical activity
MotionPI powers an active, multi-million-dollar NIH-funded behavioral study — Using Momentary Measures to Understand Physical Activity Adoption and Maintenance among Pacific Islanders in the United States — led by PI Professor Neng Wan. It uses momentary, in-the-wild measurement to understand how Pacific Islander communities adopt and sustain physical activity over time.
The signal
Free-living ENMO and on-device activity detection
The wristbands compute ENMO (Euclidean Norm Minus One, a gravity-adjusted measure of acceleration magnitude) continuously and stream 15-second averages to the phone. The chart below is sixteen days of that signal from the study: activity concentrates in waking hours and falls to near zero overnight, the free-living structure that health-sensing models are evaluated against.
Sixteen participant-days of free-living ENMO from one consented participant. The chart is live: hover a point for its value, drag across it to zoom into a window, double-click to zoom back out, and click a legend entry to show or hide that layer. De-identified; the full study lives on the University of Utah CHPC. Open full screen ↗ · code
A screen capture of the chart above in use: hovering a point to read its value, dragging across the plot to zoom into a window, zooming back out, and toggling layers from the legend.
That same signal drives the study’s surveys. When 70% of the ENMO values in a 7-minute sliding window exceed 100.6 mg, the period is classified as moderate-to-vigorous physical activity (MVPA), and the wristband sends a trigger bit to the phone, which delivers an Ecological Momentary Assessment (EMA) survey at that moment. Retrospective surveys ask participants to recall how they felt hours after the fact; MotionPI asks during the activity itself, because the wristband detects it as it occurs.
This mechanism lets the study capture the contextual, psychosocial and environmental factors surrounding real physical activity, which retrospective recall cannot recover.
System design
Application, wristbands and backend
A Flutter application senses continuously, survives backgrounding, buffers data offline and recovers from interruptions automatically. The wristbands stream IMU and ENMO values along with battery, storage and charging state, and the application maintains the BLE link through reconnection and resubscription logic. Data is written to a Node.js and Express backend, where MongoDB accepts only schema-validated records. This pipeline sustained roughly 7.7 million records per day with no malformed writes.
MotionPI app states: connectivity, wristband battery and storage, data-collection indicators, BLE status, and EMA survey interfaces.
The wristbands extend the MotionSense HRV research platform — a full biosignal suite with on-device processing and 30-day onboard storage, streaming summaries and activity triggers to the phone while archiving raw high-rate waveforms locally.
Five-second GPS trajectory from a test participant, showing the positional accuracy recoverable after secure decryption. Raw traces stay encrypted, pseudonymized, and unlinked to personal identity.
Validation
Pre-pilot end-to-end testing
Before enrolment began we validated the pipeline end to end. Left- and right-hand wristbands were shaken in separate bags to simulate continuous activity and trigger the seven-minute MVPA rule. The wristbands detected the activity, transmitted the trigger bit over BLE, and the phone delivered the EMA survey, confirming firmware, BLE synchronisation, application logic and sensor integration together. The PPG sensors (green indicator) remained active throughout for HR and HRV measurement.
Monitoring
Participant compliance reporting
Running a multi-week field study requires knowing, day to day, whether each participant's device is collecting data. The MotionPI Active Participants Report is a MongoDB-backed tool that summarises every data stream (location, ENMO, surveys, logs and battery) for a configurable time window and timezone, and reports per-participant disconnects, data-collection toggles, expired surveys and denied PA surveys, so that the study team can intervene while there is still time.
Measured impact on wear adherence
Coordinators use the report to spot wristbands going quiet and follow up the same week. The study team reports typical per-participant wristband records rising from ~400–600 to 700–800, with some participants reaching 1,000 — verified as genuinely more wear time, not a display artifact — recovering signal that would otherwise have been silently missing from the dataset.
For non-technical collaborators the tool ships in three forms: a command-line report, a Flask web application with interactive tables, charts and CSV/PNG export, and a packaged double-click application (PyInstaller, Apple Silicon and Intel) that starts the server and opens a browser without requiring a Python install. An in-app help page and a log-event reference define every metric and give MongoDB query examples. The system follows secure-by-default practices: no secrets in the repository, localhost binding, optional API-key protection and configurable CORS.
Choose a time window and data sources, run the report, and explore per-participant tables and charts with CSV/PNG export.
Publication
Designing a Secure and Resilient Distributed Smartphone Participant Data Collection System
The system design and reliability framework described above, published at EAI SmartSP 2025.