Skip to content
CARP Docs
Ask AISystemLightDark
On this page

Movesense Sampling Package

Collect heart rate, ECG, movement and tap events from Movesense sensors in a CARP Mobile Sensing study.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

carp_movesense_package adds Movesense sensors as connected devices to a CARP Mobile Sensing (CAMS) study. While worn, the sensor streams heart rate, RR intervals, single-channel ECG, movement and taps to the phone over Bluetooth Low Energy (BLE).

The package talks to the sensor through the Movesense mobile library (MDS), which the carp_movesense_flutter plugin bundles for Android and iOS.

pub.devAPI referenceGitHub

Features

Heart rate

Average heart rate in beats per minute and an RR interval in milliseconds, computed by the sensor from its ECG signal.

ECG

Single-channel ECG at 125 Hz, delivered in batches of raw samples with the sensor's own timestamp.

Motion

Samples from the sensor's inertial measurement unit (IMU) at 13 Hz, delivered in batches.

Taps

An event each time the participant taps the sensor. A tap can start another task, such as a 30-second ECG recording.

Measure types

The package provides six measure types in the dk.cachet.carp.movesense namespace:

Measure typeDataAndroidiOS
dk.cachet.carp.movesense.deviceinformationModel, serial number and firmware version of the sensorYesYes
dk.cachet.carp.movesense.stateSingle taps on the sensorYesYes
dk.cachet.carp.movesense.hrAverage heart rate and an RR intervalYesYes
dk.cachet.carp.movesense.ecgBatches of single-channel ECG samples at 125 HzYesYes
dk.cachet.carp.movesense.temperatureTemperature inside a Movesense MDYesYes
dk.cachet.carp.movesense.imuBatches of IMU samples at 13 HzYesYes

See Measure types for the fields, units and example data of each measure.

Known issues in version 3.1.0

TEMPERATURE collects no data, and the gyroscope and magnetometer lists of IMU hold accelerometer values. See Temperature and Motion.

Supported models

The package supports three Movesense sensors:

SensorDevice typeTemperature
Movesense Medical (MD)MDYes
Movesense Active HR+HR_PLUSNo
Movesense Active HR2HR2No

All three measure single-channel ECG, heart rate, RR intervals and movement. After the sensor connects, the device manager sets movesenseDeviceType to one of these values, from the hardware type that the sensor reports. The Movesense MD is a Class IIa medical device under the EU Medical Device Regulation 2017/745.

Requirements

ComponentRequirement
Dart SDK3.12.2 or later
Flutter3.44.2 or later
carp_mobile_sensing2.2.0 or later
AndroidAPI level 24 (Android 7.0) or later
iOS15.0 or later
SensorA Movesense MD, Active HR+ or HR2
TestingA physical phone. The bundled Movesense library has no x86_64 build for Android emulators and no build for the iOS simulator on Apple silicon Macs.

See Installation for the platform setup.

How it works

The sensor is a connected device of the phone. The phone connects to it, subscribes to the sensor's data and stores what arrives:

flowchart LR
    Sensor["<b>Movesense sensor</b><br/>worn by the participant"] -->|BLE| Phone
    subgraph Phone["Phone app"]
        direction TB
        Manager["<b>Device manager</b><br/>connects through MDS"] --> Probes["<b>Movesense probes</b><br/>one subscription<br/>per measure"]
        Probes --> DataManager[("<b>Data manager</b><br/>stores or uploads<br/>the measurements")]
    end
  • Movesense sensor: measures ECG, heart rate, movement and taps, and sends them to the phone over BLE.
  • Device manager: MovesenseDeviceManager connects to the sensor through MDS, identifies its model and checks its battery.
  • Movesense probes: one probe per measure subscribes to a resource on the sensor, such as Meas/HR, and turns each notification into a measurement.
  • Data manager: stores or uploads the measurements, as the data endpoint of the protocol specifies.

The app connects the sensor at runtime: it asks for the Bluetooth permissions, finds the sensor and binds it to the MovesenseDevice in the protocol. See Connecting a device.

Next steps

Installation

Add the package to a CAMS app and configure Android and iOS.

Quickstart

Build an app that prints heart rate and ECG from a sensor.

Connecting a device

Find, bind and connect a sensor, and follow its status.

Measure types

The six measure types, with their fields, units and example data.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture