quiet bee.

TECHNICAL NOTEBOOK / BATTERY LIFE

Size a battery using measurements.

The processor's sleep current does not describe an entire board. The regulator, LED, sensor and modem can determine the final battery life.

Quiet Bee editorial team · Updated: 1 November 2026
Educational examples to adapt; hardware validation is specified in each article.

1. Break down a real cycle

Describe the successive states: boot, sensor stabilisation, acquisition, network connection, transmission, then sleep. Measure the duration and current of each state at the power input of the complete setup. To compare two versions, keep the same supply voltage, radio signal and sampling interval.

A modem searching for a network for one minute can use more energy than a successful exchange lasting a few seconds. Also measure a cycle without a network. In the firmware, give each attempt a maximum duration to prevent a fault turning a periodic system into an always-on system.

2. Distinguish three levels of sleep

StateWhat can remain activeConsequence
Display hibernationESP32 and power supplyThe image remains visible, but the microcontroller may still consume power.
ESP32 in deep sleepRegulator, LED, modem, sensorsThe code restarts on wake-up; peripherals are not automatically switched off.
Setup with switched powerWake-up circuit and leakageRequires a suitable schematic, controlled GPIO states and electrical validation.

3. A minimal timed wake-up

Example for Arduino ESP32 support: this program counts wake-ups in RTC memory, then sleeps for one minute. It does not configure a sensor or modem. A complete power loss clears the counter; do not use it as a permanent measurement identifier.

#include <Arduino.h>
#include <esp_sleep.h>

RTC_DATA_ATTR uint32_t reveils = 0;

void setup() {
  Serial.begin(115200);
  delay(200);
  Serial.printf("Reveil %lu, cause %d\n",
                (unsigned long)++reveils,
                (int)esp_sleep_get_wakeup_cause());
  // Lire le capteur et terminer les échanges ici, avec délais bornés.
  // Mettre chaque périphérique dans son état de repos documenté.
  Serial.flush();
  esp_sleep_enable_timer_wakeup(60ULL * 1000000ULL);
  esp_deep_sleep_start();
}
void loop() {}

Verification: observe several wake-ups in the serial monitor, then measure the setup's power input without USB bypassing the instrument. A 60-second sleep interval is not a total period of 60 seconds: execution time is added. For a strict period, calculate the remaining sleep from the cycle duration.

4. Calculate an order of magnitude

For a cycle, average I = sum(state current × state duration) / total duration. All durations must use the same unit. Ideal battery life in hours is usable capacity in mAh / average current in mA. If voltages differ, work in energy (Wh) and include converter efficiency.

Hypothetical stateFictitious currentFictitious duration
Measurement and transmission100 mA10 s
Setup asleep0.10 mA590 s

In this calculation example, not a Quiet Bee measurement, the average current is (100 × 10 + 0.10 × 590) / 600 = 1.765 mA. A hypothetical usable capacity of 1,600 mAh would give approximately 907 hours, or 38 days. This figure excludes factors including temperature, ageing, self-discharge and network variations; it is not a battery life claim for your board.

5. Workbench measurement protocol

  1. Photograph the setup and record the board, firmware, battery and voltage.
  2. Insert the instrument in series at the common power input; select a range compatible with current peaks.
  3. Check that the instrument's voltage drop does not cause a reset or modem failure.
  4. Record several complete cycles with an instrument able to track transients; a multimeter alone can miss peaks.
  5. Repeat with the network disconnected, then with degraded reception.
  6. Keep the traces, cycle count and conditions before publishing an average.

6. Pitfalls in field setups

The LTE-M project's modem is not automatically powered off when the ESP32 sleeps. A radio command or PSM request does not prove a particular current draw: the network response and module states must be checked. A GPIO indirectly powering an otherwise unpowered peripheral can create a leakage path. Address these points in the schematic before extending sleep durations in the code.

This article does not include an instrumented current measurement campaign. The next experimental step is to publish a complete cycle trace with its conditions, rather than a number copied from the processor data sheet.

Sources and references

The schematics for your hardware reference and the documentation for your software version take precedence over a generic example.