(Source: CrazyCloud - stock.adobe.com)
Designing a new electronic device often comes down to making tradeoffs. Cost is often at odds with performance. In cost-sensitive markets, such as consumer-oriented products, selecting the microcontroller or microprocessor at the heart of the embedded system is perhaps the most crucial decision affecting performance. There are often competing system characteristics that can affect the overall performance of an embedded system. For this post, let's consider the following:
Low-power design is crucial for battery-operated devices or devices that rely on energy harvesting technologies. Some initial questions should include:
After the "big picture" requirements are understood, it's time to build a rough power budget. First, we can add up all the current draws of external devices. Then it is time to look at the possible microcontrollers/microprocessors that meet functional requirements and determine how efficient they are. Typically, a specification will detail the efficiency in terms of uA drawn by Hz of clock speed. Taking the time upfront to research and select the right MCU/MPU—both in terms of functionality and performance—will go a long way in meeting the low-power requirements of a design. Once we have a good feel for the expected active and idle power consumption, we can do some "back of the napkin" math looking at the various battery options to estimate how long a battery charge will last. Don't forget that choosing the right battery chemistry is essential to this discussion. For example, nickel-cadmium (NiCd) and nickel-metal (NiMH) batteries don't hold charge well in cold climates.
With the big picture architecture-level questions out of the way, it's time to focus on design-level considerations that optimize an embedded system for power consumption. Some design rules of thumb to consider for both hardware and firmware include:
Optimizing a design for power consumption does more than just save battery life. Lower power means less heat which improves reliability and reduces the risk of heat-induced failures. Lastly, be sure to verify your design. Whether with inexpensive USB power meters, multimeters, joulescopes, or energy analyzers, take the time to observe the device's power consumption in both laboratory and real-world settings. To make this easier be sure to put test points on the board so that current and voltage can be measured.
Michael Parks, P.E. is the co-founder of Green Shoe Garage, a custom electronics design studio and embedded security research firm located in Western Maryland. He produces the Gears of Resistance Podcast to help raise public awareness of technical and scientific matters. Michael is also a licensed Professional Engineer in the state of Maryland and holds a Master’s degree in systems engineering from Johns Hopkins University.