Practicing engineers are always learning and perfecting their craft. With the demand for more portable, battery-powered devices and energy harvesting on the horizon, the requirements for even lower-power designs have gotten more challenging.
At first, designers wrestled with saving milliamps, then microamps. Today, it is all about saving nanoamps. As a result, designers have to elevate their thinking to another level. Extreme low-power embedded design requires a tool cache of careful component selection, circuit design, and smart use of microcontroller extreme low-power features.
COMPONENT SELECTION
Let’s begin by taking a closer look at component selection, particularly the capacitor. Figure 1 shows a model of a real capacitor. This seemingly simple device is actually complex.
Value C is the capacitor value. RESR is the equivalent-series resistance (ESR) from the capacitor leads, plates, and dielectric. LESL is the equivalent-series inductance from the capacitor leads and plates. RDA and CDA model the capacitor’s dielectric absorption. RL is the capacitor leakage resistance. Each of these values differs by capacitor type (ceramic, electrolytic, tantalum, poly) and value.
Designers should be aware of where the capacitors are used in the circuit and investigate ways to minimize current consumption. While designers normally don’t look toward capacitors when designing an extreme low-power circuit, these devices can dramatically impact power consumption.
One of the first implications for this real model is the ubiquitous bypass capacitor. In digital circuits, we sprinkle them throughout the printed-circuit board (PCB) with abandon. Each one contributes a few nanoamps of current draw, even in static operation. To combat this, we must reduce the number of bypass caps to a minimum. Great care must be afforded the PCB design by creating power planes and bypassing areas of circuitry.
CIRCUIT DESIGN
The next step is circuit design. Figure 2a shows a common pushbutton circuit used in an embedded device. Resistor R1 provides a pull-up to +V. R1 values range from 10 to 100 kΩ. Capacitor C1 provides filtering and aids in switch debouncing.
In the circuit’s inactive state (pushbutton not pressed), inserting the real capacitor model in place of C1 creates a resistive circuit to ground through R1, C1’s RESR, LESL, and RL (Fig. 2b). This circuit, if left unchecked, will be a constant draw on the voltage supply.
For extreme low-power circuits, there’s little recourse other than removing the capacitor. It will cause more switch bounce, which the microcontroller software algorithm can easily handle. Figure 2c shows the current path of the circuit in its active state (pushbutton pressed). Let’s say +V is 3.3 V and R1 is 10 kΩ. While the pushbutton is pressed, this circuit draws 330 µA—quite a lot for a simple input device! The duration of the button press isn’t known. It can last anywhere from a fraction of a second to many seconds. What can be done to reduce the current draw?
One solution is to control +V. In Figure 2d, a microcontroller digital output pin replaces +V, and R1 is raised to 100 kΩ. The increased resistance lowers the current draw tenfold to 33 µA. The digital output I/O from a microcontroller is used to apply a voltage to the circuit. Its main advantage is that once the pushbutton press is detected, the voltage can be removed and cease any further current draw. This limits the amount of power consumed by lengthy or frequent pushbutton presses.
Many microcontrollers have internal weak pull-ups on digital input pins. (Refer to the “Electrical Characteristics” section of the datasheet to find the current consumption.) For instance, in Microchip’s PIC24F16KA family of 16-bit microcontrollers with nanoWatt XLP Technology, each CNx pull-up consumes 250 µA typical at 3.3 V.
This tells us that the weak pull-up resistor value is approximately 15 kΩ. It also indicates that internal weak pull-ups consume the same amount of power as an external pull-up resistor. Internal weak pull-up resistors are configurable in firmware, and the same idea can be applied. The added benefit is that resistor R1 can be removed, reducing cost.
Another possible extreme low-power switch solution has three capacitors paralleled in circuit, according to one of three switches (Fig. 3). There are eight possible selections, and each provides a different capacitance reading. The choice of the three capacitor values (C1, C2, and C3) needs to be undertaken carefully so there’s a sufficient delta reading to distinguish between each switch selection.
Figure 3 shows one set of capacitor values that result in a minimum delta of 22 pF. The beauty of this circuit is that, when a switch setting is read, the capacitance reading has a much lower current draw than conventional switches with pull-up resistors.
Controlling voltages of loads to minimize current consumption can go one step further to include external peripheral devices and loads. Figure 4 shows an analog temperature sensor controlled by a digital output, in place of +V. Microcontroller digital output pins can typically source and sink 20 to 25 mA. Again, refer to the microcontroller datasheet’s Electrical Characteristics for an individual pin’s current source and sink, and the maximum current source or sink by all ports, collectively.