Dennis Cecic, P. Eng. (firstname.lastname@example.org)
Senior Member, IEEE Toronto Section
In this article, we will discuss elements of low power operation in Microcontroller applications and uncover how power consumption can be managed by your firmware. Power-saving features of our 3 hero MCUs (PIC16F19197, PIC24FJ1024GA606, PIC32MZ1024EFH064) will also be highlighted and compared.
This will (mostly) be a theoretical discussion, using available data sheet parameters. As usual, the best thing to do is to prototype a simple application and measure your power consumption profile.
What is Low Power?
Low power means different things for different systems. Some applications focus on Run-mode (“dynamic”) power consumption, as they must remain running constantly, such as a power supply. On the other hand, a battery-powered application would be typically more concerned with the Sleep-mode (“static”) power consumption, as it tends to spend most of its time in Sleep mode. Let’s define these terms.
Dynamic (Active) power is the power consumed while the application is active and executing tasks.
This power is dominated by CMOS switching currents, which are a function of execution frequency and voltage. Additional active power is consumed by peripherals and the I/O pins.
Static power is the power consumed while the application is on but not active (i.e. system clock is off).
This power dissipation comes from transistor leakage inherent in CMOS processes, real-time clocks necessary for time keeping which run during sleep, system voltage supervisors, voltage regulators, watchdog timer circuits, I/O leakage and similar sources.
Controlling Power Consumption
Operating voltage is primarily defined by the process technology used in the manufacture of the MCU. As process geometries shrink, the operating voltage decreases. The following table summarizes the lowest operating voltage at which each of our 3 hero MCUs are able to run at their maximum oscillator frequency (Fosc). The corresponding CPU instruction frequency (Fcyc) is also listed:
Should you operate your MCU at the lowest voltage? It depends. Other components on your board may require a different voltage to operate, so the benefits of running the MCU at low voltage are offset by the additional power consumption of your DC-DC converters.
Modern MCUs enable firmware to actively manage power consumption by selectively managing clocking to the CPU and the peripherals. In general, a lower CPU instruction clock frequency (Fcyc) and a reduction in the number of circuits being clocked constitutes lower consumed power. The following table summarizes operating frequency control features available in our hero MCUs:
Refer to the “Power-Saving Features” chapter in the MCU device data sheet for specific details on how to use these features.
Operating Modes – A Closer Look
Here we summarize RUN, DOZE, IDLE and SLEEP operating modes which are provided in many modern MCUs. These modes directly affect the clocking of the CPU core and Peripherals.
This is the normal operating mode. All resources are clocked by the system clock source. Dynamic clock source switching provides the highest impact on overall dynamic power consumption, since all parts of the chip are affected.
DOZE mode slows the CPU and Memory clock, while still allowing the peripherals to run at full speed. Current consumption is 35% to 75% of RUN mode, depending on the post-scaler setting. DOZE mode is useful in situations where you are waiting on external data, but the peripherals require fast clocks (i.e. waiting on serial data).
IDLE mode halts the CPU and code execution but allows peripheral modules to continue operation. Current consumption is around 25% of RUN mode, depending on what peripherals are allowed to run. IDLE mode is also useful in situations where you are waiting on external data, but the peripherals require fast clocks (i.e. waiting on serial data). Also useful during DMA transfers.
This is the primary power saving mode to use when the MCU can remain dormant for an extended period of time. This mode disables clocks to CPU and most peripherals and turns off all high-speed oscillator circuits. Some low-speed/low-power peripherals and wake-up sources are able to run. RAM remains powered (contents are retained). Regulators remain powered.
The following table summarizes RUN, IDLE and SLEEP current parameters from the data sheets of our hero MCUs:
As we can see, PIC16F1 and PIC24F MCUs are well suited to long-life, battery-powered applications.
Waking up from SLEEP Mode
Wake-up time is critical for applications that have a short active-time. The primary component of wake-up time is the Oscillator Start-up Time (OST). Typical start-up times for common clock sources are shown in the following table:
One method to mitigate the effects of a slow start-up clock, is to use the 2-Speed Start-up feature, provided on several MCUs. 2-Speed Start-up initially wakes up from the internal RC oscillator, which typically starts up in a few microseconds. The system runs from this oscillator until the primary clock source stabilizes, reducing total operating time.
Finding Low-Power MCUs
If none of our 3 hero MCUs provides a suitable low-power solution, the Microchip Advanced Parts Selector (MAPS) provides an “XLP” check box to search for MCUs specifically designed for low-power applications:
What is XLP?
nanoWatt XLP (eXtreme Low Power) is Microchip’s proprietary technology used to design PIC microcontrollers with current consumption below 100 nA in sleep mode, 800 nA in sleep mode while running a real-time clock calendar, and 800 nA in sleep mode while running the watchdog timer circuit.
Some XLP devices introduce an additional operating mode called DEEP SLEEP, where RAM is powered down, regulators are powered down, and only specially designed extreme low power peripherals are allowed to run.
To Probe Further
The following application notes and user manuals go into much further details on Low Power Design and features used in MCU applications. Make sure to consult the “Power Saving Features” chapter in your MCU device data sheet for specific features available in your device.
- Microchip AN1416 Low Power Design Guide
- PIC24FJ1024GA606 Family Ref. Manual, Chapter 39 Power-Saving Features with Deep Sleep
- PIC32MZ1024EFH064 Family Ref. Manual, Chapter 10 Power-Saving Modes