Recom
Blog

Tips and Tricks for Low-Power Embedded Design

Embedded_AdobeStock_366670780

Source : Mouser Electronics

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:

  • Battery Life
  • Responsiveness
  • Thermal Performance
  • Wireless Signal Range and Speed
  • Functionality Supplied by External Peripheral Components

Low-power design is crucial for battery-operated devices or devices that rely on energy harvesting technologies. Some initial questions should include:

  • How accessible will the device be for field maintenance? Can batteries be replaced?
  • What is the operating environment (temperature ranges, humidity ranges, exposure to sunlight, exposure to chemicals, etc.)?
  • What are the dimensional and weight limits?
  • What type of communications will be required? How often will telemetry need to be sent?
  • How many external devices (sensors, actuators) are expected to interact with our device? What are their interfaces?

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:

  • Choose the lowest operating voltage possible. For the longest time, 5V was the norm, then 3.3V. Today it is not uncommon to see 2.7V and 1.8V core and memory operating voltages. Some embedded components on the market go as low as 0.9V.
  • Reduce the core clock rate to the slowest speed possible without affecting performance.
  • In addition to the smallest operating voltage, try to pick components with the same operating voltage, reducing the need for DC-DC converters and routing multiple power rails.
  • Beware of LEDs and liquid crystal displays! They are pretty and can add functionality, but they can be power-hungry (relative to their utility). Add LEDs judiciously. If an LCD is needed, give the user the ability to adjust brightness.
  • Circuit topography and component selection can have significant impacts on your power budget. Voltage dividers, pull-up resistors, and pull-down resistors, while necessary, can draw current. Be sure they are necessary and size them to be both effective and efficient.
  • Don’t just hardwire peripheral devices to be enabled all the time. Instead, dedicate the design time and budget a GPIO pin from the MCU to allow the firmware to turn peripheral devices on and off as needed.
  • Avoid using delays or constant sensor polling in your code; this leads to useless clock cycles that do nothing functionally but still consume energy. Instead, use task schedulers and interrupts.
  • Pick a communications protocol that meets, doesn’t exceed, the distance to be covered. Zigbee® will be more efficient than BLUETOOTH®, for example. Turn off radios when not needed. Though do consider the time it takes to power the radio up. For low-power, low data rate applications, this should not be a huge problem.
  • Don’t leave GPIO pins floating.
  • For GPIO pins with internal pull-ups, do NOT enable the pull-up if not needed.
  • Reduce the clock rate communication buses such as I²C and SPI.
  • The resistor and capacitor used in analog-to-digital conversion can sip quite a lot of energy. Reduce the frequency at which readings from the ADC and turn off the R-C network in-between readings. But be sure to give the capacitors sufficient time to charge back up before taking a reading.

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.

To learn more, visit www.mouser.com

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top