# Power Autonomy Estimation of Low-Power Sensor for Long-Term ECG Monitoring
## 3 Sensor Operating Modes and Energy Consumption Measurements
### Operating Modes  
The wireless ECG sensor supports several operating modes to comply with the power efficiency requirements imposed by its small size and battery operation:  
* Shutdown mode
* Sleep mode
* Idle mode (disconnected mode): fast and slow advertising
* Active mode (ECG sampling).  
In shutdown mode, all the electronic components on the wireless sensor board are disconnected from the battery for maximal power conservation, particularly for storing the device for longer periods of time. In particular, the device consumes fewer than \(2\,\mathrm{nA}\) in shutdown mode, and this consumption is constant as there are no events in this mode of operation. The ECG sensor exits the shutdown mode when it is connected to the charging station.  
When an ECG sensor is powered-on, it switches to idle mode, where it starts advertising itself by periodically transmitting BLE advertising packets. First, it starts in a fast advertising idle mode, where the BLE radio periodically transmits advertising packets. After the fast advertising period is over, the ECG sensor switches to slow advertising idle mode. The faster advertising rate during the fast advertising idle mode enables faster discovery of the ECG sensor by the central device (e.g., smartphone), while the slow advertising idle mode, on the other hand, enables a bit slower discovery of the ECG device while also reducing the power consumption, thus significantly prolonging the sensor's autonomy.  
The central device acts as a BLE scanner device that listens for a few seconds for connectable advertising packets containing the ECG sensor service identification; more than one second is typically required, but five seconds is advised to ensure that the ECG sensor can be discovered in its slow advertising mode. After the ECG sensor is discovered by the scanner, the central device initiates a standard nonencrypted BLE connection with the sensor. The ECG sensor then makes a transition to the active mode of operation: the ECG sensor is connected to the central device and actively streams ECG measurements.  
Following a successful connection attempt, the central device issues several commands over a proprietary protocol defined on top of a client-writable GATT. GATT here stands for Generic Attribute Profile, which is a protocol most commonly used with the BLE. Among others, there are two commands that influence the sensor's power consumption:  
* Transmit (TX) power setting (options are \(0\,\mathrm{dBm}\), \(-6\,\mathrm{dBm}\), \(-12\,\mathrm{dBm}\), \(-18\,\mathrm{dBm}\)). The default in our case is \(0\,\mathrm{dBm}\).
* Sampling rate selection, which is limited to values that divide 32,768. The default in our case is \(128\,\mathrm{Hz}\).  
If the ECG measurement is stopped by the user, then the central device triggers a disconnect. In such an event, the sensor stops sampling and switches to idle mode. In case the sensor battery is drained down to its minimum allowed voltage, the sensor disconnects and switches to shutdown mode, from which it can only be awakened by its battery charger. The last possibility is that the sensor moves out of the radio range and the connection on both devices times out. In this case, the sensor also stops sampling and switches to idle mode.  
The focus in this paper is on the events consuming considerable amounts of energy, i.e., events in idle and active mode. Therefore, in the following, these operating modes are described in more detail regarding their power consumption profiles. First, we give details about the measuring equipment used to obtain the power consumption measurements.