Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Battery consumption for MCU

xboctek

New Member
Hi,

I am planning to use Battery CR2032 for MCU application.
I have decided to go with STM32L031x6

I would like to check mAH consumption of MCU to make sure battery is capable (CR2032 Battery Capacity is 220mAH) for certain hours or days.
Can you please help me how to do the calculations.
From controllers-
I am using Internal CLOCK, one SPI protocol, one I2C Protocol and 3 GPI (Interupts) and 1 ADC

I need general power consumption to start for battery?
 
The datasheet will give you the sleep consumption. You then tell us the amount of time you want the system to be awake and the input impeedance on the ADC and the current consumption of the external SPI device and the I2C device..

Cheers
 
I'll tell you now, the calculations from the datasheet will be considerably lower than in real life, at least in my experience.

I do a LOT of low power micro-controller designs, using PIC's and mostly using a 32KHz xtal on TMR1 to create 1 second interrupts for an RTCC, and also waking up from the change of various I/O pins.

For advice, shut down EVERYTHING you can when in sleep - use I/O pins to switch power to external devices, so there's no power at all to them in sleep, disable all internal peripherals, and also set the I/O low (or high) to prevent any current leakage that way.

In general, anything below 100uA is usually considered 'satisfactory', and I would suggest you buy a "Current Ranger", which gives you mA, uA and nA current ranges. Normal meters aren't very good for low currents.

My current design project runs at 50-60uA, and only goes higher when you operate the display on it to display readings, the unit also auto-switches OFF if you don't press a button for a certain period, adjustable from 10 seconds to 90 seconds. You need to make certain people don't just leave it turned ON.
 
When you do low power work also look at parts that can turn off individual
internal peripherals off. Like ARM based mixed signal parts like PSOC.



These are parts that have internal capabilities shown below, multiple copies of
those resources in most cases :

1746619284357.png


Regards, Dana.
 
Don't most devices include that functionality?.
I'll let you do the survey of manufacturers and device families.

ChatGPT says :

Most modern microcontrollers (MCUs) and microprocessors (MPUs) allow some form of peripheral power management, such as gating clocks or switching off power domains to peripherals, to save power. However, some manufacturers and families do not provide full control over internal peripheral power, especially in lower-end or older devices.


Here are a few general examples of microprocessor or microcontroller families where turning off internal power to peripherals is limited or not possible:




Microcontroller Families with Limited or No Peripheral Power Gating:​


1. Microchip PIC16 and PIC18 (8-bit families)


  • These MCUs typically lack fine-grained power gating.
  • You can disable clocks to peripherals (via registers like PMCON or PIE), but cannot truly shut off power to them.
  • Power savings are mostly achieved through sleep modes or reducing clock speed.

2. Atmel (now Microchip) AVR 8-bit MCUs


  • Similar to PIC, you can disable clocks to peripherals using PRR (Power Reduction Register).
  • Power is not fully cut—just clock gating is available.
  • No deep power domain isolation for individual peripherals.

3. Older STM32 Families (e.g., STM32F1)


  • STM32F1 does not support advanced power domains per peripheral.
  • Peripheral clocks can be turned off via RCC, but not full power gating.
  • Later STM32 families (like STM32L4, STM32H7) have better peripheral power management.

4. Texas Instruments MSP430


  • Very low-power focus but still lacks true per-peripheral power control.
  • You can stop clocks and enter low-power modes, but internal power to peripherals isn't usually switchable individually.



Key Distinction:​


Most MCUs disable peripheral clocks, not actual internal power to the silicon area. True power gating is more common in:


  • High-end MPUs (e.g., ARM Cortex-A with power domains)
  • SoCs (e.g., Qualcomm Snapdragon, NXP i.MX)
  • FPGAs with soft-core MCUs and custom power domains



Summary Table:​


ManufacturerMCU FamilyCan Turn Off Peripheral Power?
MicrochipPIC16/PIC18❌ Clock only
Microchip (Atmel)AVR (ATmega328)❌ Clock only
STMicroelectronicsSTM32F1❌ Clock only
STMicroelectronicsSTM32L4/H7✅ Partial (some peripherals)
Texas InstrumentsMSP430❌ Clock only
NXPLPC8xx❌ Limited
NXPi.MX RT✅ Yes (advanced power domains)
Nordic SemiconductornRF51❌ Clock only
Nordic SemiconductornRF52/nRF53✅ Better power control



Would you like details on a specific family or project use case?
 
In my experience, it is not only static mA consumption but the mA-Hr consumption that matters. And this not only depends on the tasks that the microcontroller is executing, but also how it is executing them.
For instance, speaking of I2C communications: operation in HS mode vs Std mode may yield lower mA-Hr consumption in the former, even though the actual mA consumption is a little higher. For the simple reason that the I2C bus is active for a shorter time period.

And I agree with Nigel; you have to actually measure the values.
 
Either a very poor list, or a very antiquated one :D

Most PIC's have long since allowed peripherals to be powered down via the PWD registers, with many devices being called 'nanoPower.
uChip has ~ 20% of Market, how about the rest ? Not to minimize how much
of the HW is controllable of total chip HW. What is being powered off, complete clock
trees or a node or two.

Most PIC's have long since

"Most", "long",,,,,,very precise terms.

Yes, ChatGPT is learning.:D

@OP, Note as schmitt trigger implies end application greatly affects power consumption,
datasheet values just a guide to consider.
 
Last edited:
Also, your quoted battery capacity is only rated for a continuous, low current value of only 0.19 mA.
Higher continuous current, or worse high current pulses, will decrease the actual mA-Hr capacity.

See attached file
 

Attachments

  • cr2032.pdf
    181.6 KB · Views: 0

Latest threads

Back
Top