A note on low power and microcontroller speed

Randall Maas 5/1/2010 9:58:14 PM

When working with low-power designs (e.g. battery powered) there is often a design trade-offs in developing software: (a) do work at high speed as quickly as possible, and then go to sleep, or (b) do the work at a lower speed?

In a lot of cases it doesn't matter, but not all. Often the microcontroller uses proportionately more current at a higher speed. But this is cancelled out since we're doing the same amount of work, but for a shorter period of time. Roughly the same average current, and the same voltage, so it's the same power, right?

It is, as long as you don't have to worry about battery life. In that case you can use a simple design that runs at high speed all the time and sleep whenever possible. Otherwise you need to consider your battery.

Batteries have a quirk. They have an impedance - basically it is like they have a series resistor between them and the power regulator on your board. It starts off life at a few ohms, and goes up an order of magnitude or so toward the end of life. The issue is that power used from the battery is that resistance times the square of the current squared times the resistance, not the voltage. (Why not the voltage? With the microcontroller, the voltage is regulated to a fixed value. But it is free to float a bit going into the regulator.)

Battery life is measured in coulombs - power times duration. It might be milli- or micro-Coulombs, but it still is Coulombs. Let's say we have a choice for an operation, use 2mA for 2mS or use 3mA for 1ms. And the battery resistance (impedance) is 10ohms.

If you use that high-clock rate operation a lot your useful battery life could be lower. (Fractions of a Coulomb add up fast.) This matters if the microcontroller is one of the more significant users of power.