Designing for low power#

The decisions that determine a product’s energy consumption are made early. Component selection, the schematic and the software architecture all set limits that later work cannot get past. If nobody makes these decisions with energy in mind, the product consumes whatever it happens to consume. Changing them late in a project means redesigns, delays and cost overruns.

Low-power design is one requirement among many, and it often conflicts with others, such as cost, performance and features. Thinking through it up front, alongside the other requirements, leaves fewer surprises at the end.

Operating modes#

Most low-power products spend most of their time asleep. A typical Internet of Things (IoT) sensor sleeps, wakes periodically to read a sensor, and occasionally reports over the radio. It has at least three modes: sleep, sensing and communication.

The energy that the product consumes is the sum, over its modes, of the power in each mode times the time spent in it. Three things matter for each mode:

  • how much power it draws,

  • how long it lasts, and

  • how often it occurs.

List the modes early. They determine which components must work in which mode, what sleep current each component needs, and how the firmware moves between modes. They are also the rows of the energy budget.

Requirements#

Good low-power design starts with good requirements. Features such as a display that is always on, an LED that always shows the device is ready, or a device that is always reachable over the network all keep the product drawing significant power. Weigh each feature against battery life. A phone that is charged every day can keep its radio on. A sensor that must run for years on one battery cannot.

Decide which functions must stay on to deliver the product’s main feature, and let everything else sleep. Often a different approach keeps the feature and saves most of the energy:

  • Instead of a display that is always on, turn the display on when an accelerometer detects that the user picked up the device. Or use an e-ink display, which keeps showing the last image with no power.

  • Instead of a “ready” LED that is always on, pulse it briefly once a minute, or light it only when the user presses a button.

Requirements from the user interface and the mechanical design affect energy too, so include everyone who writes requirements in this discussion.

Initial design#

Initial design for low energy has three parts: select energy-efficient components, arrange them so the system consumes less energy, and configure them correctly.

Select#

Component vendors optimize for different combinations of features, performance, power and cost, and not every component suits low-power design. A desktop processor draws watts. Many microcontrollers sleep at microwatts.

Select components for every mode they operate in. A component must deliver the performance you need when active, at an acceptable power, and it must also reach a low enough current when the product sleeps. Check both the active and the sleep current in the datasheet. When the component you need cannot sleep at a low enough current, arrange the design to turn it off.

Build a prototype from off-the-shelf development boards as early as possible, and measure its low-power modes. Datasheets do not always tell the whole story.

Arrange#

A product is components connected together, and the connections consume energy too.

Reset and power sequencing

Components often require a specific power-up sequence and reset timing. Make sure the design meets them for every component, including those that become active before others.

Power gating

A component or subsystem that cannot meet the sleep budget can be turned off completely in sleep, with a load switch, a P-channel MOSFET or a power management IC. A load switch integrates the switch and its control in one small IC, and many also limit inrush current with a controlled turn-on and discharge the output when off. Check its quiescent current and its leakage when off, since both count against the sleep budget. If you use a P-channel MOSFET, place a pull-up between its gate and source so it stays off by default.

Back-powering

When one part of the design is off and another is on, a signal driven high into the unpowered part flows through its input protection diodes and partially powers it. For example, U1 and U2 each have their own 3.3 V supply. If U1 is on and U2 is off, any signal U1 drives high into U2 back-powers U2. This increases current consumption and can cause undefined behavior, including violating U2’s power-up timing when its supply turns on. Every signal that crosses into a domain that can turn off must be low or high impedance while that domain is off.

Pull-up and pull-down resistors

These set the default states of signals, but each one draws current whenever its signal is driven to the opposite level. A single pull-up held low can exceed the entire sleep budget. Pull-ups can also back-power components. Give special attention to reset and boot mode pins, especially when they are reused for other purposes.

Make these easy to check on the hardware. Add test points to the signals that cross power domains and to the pull-up and pull-down resistors, so you can probe them in sleep.

Configure#

Once the components are selected and arranged, firmware on a microcontroller usually configures them. Give the firmware the controls it needs, such as enable signals or commands over I²C, to turn components on and off.

  • Disable unused subsystems, components and peripherals. Which ones are needed may change with the operating mode.

  • Enter the lowest power state possible. Microcontrollers have several low-power states, and choosing one is not always simple. The deepest states often wake only from specific pins or sources, so make sure the product can still wake when it needs to.

  • Configure every general-purpose input/output (GPIO) pin for each mode, so that no pull-up or pull-down draws current and no two drivers conflict. Many designs need a different GPIO configuration for each operating mode.

  • Look at the vendor’s low-power examples for your microcontroller and your framework or real-time operating system (RTOS) early. Some devices are harder to use at low power than others, and the examples reveal the surprises quickly.

Design for energy or for charge?#

Energy and charge both measure consumption over time. Batteries are usually rated in amp-hours (Ah), a unit of charge, rather than watt-hours (Wh), a unit of energy, which adds to the confusion. Which one to design for is not a matter of preference. It depends on how the product is powered. Most products have a regulator between the battery and the electronics.

Switching regulators: design for energy

A switching regulator converts its input voltage and current to a different output voltage and current. Power is conserved between input and output, minus the regulator’s losses. Switching regulators can raise or lower the voltage and accept a wide range of input voltages. However, their active control draws more quiescent current than a linear regulator, their efficiency changes with input voltage and load, and their switching can cause noise and electromagnetic compatibility (EMC) issues.

Linear regulators: design for charge

A linear regulator, such as a low-dropout regulator (LDO), works like a variable resistor that drops whatever voltage it must to hold its output constant. Current is conserved: the input current equals the output current plus the regulator’s quiescent current. Linear regulators are simple and quiet, and many have very low quiescent current, which makes them good for long sleep periods. However, they dissipate their voltage drop as heat. A switching regulator could have delivered that energy to the load.

Design for energy when the product uses a switching regulator. Design for charge when it uses a linear regulator or no regulator at all. When a product spends most of its energy in high-current modes, a switching regulator often wins. When it spends most of its energy asleep, a linear regulator’s lower quiescent current often wins. The energy budget tells you which case you are in. To measure a converter’s efficiency at your product’s load, see Efficiency.

Design checklist#

Before you build hardware, check that you have:

  • Created an energy budget, and confirmed that the design meets it.

  • Verified the power of every active component against its datasheet.

  • Verified that every pull-up and pull-down resistor draws no current in sleep.

  • Inspected every signal for contention and back-powering in each low-power mode, including signals into parts of the design that turn off.

  • Verified that the product can wake from every low-power mode.

  • Verified that the microcontroller can do what the product needs while in its low-power modes.

  • Reviewed the low-power examples for your microcontroller and framework or RTOS.

  • Checked the insulation resistance specification of every bypass capacitor. Bypass capacitors connect directly from the supply to ground, so any leakage through them is a direct path for current. Buy them from reputable sources. See Leakage inside the target.

  • Prototyped the low-power modes on development boards.