Skip to main content

6 min read1 view

MCU Power Consumption: Estimate Battery Runtime

Estimate STM32, nRF52840 and ESP32 battery life from datasheet currents: duty cycles, LDO and buck losses, temperature columns and coin-cell peak limits.

Felix S. Pavel

Founder & Lead Architect

TL;DR: Dividing battery mAh by one "Run" or "Sleep" figure can miss a battery-life target badly. A real power budget needs four phases (active, radio burst, wake-up, sleep), separate typical and maximum figures at the right temperature, a regulator model including its own current IQ, and a check that the cell can supply the peak. You can run this calculation in our free Power Consumption & Battery Runtime Estimator (with STM32G031K8, nRF52840 and ESP32 examples, no signup required).

1. Start with a phase timeline, not one headline current

Every battery-powered embedded system repeats a cycle. Instead of guessing a single average, split the cycle into time-weighted phases:

I_avg_batt = (I_active_batt * t_active + I_burst_batt * t_burst + I_wake_batt * t_wake + I_sleep_batt * t_sleep) / T_cycle
             + I_reg_IQ + I_self_discharge

In the datasheet rows below, typical and maximum currents are far apart even on one chip. On the STM32G031K8 (page 54), Stop 1 with RTC enabled is 3.7 uA typical but 18 uA maximum at 25 C, and 120 uA maximum at 85 C. Showing only the typical figure turns an estimate into an optimistic guess.

PartMode (datasheet wording)TypMaxPage
STM32G031K8Run (Flash, Range 1, 16 MHz)1.50 mA2.10 mAp. 50
STM32G031K8Run (SRAM, Range 1, 64 MHz)4.30 mA6.00 mAp. 50
STM32G031K8Stop 0 (HSI disabled; 5.6 us wake, flash off)97 uA125 uAp. 53
STM32G031K8Stop 1 (RTC enabled, LSI)3.7 uA18 uAp. 54
STM32G031K8Standby (RTC disabled)0.2 uA0.9 uAp. 54
nRF52840CPU running CoreMark @ 64 MHz from flash (DC/DC)3.3 mAnot statedp. 58
nRF52840System ON, full RAM retention, wake on RTC3.16 uAnot statedp. 56
nRF52840Radio TX only (+8 dBm, DC/DC, 3 V)14.8 mAnot statedp. 354
nRF52840Radio TX only (+8 dBm, LDO)32.7 mAnot statedp. 354
ESP32Deep-sleep mode10 uAnot statedp. 5
ESP32Wi-Fi 802.11b TX (+19.5 dBm)240 mAnot statedp. 53

2. Why a single DC/DC efficiency % breaks in deep sleep

A buck converter rated at 90% efficiency at 20 mA does not stay 90% efficient at 2 uA. Worse, its own quiescent current (IQ) is drawn from the battery 100% of the time:

  • LDO linear regulator: Draws load current 1:1 from the battery (I_batt = I_load + IQ), dissipating (V_batt - V_mcu) * I_load as heat. Often beats a buck in ultra-low-power sleep if its IQ is sub-microamp.
  • Buck DC/DC converter: Scales active current down by (V_mcu / V_batt) / eff_active, but needs a separate light-load sleep efficiency plus IQ. If IQ is 25 uA while your MCU sleeps at 0.2 uA, the regulator burns 99% of your sleep energy.

3. Worked runtime checks (and the CR2032 pulse trap)

The numbers below are checked by the test suite of the estimator described in our Power Runtime Estimator documentation:

ScenarioAvg / CheckOutcomeEngineering Note
STM32G031K8 (100 ms Run @ 16 MHz / 9.9 s Standby, 25 C, direct CR2032, full 235 mAh, no self-discharge)15.2 uA typ / 21.9 uA max644 days typ / 447 days maxBoth rows state a maximum. The 2.1 mA peak is inside the assumed 15 mA coin-cell limit.
The same workload read from the 85 C columns17.1 uA typ / 37.9 uA max573 days typ / 259 days maxWarmth alone takes the worst case from 447 days to 259.
STM32G031K8 (1 s Run @ 16 MHz / 9 s Standby) behind a 25 uA LDO (3.7 V LiPo to 1.8 V, 500 mAh, 90 % usable, no self-discharge)175.2 uA typ107 days typThe regulator's 25 uA is 125 times the 0.2 uA Standby current.
nRF52840 with a 5 ms radio burst of 32.7 mA on a CR203232.7 mA peakNo runtimeThe peak is above the assumed 15 mA limit. A design with a capacitor has to say so.

4. Compare MCUs apples-to-apples with Device Profiles (or via MCP)

During part selection, engineers rarely evaluate one chip. Inside the Power Runtime Estimator (and inside the Power & Battery -> ESTIMATOR tab on any extracted job), you can save a Device Profile (durations, external loads, regulator and battery) and apply it to other uploaded datasheets. A mode the new datasheet does not have is left for you to pick.

If you use Claude, Cursor, or an automated hardware agent, the exact same engine is available for free with no API key as datasheetvend_estimate_power_runtime on our MCP server. Once your power budget passes, check that your peripherals fit on the package without pin collisions with our STM32 Pin-Mux Conflict Solver guide and live Pin-Mux Solver tool.

Frequently Asked Questions

How do you calculate MCU battery runtime accurately?

Model each cycle phase separately (active, radio burst, wake-up, sleep, board load), convert each through the regulator, and average them by time. Add the regulator's own current and self-discharge, then divide the usable share of the cell's capacity by that average. Work out typical and maximum separately, at the temperature your board will see.

Why can a CR2032 fail with an ESP32 or +8 dBm BLE radio even when mAh looks sufficient?

Energizer rates its CR2032 at 235 mAh typical to 2.0 V on a 15 kohm load, a drain of about 0.19 mA. The cell's internal resistance makes its voltage sag under radio bursts of tens or hundreds of milliamps, and the chip can reset long before the rated capacity is used.

Should sleep current include the regulator and external sensors?

Yes. Battery drain in sleep is the MCU's sleep current plus the regulator's own current, sensor standby, pull-up resistors and voltage dividers. A 0.2 uA standby becomes 25.2 uA at the battery behind a regulator that draws 25 uA.

How accurate are datasheet battery-life estimates?

They are fast, first-order selection bounds for shortlisting MCUs before building hardware. Always validate final field life on a power analyzer or precision shunt under real firmware, temperature, and RF retry conditions.

Run one on a datasheet you have.

A new account gets five free passes. Each pass runs up to two modules, pinout and footprint included, on a PDF up to 25 MB.

Sources

  1. STMicroelectronics, STM32G031x4/x6/x8 datasheet, Supply current tables, pp. 50-58 (DS12992 Rev 4)
  2. Nordic Semiconductor, nRF52840 Product Specification, sleep, CPU and radio currents, pp. 56, 58 & 354
  3. Espressif Systems, ESP32 Series Datasheet, Deep-sleep & 802.11b TX currents, pp. 5 & 53
  4. DatasheetVend Power Consumption & Battery Runtime Estimator
  5. DatasheetVend Power Estimator Documentation

Was this useful?

A like tells other engineers it is worth their time.

Keep reading

All articles

Cookies. Necessary ones keep you signed in and save this choice. Optional analytics (Google, Microsoft, PostHog) show how the site is used; Microsoft may also use what it records for advertising. Cookie details