MENU

10 tips for maximising battery life

10 tips for maximising battery life

Feature articles |
By eeNews Europe



Portable, battery-powered devices are sweeping through society like wildfire. Mobile computing and sensor devices are springing up everywhere, providing engineers with not only a plethora of data but also applications. Requirements often dictate constraints on size and weight that limit how much capacity the battery can carry. The number of features on devices in addition to the time between charges make it very challenging, to near-impossible, to meet the requirements.

Selecting a low-power microcontroller is an obvious first step, but there are a number of software and hardware tips that can be followed to ensure that every last milliampere-hour of charge is put to good use.

Tip #1: Create a battery budget

Early in the design cycle it is highly recommended that you put together a battery budget. Current requirements for each device on the board can be tallied to obtain a rough idea of how much battery current is going to be needed and whether the selected battery is up to the job. Device data sheets have become fairly good at providing minimum, typical, and maximum current data.

Taking a very conservative approach, a battery budget could be based solely on the maximum current values for the devices. An Excel worksheet is easy to duplicate, however, and creating a budget for both typical and maximum current data will produce a good ballpark range.

If more battery is needed than is available, please don’t just move forward on the project. Make the necessary changes up front to spare weeks or months of heartache down the road. Figure 1 shows an example battery-budget template that can be downloaded from .

Figure 1 Early in the design cycle, it is highly recommended that you put together a battery budget.

Tip #2: Set unused MCU I/O to lowest power state

It is easy to overlook what should be done with an input/output pin that is not being used. This oversight, however, can be the difference between having a marketable product and an expensive paperweight.

Each microcontroller has different recommendations on what to do with unused pins, and close examination of the data sheet will reveal what should be done. For example, an unnamed silicon-vendor data sheet recommends that any unused I/O be set as an output and driven low. The purpose of this approach is to minimise leakage and quiescent currents in an effort to minimise power usage. These currents are tiny, but each unused pin adds to this loss, and over the period of a day can be a substantial amount of battery life.

Tip #3: Turn off unused MCU peripherals

Just like in any home, if you aren’t in a room, then the light should be turned off to conserve energy. It is the same thing with a microcontroller. If there is an unused peripheral such as an analogue-to-digital converter or a pulse-width modulator, turn it off to save power.

Peripherals can be significant consumers of power. For fun, pick out a favourite microcontroller and scroll through the data sheet’s power section to see how much current is being drawn by each peripheral. Some providers don’t include this information, and it is up to the engineer to set up some hardware on the bench and then, using test software, turn peripherals on and off, one at a time, to get an understanding of the current draw. ADCs and USB peripherals tend to be near the top of the biggest current-users list.

Tip #4: Turn off unused MCU clocks

Now that all of the unused peripherals have been turned off, there is not much point in running a clock signal to them. Running clock signals to different peripherals within a microcontroller requires the use of energy. There are internal clock gates that need to be powered up in order to propagate the clock. These gates use voltage and a small amount of current. To help minimise the power profile of the MCU, turn off any unused clocks. It may be only a small amount, but once again, the laws of addition can be staggering.

Tip #5: Use power-savings modes

Every modern microcontroller has some type of power-savings mode. The idea is that the processor and peripherals can be put into a near-shutdown or stopped state that minimises power usage but still allows them to return to normal operation very quickly.

Most microcontrollers will have at least three power modes, but more sophisticated processors can have in excess of seven. The common modes are run, idle, and standby. Examining a data sheet from one particular vendor revealed that run mode consisted of a current draw of 24 mA, idle mode of 5.6 mA, and standby mode of 0.1 mA. What a difference. Proper use of the power-savings mode can account for a very big increase in battery life.

Tip #6: Throttle the system clock

The clock frequency at which the MCU runs is one area that has the potential to squeeze a lot of extra operating time out of the battery. There is a direct linear relationship between the frequency of the CPU clock and the amount of current that is drawn to operate the microprocessor.

Take a look at Figure 2; the higher the frequency, the higher the current draw. Throttling the microcontroller clock up and down is a great way to save power. When a math-intensive or fast operation needs to be performed, speed up the clock. When the task is done and the system is operating at a lower frequency, clock it down. Throttling the system clock has the potential to add hours of operating time to the battery life.

Be aware that this endeavour can be complicated. Any peripheral that is dependent on the clock may also need to have its clock dividers updated in order to maintain the same rate of operation.

Figure 2 There is a direct linear relationship between the frequency of the CPU clock and the amount of current that is drawn to operate the microprocessor.

Tip #7: Use efficient algorithms

The idea of using efficient algorithms is to get at the fact that the more time that is spent in a low-power mode and a throttled-back frequency, the longer the battery is going to last. Using algorithms that are fast and efficient will result in the system’s spending more time in power-savings modes.

Power-savings modes use only a fraction of the current that batteries use when in full-tilt mode. Try to design the software and the system to do what needs to be done and then get into a low-power mode. The result will be not only longer battery life but also, possibly, a smaller, lighter, cheaper battery.

Tip #8: Watch for devices with high leakage current

When circuits are being designed, make sure that the leakage and quiescent currents are well understood. If necessary, prototype out the circuit and verify what the current draw of the circuit is. Things to watch for are devices with high standby currents and low-valued pull-ups or pull-downs. Make sure that this information gets put into the battery budget.

Tip #9: Select external devices that can be turned off

During the hardware design when components are being selected, it can be extremely useful to select sensors and external components that have low-power modes themselves or that can be switched off. External parts such as EEPROMs, flash, and sensors usually support low-power modes. When they don’t, there are a couple of methods that can be used to disable them. One option is to design in a switch such as a FET to turn power on and off for the device. One issue with this approach, however, is that the engineer can’t forget that there is a diode drop of at least 0.3V and up to 0.7V, which can affect the operation of the device. The second option for disabling external parts is to use a regulator that includes an enable/disable pin.

Tip #10: Add a voltage- and current-monitor circuit to the device

Engineers rely on data in order to make design decisions. In many cases, battery-life optimisations are the last thing done on a project. All other features are implemented first and then, before the product rolls off the production line, the team scrambles to improve battery life.

One of the best ways to understand the battery performance of the system is to include two simple circuits to monitor battery voltage and current. This information can then be logged and used to determine discharge/charge cycles, determine steady-state currents, and really understand how the system is operating from a power-usage standpoint. Figure 3 shows an example battery voltage and current over the course of a single discharge cycle. Armed with this tool, the savings of each tip can be determined as it is implemented.




Figure 3 One of the best ways to understand the battery performance of the system is to include two simple circuits to monitor battery voltage and current. Shown are an example battery voltage (a) and current (b) over the course of a single discharge cycle.

Using these tips, it is possible to tame even the most unwieldy of power-hogging devices. It is important to keep in mind, though, that while these tips will decrease system power and improve operating efficiency, they need to be used during the design cycle and shouldn’t be thought of as a last-ditch effort to get a product out pf the door. With a little luck, that new sensor design will have enough battery life to last a long time. Happy power savings!

Author’s biography

Jacob Beningo is a Certified Software Development Professional (CSDP) who specialises in the development and design of quality, robust embedded systems. He has written technical papers on embedded design methods and taught courses on programmable devices, boot-loaders, and software methods. Beningo holds bachelor’s degrees in engineering and physics from Central Michigan University (Mount Pleasant, MI) and a master’s degree in space-systems engineering from the University of Michigan (Ann Arbor, MI).

This text drew the following responses from contributors;

▶ “I have used PIC micros for years. I have a keyboard that runs on a CR2032 lithium, has IR interface, and is used daily for several hours. Battery life about 18 months. The key was to switch off the watchdog and brownout detector and sleep mode between key strokes, then wake up on key press. This dropped the quiescent current from 20 µA to significantly less than 1 µA on a PIC16LF628A. Clearly in some applications a watchdog is desirable/essential.”—Bellaire

▶ “Nice tips. Concerning #9: There is no ‘diode drop’ when the FET is ON, because the FET’s ‘parasitic diode’ is parallel to the FET’s channel. However, someone should be concerned about the way that the FET is connected. Its parasitic diode must be reverse biased so that no current passes through (i.e., no supply voltage exists) on the device side when the FET is OFF.”—G.K.

▶ “Be careful if you specified a lithium-thionyl chloride battery. These batteries suffer from passivation and die if you don’t draw current from them. Take into account that the internal leakage current in the battery can be the biggest drain in devices that, like cats, spend most of their lives asleep.”—Battar

▶ “Sometimes it is useful to start with some kind of battery estimator (Freescale, Silicon Labs), but you are depending on correct data from the company. For the wireless protocols it is sometimes not easy to set duty cycles for worksheets. I use supercaps (0.5-1F) instead of batteries to compare various SW modifications in sensors.”—gt

▶ “A good checklist that focuses mainly on the MCU. Thanks.

More can be done, especially regarding power-saving circuit design. Quite often you can significantly lower the power consumption of ‘low-power’ devices through good circuit design, although you may need to do some fundamental design using discrete components and Spice simulations. We are just completing an industrial wireless multisensor unit that runs for 10 years solely on primary cells. It is a challenging and interesting project where even the wireless protocols are power-optimised.”—Dale Shpak

If you enjoyed this article, you will like the following ones: don't miss them by subscribing to :    eeNews on Google News

Share:

Linked Articles
10s