Running fast to save power -

Running fast to save power


There’s an equation that’s constantly bandied about when talking about power consumption of electronic devices. If you’re designing battery-operated ultra-low-power devices, it’s critical that you, well, ignore it.

Power is proportional to junction capacitance times the voltage squared times the frequency, multiplied by the time the system is awake. I have seen engineers’ eyes light up by the V-squared term; they immediately start looking for a way to lower Vdd to get more battery life.

As we’ll see in a future article, there is some benefit to dropping the power supply voltage. But this equation is irrelevant to ultra-low power systems because it measures power – watts – not current. High-performance systems live and die by power; have you seen the cooling towers on desktop CPUs? Battery-operated systems are constrained by battery capacity, which is measured in amp-hours; typically the units are milliamp hours (mAh). Power is not the issue for figuring battery lifetime.

Think in terms of current.

The following graph shows how one of Microchip’s nice low-power MCUs uses current as a function of clock frequency:

Note that doubling the clock rate from one to two MHz uses much less than twice the current. The reason is that the CPU is only one of the powered components. Memory and peripherals suck coulombs, too, and not all of these needs vary with clock frequency. There’s a static, constant draw, and one which is a function of frequency. It’s not hard to pick points off the graph at 3.5 volts and solve a couple of simultaneous equations, which gives:

Constant current: 0.39 mA
Dynamic current: 0.11 mA/MHz

At one or two MHz most of the current is used by constant loads. At higher frequencies the constant draw is still significant. It’s clear that wise designers will run at the max possible clock rate to get back to sleep as quickly as possible. This is the advice given by all of the MCU vendors.

And it’s wrong. Or at least naïve.

Recently I showed how a battery’s internal resistance increases as it is depleted , and included the following graph, which shows the voltage delivered by the battery depending on load.

Click on image to enlarge.

If one were to follow the advice to run as fast as possible, coming out of a sleep state means the system will be drawing perhaps a lot of current. Over time, the battery’s internal resistance will increase to a point where it may have a lot of capacity left, but cannot power a speedy current-hungry MCU. Wake up, and Vdd drops below the minimum allowed, so the processor crashes.

At least one series of MCUs advertised for ultra-low power operation consumes 200 uA/MHz, maxing at 48 MHz. That’s about 10 mA just for the MCU. The battery might not be able to sustain a 10 mA load, but at 1 MHz – 200 uA – it can have plenty of life left.

The moral is to wake up at a low clock frequency. Ramp it up while watching Vdd, stopping a bit above the MCU’s cutoff point. Be sure to factor in the needs of I/O you’ll be powering up.
Alternatively one could apply some a priori knowledge (e.g., track consumed mAh in the code and use data such as in the graph above to estimate the operating point) to set the clock frequency.

But if you take the vendors’ advice and wake up at full throttle, the useful battery lifetime may fall far short of your design goal.

Jack G. Ganssle is a lecturer and consultant on embedded developmentissues. He conducts seminars on embedded systems and helps companieswith their embedded challenges, and works as an expert witness onembedded issues. Contact him at . His website is.

6 thoughts on “Running fast to save power

  1. The graphs provided by battery manufacturers typically show a battery's expected lifespan when powering a CONSTANT resistance or a load that draws a CONSTANT current. Suppose that one circuit draws 30 mA continuously for 60 seconds, while a second circuit

    Log in to Reply
  2. I just found this article, written in 2011, which presents results of CR2032 battery tests using a pulsed load pattern:

    Log in to Reply
  3. Bob,
    In other experiments I found that for a mostly-sleeping system, infrequent pulse loads up to 30 mA didn't make any measurable difference in total capacity. I did find the Nordic study interesting, but the paper was not very descriptive of their experi

    Log in to Reply
  4. “Interesting article. Good to see you point out that for battery powered devices it is generally energy, not power that matters.nnYou might be interested in a software perspective on this. In 2012 we ran some experiments to see how changing compiler opti

    Log in to Reply
  5. “Just to clarify… Are you assuming (a) the device will be powered from a lithium coin cell, not some other kind of battery, and (b) that there will be no local reservoir (e.g. a supercap) to smooth out the current drain on it?”

    Log in to Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.