Low Power Embedded Applications Topics and Tips
As the applications got more complex, with the need to deploy devices far from a power source specially in the IoT applications, grew the need for efficient and power optimized applications.
Frankly, power consumption is not something college seniors worry about when they are learning software development or hardware design, There is a general sentiment that power is infinite, But reality dictates that there are lots of applications that need to run on a battery for a long time, and a decision like this will affect multiple aspects of the application.
These circuit resistors affects the overall power consumption at the end of the day.
In this article, we will discuss some general topics and tips on optimizing your embedded application for maximum power efficiency.
We will look into the power modes of MCUs as ST32L4 series, power in passive elements in circuits, using RTOS and brief look into batteries.
Power consumption in Microcontrollers:
- Frequency: In general, The overall power consumption of a MCU is defined by its power consumption in different modes, typically active and standby (includes sleep, hibernate, etc.), and power needed to transition from one mode to another.
Practically all MCUs are implemented using CMOS technology. In this white paper by Cypress, there is a derivation that defines the average power consumed by CMOS transistor to be a function of Frequency, operating voltage and Load.
P = fCLVdd
The system designer can only control the frequency, therefore the MCU should operate on the lowest possible clock frequency and higher clock speeds should be avoided.
In most datasheets of MCUs, there is a graph between the consumed power and operating frequency.
2. Power Modes : Another major topic in power optimization is power modes, as an example we will look at the STm32L4R5 series from ST.
It is a Cortex®-M4 with FPU core. They can operate at up to 80 MHz and achieve 100 DMIPS performance at 80 MHz.

Suppose you have an application where the MCU wakes up every TPERIOD and performs some processing that is always the same and seen as a constant number of instructions, Then goes back to sleep mode.
Since there is two operating modes, Two parameters need to be selected to optimize the average power consumption:
• The Run mode and clock frequency to be used during the PROCESS phase.
• The Low-power mode to be used during the INACTIVE phase.
PROCESS phase :
Depending on the processing requirement (DMIPS), one of the different Run modes can be used:
• Run1: Run mode, with a maximum of 100 DMIPS when run at 80 MHz.
• Run2: Run mode with a maximum of 32.5 DMIPS when run at 26 MHz.
• LP run: Low-power run mode, with a maximum of 2.5 DMIPS when run at 2 MHz.
INACTIVE phase :
The STM32L4 Series provides different low-power modes that can be used for the INACTIVE phase:
• Sleep or Low-power (LP) sleep : if the reactivity is the key parameter
• Stop 0 : when the wakeup timing is critical (<1 µS
• Stop 1 : the system has multiple sources of wakeup
• Stop 2 : if few peripherals have to stay awake and can generate wakeup event as LPUART reception.
• Standby : if no other peripherals than RTC need to stay awake
• Shutdown: if only the RTC and the backup registers need to stay awake
In general, as you go deeper in sleep modes, You will need more time to power the microcontroller back up and start executing instructions.
As an example the STM32L476 consumes IDD average consumption < 1 μA on shutdown mode and more than 10 μA in LP mode.
3. If you are using RTOS, use tickless mode.
It is common to reduce the power consumed by the microcontroller on which FreeRTOS is running by using the Idle task hook to place the microcontroller into a low power state.
The power saving is limited by the periodic exit and then re-enter the low power state to process tick interrupts. Further, if the frequency of the tick interrupt is too high, the energy and time consumed entering and then exiting a low power state for every tick will outweigh any potential power saving gains.
The FreeRTOS tickless idle mode stops the periodic tick interrupt during idle periods (periods when there are no application tasks that are able to execute), then makes a correcting adjustment to the RTOS tick count value when the tick interrupt is restarted.
Stopping the tick interrupt allows the microcontroller to remain in a deep power saving state until either an interrupt occurs, or it is time for the RTOS kernel to transition a task into the Ready state.
4. Interestingly, one main contributor for power consumption during the operation of MCU is the standby current.
Standby current is the sum of leakage current, current consumed by power management circuits, clocking systems, power regulators, RTC, IOs, interrupt controllers, and so on.
5. Selecting the right ICs considering overall power consumption budget is very important. Pick ICs with low power (active / Idle) consumption and with the low operating voltage rating.
6. Selecting the right technology is also critical. For example, if you need to use RF in order to transfer data, think about which technology out of WiFi, ISM RF, BLE, Zigbee, etc. will be more suitable, both from user experience as well as from power consumption point of view.
Power consumption in Discrete Components:
Suppose you have a temperature measurement system, consisting of ADC for temperature measurement, MCU and LCD to display information.
The standby current is mainly contributed to by MCU standby current and the active current of the ADC and LCD. The ADC may have an option by which the MCU can stop ADC conversion before it goes to sleep to save ADC power consumption as well. However, there will still be some standby current for ADC and similarly for the DAC.
Alternatively, if those peripherals are developed on chip as SoCs, You’ll have the ability to control the power of each individual peripheral by controlling the state of each peripheral and its clock speed.
Another aspect about discrete components is the Passives:
it’s good to develop an awareness of the situations in which a passive component might be drawing significant amounts of current.
Here are two examples:
Pull-up (or pull-down) resistors: If you have a 1 kΩ pull-up in a 3.3 V system, that resistor is drawing 3.3 mA whenever the corresponding signal is driven to logic low — and 3.3 mA for a single resistor is serious current in an age when sophisticated microcontrollers running at low speed are pulling less than 1 mA, Or an I2C bus resistors for instance might be consuming considerable current.
Understanding Batteries:
- The manufacturer of a battery will give data on the nominal capacity, i.e. the capacity the battery will have under perfect conditions. The next figure shows the capacity of a D-size lithium thinoyl chloride battery. The battery capacity is measured as the amount of current the battery can supply over a period of time from the initial terminal voltage of 3.6V to an end-of-life terminal voltage of 2V.
The nominal current is specified as 6mA at 25°C, which relates to a peak capacity of 19Ah.
Essentially, the discharge current affects the battery capacity, so maintaining stable current is a must to achieve highest capacity.
Battery terminal voltage is also affected by the temperature, so the system’s temperature needs to be carefully maintained so that over its operating temperature the battery voltage is within limits.
There are a number of things you can do to avoid battery related problems.
Ensure that you only use current when you need to. For example, reducing the duration of radio communications as much as possible and increasing the idle time will greatly increase efficiency. Electronic components often use a large amount of current initially, which then falls once they’re up and running. If you alter the order and timing of when components power up, you can minimize the peak current and hence prolong the battery life.
Once you’re settled on what the peak and average current consumption of your application will be, it’s time to pick the right battery for the job.
Agreeing on battery size and technology is often a battle between marketing and engineering. Everyone wants a device that is no larger than the display and keypad, light as a feather, and runs forever on a single (low cost, widely available) battery.
There are different types of battery chemistries, each with its own energy density, size, discharge rate and operating conditions.
For example: Lithium batteries prefer a slow discharge and require low voltage protection circuitry.
Below you can find further reading and references section.
That was it, brief tips and topics on optimizing your application for power.
Feel free to leave your comments.
Thanks.
Further Reading:
https://www.embedded.com/low-power-design-2/
https://starfishmedical.com/blog/10-tips-for-ultra-low-power-embedded-design/
https://www.embedded.com/how-low-power-can-you-go/
Reference:
http://www.ganssle.com/reports/ultra-low-power-design.html#backgound
https://www.cypress.com/file/103541/download
https://starfishmedical.com/blog/10-tips-for-ultra-low-power-embedded-design/
https://www.eetimes.com/soc-embedded-software-needs-a-low-power-perspective/