Optimizing Low-Power Embedded Designs

Whether your embedded design will work off batteries or wall power, it needs to be optimized for energy efficiency from the start. This article examines numerous points to consider when selecting an MCU, including its power profiles, available control functions in various operating modes and the power consumption of the peripherals.

The need for low-power embedded designs has always been highly motivated by the desire to run applications for as long as possible while consuming the minimum power. In a battery powered system, this need is magnified. Furthermore, in battery powered systems low power implies lower cost of operation and smaller battery size to make applications more mobile. When energy comes at a premium as it does with today's green initiatives, ensuring that an embedded design consumes as little energy as possible assumes significant importance in wall-powered applications as well. Designing power-efficient applications also ensures lesser overhead to manage thermal dissipation and the generation of heat controlled at the source by optimizing the power consumed. Keeping the above obvious advantages in mind, today's embedded application designers can no longer ignore the problem of optimizing power. This article will focus on the major factors contributing to power consumption in an embedded system by analyzing the various power modes that most microcontrollers offer today. Then, we will analyze a real-life example of an embedded application in terms of power consumption and how its efficiency can be maximized.

MCU power consumption

To begin, there are several points to be aware of when selecting a MCU or external components. Overall power consumption of an MCU is defined by its power consumption in different modes, typically active and standby (includes sleep, hibernate, etc.) and taking into account the power consumed to transition from one mode to another. Let us go through these power modes in more detail.

Active power consumption by an MCU is the power consumed when the MCU is running. As almost all controllers are based upon CMOS logic, power is consumed primarily during switching. As a starting point, let us analyze the power consumption of a CMOS inverter (Figure 1) which is the basic building block of any CMOS design.

Optimizing Low-Power Embedded Designs

Figure 1: CMOS inverter.

CMOS circuits dissipate power by charging the various load capacitances whenever they are switched. When considering internal architectures, this is mainly the gate capacitance. However there are drain and source capacitances too. Power is dissipated across the PMOS transistor while the load capacitor is being charged and across the NMOS when the load capacitor is being discharged. Instantaneous power dissipation across NMOS transistor of CMOS inverter (Figure 1) is given by Equation 1.

Optimizing Low-Power Embedded Designs

After substituting the value of iL in Equation 1:

Optimizing Low-Power Embedded Designs

Total power dissipation across the PMOS to switch the output from low to high can be found by integrating power dissipation across the PMOS to the charge load capacitor from 0 V to Vdd:
PMOS power consumption:

Optimizing Low-Power Embedded Designs

Similarly, to switch the output from high to low, total power dissipation across the NMOS is:
NMOS power consumption:

Optimizing Low-Power Embedded Designs

For one switching cycle, then, power dissipation is:

Optimizing Low-Power Embedded Designs

If we define the average power in terms of switching frequency (f), we get:

Optimizing Low-Power Embedded Designs

From Equation 6 it can be seen that power consumption depends upon switching frequency, load capacitance, and supply voltage. Load capacitance is determined by the technology parameters and the design layout and is therefore beyond the control of the embedded system designer. However, the other two factors — switching frequency and supply voltage — are factors a system designer can modify with an intention to impact power efficiency for a given microcontroller. Of course, the value of these parameters is also heavily dependent on the application of the design.

However, modern controllers run at an internal regulated voltage irrespective of the input voltage on the supply pins. There are controllers available on the market which can be operated from 0.5V to 5.5 V, but the internal core runs at a fixed regulated voltage like 1.8V irrespective of the supply voltage. Therefore, this parameter is not as important in the case of modern controllers as it was in the past. However, it is good to keep the supply voltage to the minimum requirement for regulators or near the voltage where the regulator is bypassed.

This leaves system designers just one parameter available for affecting power control: switching frequency. Hence, in the active mode, the minimum required operating speed for the MCU should be calculated and higher clock speeds should be avoided.

Standby power

The other major factor that determines battery life is the standby power consumption of an embedded system. Most applications can spend significant periods of time in standby mode. In these systems, the major contributor towards total system power consumption is the standby current rather than the active current. Standby current is the sum of leakage current, current consumed by power management circuits, clocking systems, power regulators, RTC, IOs, interrupt controllers, and so on. It varies from controller to controller, based upon the particular features supported in standby mode.

Finally, power consumption while transitioning from low-power mode to active mode should not be overlooked. Devices may end up wasting a significant amount of power while transitioning between these two modes.

Based on these power modes, an MCU's average power consumption is:

Optimizing Low-Power Embedded Designs

Where, Active Power= Time for which an MCU is active * Active Current

Sleep Power= Time for which an MCU is in sleep * Sleep Current

Transition Power= Power consumed while making transition from sleep to active mode

The amount of time the system remains in active and standby mode is application dependent. Some applications may need to have MCU running all the time while some may need to have it running only occasionally. There are MCUs available on the market that come with additional power down modes other than sleep. Examples include hibernate mode, deep sleep mode, or shut down mode in which power consumption can be on the order of 10s of nA. System designers need to look at the power consumption in the mode specifically in which the system has to operate for the majority of time to ensure the overall design is power efficient.

If we look deeper, there are some vital trade-offs that must be considered. For some applications, it could prove beneficial for the system to run at a higher speed, so it can finish the job faster and return to low-power mode. Alternatively, other systems may do better running at a slower speed to keep active power consumption low. Here, the system designer has to analyze the best case for the application considering the current at different operating speeds, the time it takes to come out of low-power mode, the current consumption in low-power mode, and the frequency with which the system needs to switch between active and sleep modes.

Peripheral power

MCU power consumption is only one factor when considering system power consumption. Sometimes, engineers tend to concentrate too much on the MCU and ignore the power consumption by external peripherals. If the objective is to optimize the power consumption of the entire embedded system solution, one cannot afford to do this.

Consider a simple temperature measurement system for home use (see Figure 2).

Optimizing Low-Power Embedded Designs

Figure 2: Temperature monitoring system.

This system has one ADC to measure the sensor voltage, one DAC to generate a reference, one LCD module to display data, and one MCU to process the data. Power should be saved beginning at the individual block level. If the power consumption is calculated for this system, it will be given by:

Optimizing Low-Power Embedded Designs

For this system, the sample rate need not be very high since the temperature does not change rapidly. Power consumption can be kept to a minimum by switching on the ADC and DAC only when required and optimizing the time ratio for which the MCU stays in active and standby mode. If this system is made of discrete components, it can become quite challenging to coordinate. Power consumption for discrete component-based architectures will look similar to the system shown in Figure 3.

Optimizing Low-Power Embedded Designs

Figure 3: Power consumption system using discrete based solution.

In Figure 3, standby current is mainly contributed to by MCU standby current and the active current of the ADC, DAC, and LCD. The ADC may have an option by which the MCU can stop ADC conversion before it goes to sleep to save ADC power consumption. However, there will still be some standby current for ADC and similarly for the DAC. Alternatively, the system could be implemented using a system-on-chip (SoC) architecture where all of the peripherals are integrated onto a single chip along with the ability to control the power of each individual peripheral. Power consumption of this system will look similar to that shown in Figure 4 and can lead to a dramatic reduction in power consumption compared to a discrete component-based implementation.

Optimizing Low-Power Embedded Designs

Figure 4: Power consumption of SoCbased solution vs. discrete solution.

When designing any system, we should use what is needed rather than using what is available. When requirements are overestimated, such as choosing a faster or more sophisticated component that is needed, the results are higher costs and lower power efficiency. For example, a 20-bit ADC running at a speed of 1 Msps is clearly more than is needed for a temperature measurement application. In addition, the ADC needs a high-frequency operating clock to sample at this rate.

Advancements in SoC technology allow developers to access a wide range of peripherals on-chip such as filters, ADCs, DACs, Op-amps, and programmable analog and digital blocks. For example, PSoC devices from Cypress Semiconductors have a wide operating frequency range with programmable clock sources for different blocks including the MCU, and support numerous power management modes. These modes range from active mode, where all the features on the device are available; to hibernate modes where current can be as low as 100 nA while retaining the contents of configuration registers and RAM.

As complex as SoC architectures are, they represent almost the complete system, making it more straightforward to compute power consumption. For example, if the system is doing nothing, then the standby current of the whole system can be as low as 100nA. Since peripherals and the MCU can be switched on or off individually, only the appropriate blocks can resume operation after the next wake-up event. This is one of the key features that a SoC can have from a system point of view. In some systems, it is possible that for a certain period only some hardware functions are needed and not the MCU, such as, for example, when generating a waveform using a DAC. This task can be completed by the DMA (Direct Memory Access) and DAC without the MCU, and so, the MCU can be switched off. SoCs enable users to design ultra-low-power embedded systems that are cost and space efficient with the added advantage of fast time-to-market.

A system's average power calculation in a SoC-based system becomes more complex, because along with the average MCU current, we need to consider each the operating state of each individual peripheral on the chip. Average system current is:

Optimizing Low-Power Embedded Designs

Where:

n = number of power modes supported
Ik = current consumption in power mode k
Tk = amount of time spent in power mode k
It = current consumed to make transition from each low power mode to active mode
p = number of peripherals
Ij = current consumption of peripheral j
Tj = on time of peripheral j

Battery life

Battery life is a critical specification for any battery powered application. Battery ratings are given in the units of mA -Hr, meaning it can supply 'X' mA of current for one hour. If we know the average current, we can calculate the battery life:

Optimizing Low-Power Embedded Designs

Equation 10 will give the battery life in hours if Iavg is given in mA.

Power consumption is one major factor that almost every consumer cares about in both wall-powered and battery-powered devices. In today's competitive market, designing a product that consumes higher power or that costs more can result in reduced market success. When optimizing power consumption is a major criterion, designers should look at critical parameters like choosing the appropriate components and making certain they are not overrated for the desired end application or the system does not operate at higher speeds than are required. In addition, developers will want to seriously consider how long the system spends in active and standby modes and the relative power consumption in each.

  • Optimizing Low-Power Embedded Designs已关闭评论
    A+
发布日期:2019年07月13日  所属分类:参考设计