How to extend the battery life of your microcontroller based design

15,985

Circuit Image

Battery-powered devices, such as electric toothbrushes, shavers, cell phones, PDAs, MP3 players, and remote controls, are integral to daily life. Consequently, power management has become a critical consideration for embedded designers. Microcontrollers (MCUs) provide various methods for managing power requirements across numerous applications. Each MCU presents different current consumption levels and power-saving features. However, effective power management in MCU-based designs involves more than simply selecting the appropriate microcontroller; it requires a well-thought-out development strategy that optimally utilizes these features. At the system level, independent of the chosen MCU, multiple strategies exist to extend battery life further. A wireless bicycle computer serves as an illustrative example of effective power management. This system consists of three modules: a control panel mounted on the handlebars, a speed sensor attached to a wheel, and a display on the rider's helmet. The speed sensor communicates the wheel's rotation speed to the control panel, which calculates various metrics such as speed, distance, elapsed time, and calories burned, subsequently transmitting this information to the display.

MCUs are evolving into smaller geometries to minimize die size, resulting in transistors that cannot handle direct applications of 3 or more volts. Voltage regulators are employed to lower the voltage for internal logic, but these regulators contribute to the MCU's overall current draw. Nonetheless, since power is the product of voltage and current, a system operating at 1.8 to 3 volts with a regulator may consume less power than a 5-volt system without one. MCUs depend heavily on power management modes to maintain low operating currents while supporting regulated power supplies and higher clock speeds. Newer MCUs offer multiple low-power modes to meet these requirements while preserving system flexibility. For instance, Freescale's MC9S08GB60 MCU features four low-power modes: stop1, stop2, stop3, and wait. In wait mode, power consumption decreases by disabling the CPU clock while keeping clocks active for other peripherals such as analog-to-digital converters, timers, or serial communication modules. This mode is advantageous for conserving power when peripherals require operation, but the CPU is idle until the peripheral completes its task.

To further minimize power consumption, three stop modes are available. Stop1, stop2, and stop3 provide varying operational capabilities that reduce power usage. Stop3 offers the highest functionality among the three. In stop3, the on-chip voltage regulator enters a power-saving mode that maintains minimal regulation for preserving RAM and I/O register contents. Several interrupt sources and the reset pin can reactivate the MCU from stop3. Additionally, stop3 is the only mode where the low voltage inhibit (LVI) module can be activated, and the crystal oscillator can remain operational. In the bicycle computer example, stop3 can be utilized while the MCU awaits speed readings from the sensor. The Real-Time Interrupt (RTI) function operating in stop3 can wake the MCU in time for the next reading. Stop2, while providing slightly less functionality, further reduces power consumption. In stop2, the voltage regulator is disabled, yet RAM contents are retained. Although the I/O registers are powered down and need reconfiguration upon wakeup, stop2 still allows the RTI function to operate. In this scenario, stop2 can be employed as a substitute for stop3 to achieve a slight reduction in power consumption, as both the RTI function and RAM remain operational in stop2, facilitating the timing between speed readings.

This comprehensive understanding of power management in embedded designs, particularly in the context of MCUs, highlights the importance of strategic selection and implementation of power-saving features to enhance the efficiency and longevity of battery-powered devices.Whether it is an electric toothbrush, shaver, cell phone, PDA, MP3 player or the remote control for anything not within arm`s reach, battery-powered devices are an everyday part of life. As such, power management is a significant issue for embedded designers today. The ubiquitous microcontroller offers designers a multitude of ways to manage the power requirements in many applications. The different MCUs themselves offer a range of current consumption and a variety of power saving features. However, power management in an MCU-based design is more than just selecting the right microcontroller.

It also means coming up with a development strategy that most effectively uses these features. And at the system level, independent of the MCU that you have chosen, there are also a number of strategies that can be employed to further extend the battery life of your application. To demonstrate effective power management, we will use a wireless bicycle computer as an example. This computer is composed of three modules, a control panel on the handle bars, a speed sensor on a wheel and a display on the rider`s helmet.

The speed sensor tells the control panel how fast it is turning. The control panel calculates information such as speed, distance covered, elapsed time and calories burned. The control panel sends this to the display. Figure 1, below, shows a block diagram of a bike computer control panel. MCU`s are moving into smaller geometries to reduce die size, which results in transistors that cannot tolerate direct application of 3 or more volts.

So, voltage regulators are used to drop the voltage to the internal logic. Unfortunately, these regulators add to the MCU`s current draw. However, since power is equal to voltage times current, a 1. 8 volt to 3 volt system with a regulator may still be lower power than a 5 volt system without one. MCU`s rely heavily on power management modes to keep the overall operating current down while still supporting regulated power supplies and increased clock speeds. New MCU`s are providing multiple low power modes to address these needs and yet still maintain system flexibility.

Freescale`s MC9S08GB60 MCU has four low power modes: stop1, stop2, stop3 and wait. In wait mode, power is reduced by turning off the CPU clock, but leaving the clocks enabled to other MCU peripherals such as A-to-D converters, timers or serial communication modules. This mode is useful for saving power when these peripherals need to function, but the CPU has nothing to do until the peripheral completes its task.

To reduce power consumption further, three stop modes can be used. Stop1, stop2, and stop3 each provide different levels of operation that will reduce power consumption. Stop3 provides the most functionality of the three. In stop3, the on-chip voltage regulator is put into a power saving mode that still provides minimum regulation for retaining RAM and I/O register contents.

Several interrupt sources and the reset pin can wake the MCU up from stop3. Stop3 is the only stop mode in which the low voltage inhibit (LVI) module can be enabled. It is also the only stop mode in which the crystal oscillator can remain enabled In our example, stop3 can be used when the MCU is waiting between speed readings from the speed sensor. The RTI function that runs in stop3 can be used to wake the MCU in time for the next reading. Stop2 provides slightly less functionality, but reduces power consumption further. In stop2, the voltage regulator is powered down. However, the RAM contents are still retained. The I/O registers are powered down in this mode and need to be reconfigured upon wakeup from stop. In stop2, fewer interrupt sources are available to wake the MCU up, but the RTI function is still available.

Back to our example, stop2 can replace stop3 to reduce power consumption slightly more. Since the RTI function and RAM both still work in stop2, the time between speed rea 🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713