cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate power consumption for a particular duration ?

ravivarmaalways1st
Associate II
Posted on November 08, 2016 at 10:28

Hi All,

How can I calculate power consumption of STM32 MCU (only ADC peripheral is turned on) for a period ?

From the Data Sheet it is given that for 100Mhz Clock it consumes 12.6mA, How much it consumes for 1 second of  operation?

Thanks in advance,

#clive1 #!stm32f4
3 REPLIES 3
jpeacock23
Associate III
Posted on November 08, 2016 at 14:48

Basic electronics, P = E x I (power equals voltage times current).  That's for a point in time.  For energy measure watts (power) over a period of time (hours), which yields watt-hours.  That's what the power company bills for, and how battery capacity is measured.  You also want to look for peak power demand as your application runs, since that determines how big your power supply or battery must be.

At your power supply (assuming constant voltage) connect a meter in line to measure current.  Take samples periodically for some period of time and integrate for total power consumed.  Chances are your load will vary, which is why you take samples instead of a single measurement.  This is why power meters exist.

All that assumes a DC load.  If you are also switching AC as part of your application, or you use an AC switching power supply, it gets more complicated since you have to account for power factor.

Walid FTITI_O
Senior II
Posted on November 09, 2016 at 16:12

Hi a.akhil

,

Calculating or measuring  the application's average current consumption is necessary to estimate thepower budget of the application and deduce the battery life for such portable application.

The time spent in each mode and the corresponding current consumption helps us tocalculate an estimated value of the whole application average current consumption. Theformula of the average current consumption is as follows:I average = (IRUNx * TimeRUNx + Istandby * Timestandby + Isleep1 * Timesleep1 + Istop * Timestop +Isleep2 * Timesleep2 + Isleep3 * Timesleep3 ) / Total Time

Now to calculate, the current for Run or sleep mode where there is activated peripheral, you should consider the power consumption of the “All peripheral disabledâ€� in sleep mode ( CPU off, fixed VDD) , then add the activated peripheral consumption and you in addition the bus consumption where the activated peripheral is located (AHB/APB1/APB2). [values taken from electical part in  Datasheet]

Another way, you can use the power consumption calculator (PCC) in STM32CubeMX that returns Average of current consumption, Battery life… these data are taken from the MCU datasheet or interpolated from a user specified bus or core frequency.

VDD parameter is fixed according to VDD values presented on datasheets.

-Hannibal-

Walid FTITI_O
Senior II
Posted on November 09, 2016 at 16:13

Hi a.akhil

,

You should consider the power consumption of the “All peripheral disabled� in sleep mode ( CPU off) and add the activated peripheral consumption. You should the add the bus consumption where the activated peripheral is located (AHB/APB1/APB2).

Also, the power consumption calculator (PCC) in STM32CubeMX returns Average of current consumption, Battery life… these data are taken from the MCU datasheet or interpolated from a user specified bus or core frequency.

VDD parameter is fixed according to VDD values presented on datasheets.

Otherwise I will raise this request to our MX team as enhancement.

-Hannibal-