Wednesday, December 09, 2015

Choosing a battery for your electronic circuit

This is a continuation in the Shockpad series. Past posts include:
In a prior post, I drew an analogy to constructing a tall building. Within that analogy, my posts on characterizing radio modules as well as measuring and mitigating source impedance might be grouped into the category of foundation work. Now, for the first time, we get to work above ground!

When pairing a battery to an electronic design, we begin with the non-negotiable factors and then move to softer parameters which are open to tradeoffs. In other words, a few numbers must be right for a system to function at all, while many other factors contribute to how well the solution works.

1) Voltage

Too much voltage, and electronic components fail immedately. Too little, and they refuse to turn on. Therefore, a candidate battery must first and foremost never exceed a circuit's maximum input voltage.
Next, the battery's end-of-discharge voltage should ideally be greater than the circuit's minimum input voltage. If the battery's "empty" voltage is significantly lower than the circuit's minimum, this implies that a fraction of the battery's capacity is not useful to the circuit. A small mismatch, say 5% to 10% of the total capacity, might be acceptable. But, if 50% of the battery's capacity is not useful, it might be time to consider using a different cell, or connecting multiple cells in series.

2) Average Current

The next priority is average current. Most battery datasheets provide both a nominal current rating and constant-current discharge curves. These discharge curves graph the cell's output voltage vs. time, while holding the output current constant. You should be concerned if your circuit's average current draw is significantly larger than any of the datasheet curves. A cell's source impedance, along with other chemical factors, produce an exponential reduction in useful capacity for high current levels. Short bursts can be dealt with, but consistently overloading a cell simply won't produce good results. Choose a different cell, or perhaps connect multiple cells in parallel.

3) Peak Current
Compare the battery's peak current capabilities to your circuit's peak demands. I've already written about mitigation strategies, at length, in another post. In short, the symptoms/problems associated with excessive peak current include:

  • Brown-outs
  • Reduced battery life

4) Derate total capacity

Operating near the limits of items 1-3 above may require an adjustment in the total capacity expected from the cell. Additionally, operating the cell at extreme temperatures may also require a capacity derating. And finally, an extra safety/performance margin may be subtracted simply to guarantee that actual performance always exceeds predictions.

5) Capacity units - mAh vs mWh

Battery size is often discussed in terms of current*time: mAh. If your circuit uses a linear voltage regulator, then mAh is a perfectly good computational choice. But, if the circuit's primary regulator is a switcher (buck, boost, SEPIC etc.), then power*time (mWh) may be more appropriate.
The difference between a standard AAA and 9V battery illustrates this difference nicely. The AAA cell is rated for ~2x the mAh of the 9V cell (1400 vs. 900). But, computing mWh tells a different story. Though proper mWh calculation requires compensation for declining voltage during discharge, a a first-order approach is to simply multiply mAh * nominal voltage. This give:

  • For the 9V battery: 9V * 700mAh = 6400mWh
  • For the AAA battery: 1.5V * 1400mAh = 2100mWh

So, the 9V battery contains more power than the AAA. This makes sense since the cells use the same chemistry, but the 9V battery is 6x larger and weighs 4x more.
Now, let's map the mAh vs. mWh matter back to voltage regulators. If a given circuit contains a 3..3V linear regulator and is powered by a 9V cell, then >60% (1-[Vout/Vin]) of the battery's power will be wasted as the linear regulator converts it to heat. Worse yet, an elaborate cooling strategy may be required to dissipate all that heat. If a linear regulator is used, then it is advantageous to choose a battery voltage which is only slightly above the circuit voltage. If an efficient switching regulator were used instead, then as little as 10-20% of the battery's output power would be lost in the conversion from 9V down to 3.3V. A large mismatch between battery voltage and circuit is less problematic in this case.

No comments: