While you might think that low-power design is only crucial for battery-powered devices, the sheer number of devices connected to the grid can lead to 10-15% of the electricity generated in the U.S. being wasted each year. Therefore, designing low-power embedded systems is essential for maximizing battery life and reducing grid pressure (not to mention the environmental impact). This article will explore practical tips for low-power design to help you develop energy-efficient embedded systems.

It’s wise to get an embedded system working first and then go back to optimize the code and energy usage. If you can’t make the product meet customer needs, then the time spent on optimization might be a waste.
However, I find that when it comes to energy usage, it’s usually better to start measuring your consumption early and often to understand how your system’s energy consumption behaves during execution.
I emphasize measuring early and often because once you discover if the design is going in the wrong direction, it’s easier to make adjustments or small course corrections.
For example, a few years ago, I was working on a battery-powered medical sensor that had a hard requirement for a 14-hour battery life. Therefore, early in the development cycle, I began measuring energy usage and discovered two things. First, the chosen battery was insufficient for the application due to aesthetic reasons; second, our chosen software architecture was inadequate to meet the energy requirements.

A few years ago, there was a war among chip suppliers to achieve the lowest power sleep states in microcontrollers. One supplier claimed they could achieve a sleep current of 100uA. Another claimed they could reach 50uA. Suppliers increased various low-power peripherals, sleep modes, and features like DMA, aiming to keep the CPU in sleep mode. This war seemed noble, but it was filled with much false marketing nonsense, such as being able to power a device with a button cell for ten years (Jack Ganssle has done a great job refuting this in several articles and talks).
While you will see many numbers and data about the energy efficiency of microcontrollers being thrown around, in most cases, these figures are not based on engineering but rather on marketing numbers. Today, many microcontrollers use similar technologies (like Arm cores) and similar manufacturing techniques. One vendor’s Cortex-M4 is not much different from another vendor’s Cortex-M4, at least in terms of energy consumption.

One important factor affecting the energy consumption of embedded products is the software architecture. I’ve seen excellent, streamlined software architectures collapse and burn out because they couldn’t meet the low-power requirements of the system. The problem with these architectures often lies in their real-time responsiveness. They are sleek but have significant latency or inefficient communication mechanisms that consume clock cycles and power.
When designing a low-power embedded system, the system must be developed to be event-driven. The default state of the system is one of the microcontroller’s sleep modes. Then, events will trigger the system to wake up and do valuable work.
For example, a low-power timer expires, waking the system, retrieving sensor values, performing some operations on them, and then returning to sleep mode. In this case, the system remains in a low-power state, waking up only to perform work. When executing work, it completes the tasks as quickly as possible and then returns to sleep mode.

We are trying to design a low-power system that requires keeping the CPU off as much as possible, yet I recommend adding more cores. Some applications, such as machine learning or digital signal processing applications, cannot escape the need for high-performance microcontrollers. You need Cortex-M4 or Cortex-M33. You may find that even in sleep modes or your baseline energy consumption is higher than you want. At this point, a second core can come into play.
You can use a multi-core microcontroller that includes a low-power microcontroller like Cortex-M0+ and a high-performance Cortex-M4. When the high-performance core is not needed, you turn it off and let the low-power Cortex-M0+ run. When an event requires high-performance processing, the Cortex-M0+ wakes up the Cortex-M4 to quickly complete the work and then returns it to the off state.

When writing software for low-power devices, necessary trade-offs must be made: faster processing and larger code, or slower processing and smaller code. If energy efficiency is required, then you should optimize for code speed rather than size. When your processor is awakened to process data, you want it to do so as quickly as possible and then return to sleep mode. The longer it sleeps, the lower the overall energy consumption of the device.
Regarding speed optimization, I can give you an additional tip: commercial compilers often perform better than gcc (this is a claim made in a blog). If you don’t believe me, check the public data from the EMBCC CoreMark MCU Benchmark. When you browse the data, look at the difference between running code in flash versus running it from RAM. You will notice that you can squeeze out some extra cycles from RAM, so if you have frequently run code, you can reduce the system’s energy consumption by placing those algorithms in RAM.

Designing a low-power embedded system is not only a requirement for battery-powered devices but also for grid-connected devices. As you have seen in this article, low-power design is not just about choosing the right hardware but also about selecting and implementing the correct software architecture. Currently, most hardware in the microcontroller space has similar energy usage profiles. The trick is to write software that can make the most efficient use of the internal hardware to keep the CPU disabled as much as possible.
Reference Original:5 practical tips for low-power design; translated by Demi Xia
Copyright Notice:This article is an original piece by Electronic Technology Design, all rights reserved, and reprinting without authorization is prohibited.
Due to recent changes in WeChat public platform push rules, many readers have reported not seeing updated articles in time. According to the latest rules, it is recommended to click “Recommended Reading, Share, Favorite,” etc., to become a regular reader.
Recommended Reading:
-
Profits of 30.9 billion but no dividends, SMIC urgently responds
-
Xiaomi’s first electric vehicle starts at 149,900, incredible cost-performance!
-
ASML confirms! New Dutch regulations will affect these DUV models
Please click 【View】 to give the editor a thumbs up
