eSense Sampling Package
Collect button presses and motion data from an eSense earable in a CARP Mobile Sensing study.
carp_esense_package connects a CARP Mobile Sensing (CAMS) study to an eSense earbud over Bluetooth Low Energy (BLE). It collects button presses and the raw accelerometer and gyroscope values of the earbud's inertial measurement unit (IMU) while the participant wears it.
eSense is a research earable platform from Nokia Bell Labs, Cambridge. The package connects to the left earbud of the pair, which has the six-axis IMU, a button and the BLE interface. It uses the esense_flutter plugin.
Hardware availability
The eSense site states that the first generation of the eSense platform has reached its end of life and is no longer distributed.
Features
Button events
An event each time the participant presses or releases the button of the earbud.
Motion
Raw accelerometer and gyroscope values of the left earbud, at a sampling rate from 1 to 100 Hz.
Battery
A battery level that the device manager estimates from the voltage of the earbud every 2 minutes.
Measure types
The package provides two event-based measure types:
| Measure type | Data | Android | iOS |
|---|---|---|---|
dk.cachet.carp.esense.button | Button pressed or released | Yes | Yes |
dk.cachet.carp.esense.sensor | Raw accelerometer and gyroscope values on three axes | Yes | Yes |
For the fields and how to convert the raw values, see Measure types.
Requirements
| Component | Requirement |
|---|---|
| Dart SDK | 3.10 or later |
| Flutter | 3.38.1 or later |
carp_mobile_sensing | 2.2.0 or later |
| Android | API level 24 (Android 7.0) or later, on a phone with BLE |
| iOS | 15.0 or later, with CocoaPods |
| Earable | The left earbud of an eSense pair |
| Testing | A physical phone, because emulators and simulators cannot connect to the earbud |
See Installation for the platform setup.
How it works
flowchart LR
Earbud["<b>eSense earbud</b><br/>left earbud with<br/>IMU and button"] -->|BLE| Phone["<b>CAMS on the phone</b><br/>ESenseDeviceManager<br/>and one probe<br/>per measure"]
Phone --> Storage["<b>Data manager</b><br/>stores or uploads<br/>the measurements"]
- The study protocol names the earable only by its role: an
ESenseDeviceconnected to the phone, with the sampling rate of the motion data. - On the phone, the app binds the role to an earbud with its Bluetooth name, such as
eSense-0332.ESenseDeviceManagerscans for that name and connects to the earbud. - When the earbud is connected, CAMS starts the eSense measures. Each button press or release and each motion packet becomes one measurement.
- A data manager stores or uploads the measurements, as the data endpoint of the protocol specifies.
For the binding and the connection status, see Connecting a device.
Next steps
Installation
Add the package and configure Bluetooth on Android and iOS.
Quickstart
Connect to an eSense earbud and print its button and motion events.
Connecting a device
Bind an eSense earbud, connect to it and follow its status.
Measure types
The two eSense measure types, their raw values and timestamps.