Smart Extreme Low-Power Design

作者:Steven Bible

投稿人:Convergence Promotions LLC


You're familiar with the basic approaches to low-power design. Now, how do you take it to the next 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. This article walks you through some particulars of circuit design, component selection, and the care and feeding of MCUs that you'll need to minimize the power profile of your next embedded design.

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 has ratcheted up a notch. At first, designers wrestled with saving milliamps, then micro-amps. Today, it is all about saving nanoamps. As a result, designers have to change 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. In particular, the capacitor in Figure 1 shows a model of a real capacitor. As we can see, this seemingly simple capacitor is actually a complex device. Value C is the capacitor value. RESR is the equivalent-series resistance from the capacitor leads, plates, and dielectric. LESL is the equivalent-series inductance from the capacitor leads and plates. RDA and CDA is the model of 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. What we want to take away from this discussion is to be aware of where we are using capacitors in the circuit and look at ways to minimize current consumption. While designers normally don't look toward capacitors when designing an extreme low-power circuit, they can have a dramatic impact on power consumption.

Figure 1: Real Capacitor Model.

Figure 1: Real capacitor model.

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 of these contributes a few nanoamps of current draw, even in static operation. To combat this, we must reduce the number of bypass caps to the minimum necessary. Great care must be afforded the PCB design by creating power planes and bypassing areas of circuitry.

Circuit Design

Which leads us to circuit design. Let's take a look at the common push-button circuit as an example. Figure 2A shows a common push-button circuit used in an embedded device. Resistor R1 provides a pull-up to +V. Values of R1 range from 10 K to 100 K ohms. Capacitor C2 provides filtering and aids in switch debouncing.

First, let's look at the circuit in its inactive state (push button not pressed). If we insert the real capacitor model in place of C1, as shown in Figure 2B, we see that we have a resistive circuit to ground through R1, C1's RESR, LESL, and RL. This circuit, if left unchecked, will be a constant draw on the voltage supply. For extreme low-power circuits, we are left with little recourse; we have to remove the capacitor. The ramification is that we have to deal with more switch bounce. This can easily be handled in the microcontroller software algorithm.

Now, let's look at the circuit when it is in its active state, with the push button pressed. Figure 2C shows the current path. Let's say, for example, +V is 3.3 volts and R1 is 10 K ohms. While the push button is pressed, this circuit draws 330 microamps. Quite a lot for a simple input device! The duration of the button pressed we do not know. 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, we've replaced +V with a microcontroller digital output pin and raised the value of R1 to 100 K ohms. The increased resistance lowers the current draw tenfold to 33 microamps. The digital output I/O from a microcontroller is used to apply a voltage to the circuit. Its main advantage is that once the push-button press has been detected, the voltage can be removed and cease any further current draw. This limits the amount of power consumed by lengthy or frequent push-button presses.

Figure 2: Evolution of the Push-Button Circuit.

Figure 2: Evolution of the push-button circuit.

Many microcontrollers have internal weak pull ups on digital input pins refer to the Electrical Characteristics section of the data sheet to find the current consumption. For example, in the PIC24F16KA family of 16-bit microcontrollers with nanoWatt XLP Technology, each CNx Pull-up consumes 250 microamps typical at 3.3 volts. This tells us that the weak pull-up resistor value is approximately 15 K ohms. It also tells us 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 is shown in Figure 3. Three capacitors are paralleled in circuit, according to one of three switches. There are eight possible selections, and each provides a different capacitance reading.

Figure 3: Switch Selection Circuit.

Figure 3: Switch Selection Circuit.

The choice of the three capacitor values, C1, C2, and C3, needs to be undertaken carefully so that there is 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 with conventional switches that have pull-up resistors.

Let's extend our thinking of controlling voltages of loads to minimize current consumption 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-25 milliamps. Refer to the microcontroller data sheet's electrical characteristics for an individual pin's current source and sink, and the maximum current source or sink by all ports, collectively.

Figure 4: Powering Peripherals with Digital IO Pins.

Figure 4: Powering peripherals with digital I/O pins.

By way of example, the MCP9700 analog temperature sensor from Microchip typically draws 6 microamps while operating. By placing a ground on the digital output pin, we effectively turn the circuit off, thus saving 6 microamps. When powering on a device, be sure to read the data sheet to discover whether there is a turn-on time before making a reading. Again, as an example, the MCP9700 turn-on time is 800 microseconds. Thus, to make one temperature reading, the circuit will draw 6 microamps, plus the ADC's reading current for 800 microseconds, plus the ADC acquisition time.

If the load is greater than the source or sink current of a microcontroller's digital pin, then an FET switch can be employed as shown in Figure 5. Transistor Q1 is a P-channel MOSFET. We desire a very low drain-source resistance (RDS), and we often find these in P-channel MOSFETs. However, one challenge we have with this type of MOSFET is that the gate voltage must be low in order to turn on the FET. Resistor R1 is placed in the circuit to prevent any glitches when powering on the circuit. The value of R1 was chosen to the 1 megaohm, to minimize the current draw when the digital output is at a low (ground). We expect that the load controlled by the MOSFET is on for a relatively short time, compared to its off time.

Figure 5: Controlling Loads.

Figure 5: Controlling loads.

Microcontrollers and low-power design

Careful selection of components and circuit design can take you to the next level in extreme low-power design. However, at the heart of many an embedded design is a microcontroller. Normally, the microcontroller is there to run a program, making the device operate as intended. However, not to be overlooked, microcontroller manufacturers have added many features that aid in low-power consumption.

When powering circuits for lower power consumption, set the system voltage as low as possible. For example, a microcontroller running at 1 MIPS at 3.3 volts can draw 700 microamps. Lower the voltage to 1.8 volts while keeping the same speed, and the current draw becomes 370 microamps—almost a 50 percent savings.

System clock speeds can be changed on the fly. In the not so distant past, you were allowed to only set one clock speed. Today, you can select on the fly speeds as low as 31 kHz and as fast as 32 MHz, and values in between. It is a well-known fact that digital CMOS circuitry consumes less current if the switching speed is reduced. By all means, run the microcontroller at the lowest speed possible. Today, you don't have to settle for one or two speeds; now, you can have as many as sixteen different speeds from which to choose. With this much choice, there's a speed for every subroutine.

In the past, system clocks ran from an oscillator circuit using an external ceramic or crystal resonator. Today, microcontrollers sport multiple internal oscillators. The internal oscillator accuracy ranges from 1 percent at 25°C, to 3-5 percent over temperature. If the application demands greater accuracy, the external oscillator circuit can be turned on in software when accuracy is demanded, and switched off (over to the internal oscillator) when accuracy is not in demand; thus slowing the microcontroller down and saving power.

Modern microcontrollers are chock-full of peripherals. You have a variety of choices in timers, asynchronous and synchronous serial communications (USART, SPI, I²C™), comparators, analog-to-digital converters (ADCs), Real-Time Clock and Calendars, and Charge Time Measurement Units (CTMUs). Keep in mind that each peripheral adds to the overall current draw by the microcontroller. However, each peripheral can be switched on and off from software. We've already mentioned the switching of internal weak pull ups. Maintain power to only those peripherals needed to minimize power consumption.

Modern microcontrollers also have more choices in power-saving features. Today, microcontrollers run, doze, idle, sleep and deep sleep. These modes give the designer more options in managing the power consumption beyond simply changing system clock speed. These modes also control certain peripherals.

Doze mode is for circumstances in which the system clock to the CPU is slowed (prescaled) so that the CPU runs at a lower speed than the peripherals. This mode is particularly useful when CPU resources are in low demand, but the peripheral needs to continue to run at full speed. This may be necessary for an application to maintain uninterrupted synchronous communications.

Idle mode will stop executing CPU instructions, but the system clock continues running peripheral modules. To exit idle mode, any enabled interrupt, device reset, or watch-dog timer time-out will begin CPU instruction execution.

Sleep mode shuts down the system clock, thus no longer clocking the CPU or peripherals, yet RAM is retained. Certain purposed clocks and timers can be enabled during sleep mode, such as real time clock and calendar, and watch-dog timers. These enable the microcontroller to time functions while in the sleep mode, adding great flexibility and variety to power-saving schemes in the application design.

Deep sleep provides the lowest level of power consumption. Power is removed from significant areas of the microcontroller. Sleep currents in the tens of nanoamps are achievable in deep sleep mode. Depending on the feature set of the microcontroller, certain peripherals are dedicated to the deep sleep mode, such as deep sleep brown-out reset and a dedicated deep sleep watchdog timer. These peripherals are independent of the standard brownout reset and watch-dog timer so that they can monitor voltage and time-out events while in deep sleep. Be aware that waking from deep sleep takes longer than waking from a traditional sleep mode, as RAM is not generally retained and must be restored.

Prior to sleeping, be aware of I/O pins states. During sleep and deep sleep, I/O pins will retain their previous state.

Be careful of digital input pins that are left floating. Input voltage levels can drift between logic 0 and 1, and can enter a midpoint voltage where the digital input buffer will bias in a linear region, causing significant current consumption. Consider configuring the pins as analog inputs, as they are high-impedance and will draw very little current. Do this prior to entering sleep modes.

Digital outputs generally don't need any additional configuration. The current consumed will be the pin's input or output leakage current. What you want to pay attention to is what the digital output pin is powering. Determine its optimal state prior to entering a sleep mode. If the external circuit is powered on and off by the microcontroller, be careful that the circuit is not back-powered by digital output pins supplying a logic 1. Set the digital outputs to logic 0 (ground) prior to powering the circuit off.

Unused I/O pins are best configured as digital output pins driving either high or low. Or, they may be configured as input with an external pull-up or pull-down resistor. However, the pins will draw input leakage current.

Powering up circuits using the above methods and waking up from deep sleep has its implications. When a circuit has been powered off for a time, all charges will be drained away. Powering on a circuit will create a short current burst while the circuit comes alive. To mitigate the surge, place storage capacitors on the supply side of the switch. However, with our knowledge of capacitor leakage, we have to take care in the selection of capacitor type. Electrolytics are generally known to have high leakage current; tantalum also has high leakage current, but to a lesser extent than electrolytics. Ceramics provide a good cost-per-performance compromise, and they have both low RESR and low leakage.

Conclusion

Many of these circuit ideas may seem incredibly simple and obvious. But this article illustrates the mode of thought that is necessary to grab back all those nanoamps that have been slowly drifting away without doing any useful work. Extreme low-power design raises the bar in terms of both design concept and mindset. To successfully achieve the lowest possible power budget, a designer must carefully select components, pay attention to circuit design, and make use of the smart features in the microcontroller. Always keep a look out for wasted nanoamps. If you do, the microamps take care of themselves. You may find them drifting away in the most unsuspecting places.

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

Steven Bible

Article authored by Steven Bible, RF Products Division, Microchip Technology Inc.

关于此出版商

Convergence Promotions LLC