Perform computations on Movesense, transmit only the results
This approach is more energy-efficient than sending large amount of data through BLE and processing them on the mobile side. BLE is not designed for streaming data. This might also cause problems with stability of the BLE connection.
Avoid subscribing sensors at frequencies higher than needed
Up to 52 Hz, accelerometer runs in low-power mode. There is significant difference in power consumption between 52 and 104 Hz. Higher frequency also means higher CPU load in order to process data.
Perform sanity checks to incoming data
Each Movesense sensor notification has a timestamp value attached. It is a good idea to perform sanity checks for data it self as well as timestamps to detect missing data and invalid measurements.
For example packets lost in communications can be noticed when timestamp difference is double or triple of the usual. Sensor FIFO overflow situation (can happen on high ECG samplerates) is detected by longer, non-multiple difference of timestamp values.
Also data values themselves can indicate an issue. For example ECG is typically +-5mV or less. If the received ECG are much higher there is external interference (e.g. static electricity) that is not valid data.
Avoid staying connected for longer than needed - prefer connections on demand
Movesense system automatically reduces CPU frequency based on computation demand so this is the easiest way to reduce power consumption. After unsubscribing all providers and disconnecting Bluetooth you can get down to as low as 10uA current consumption, while still maintaining all aplication data and RTC (Real-Time Clock):
Unsubscribe from all un-needed providers. This depends on what kind of an event you want to use to wake up sensor again. For example, you can unsubscribe from all providers and use a timer to wake the sensor up, or subscribe only for system states and wait for any movement event to occur.
Disconnect BLE (there are two ways):
Turn off advertising in Movesense application and disconnect mobile from Movesense:
Use BLE Disconnect from Movesense API. It'll turn off advertising automatically and disconnects from mobile. Mobile will try to reconnect until Movesense application turns on advertising again.
Check connection handle using GET on /Comm/Ble/Peers (usually connection_handle = 0 for single point BLE connection):
asyncDelete(WB_RES::LOCAL::COMM_BLE_PEERS_CONNHANDLE::ID, AsyncRequestOptions::Empty, (int32_t) connection_handle );
Wait for subscription or timer to turn on advertising again.
Note! If something goes wrong with your BLE wakeup procedure and you're unable to wake up your device again, you can manually enable DFU mode (device firmware update) and flash the sensor with working firmware. ( Refer to: FAQ )
If possible, use system mode Full Power Off when device is left unused for a longer period of time
Device can be woken up by a configurable event from accelerometer (any movement, single tap, double tap, etc.) or analog front-end (AFE, by touching HR belt connectors). However, be aware that system time will be reset during full power off.