Ultra-low power mcu selection skills and design ideas

Step-by-step power optimization is no longer the game rule of ultra-low-power mcu, but a "sudden advance" mode, and many indicators related to power consumption are constantly refreshing records. We need to master the necessary skills when choosing the right ultra-low power mcu. We need some design directions and ideas to be better applied in the application.

One: ultra low power mcu- low power mcu selection method

The power consumption of embedded microcontrollers (mcu) is becoming more and more important in today's battery-powered applications. Most mcu chip vendors offer low-power, low-power products, but choosing the one that works best for your application is not easy, not as simple as comparing the data in front of the datasheet. We must compare the mcu functions in detail to find the lowest power products, including: power-down mode timing system event-driven functions, on-chip peripheral power-down detection, and protection against leakage current processing efficiency.

In low-power designs, average current consumption often determines battery life. For example, if an application uses Evereay's high-power 9V 1222 battery with a rated current of 400mAh, the average current consumption must be less than 400mAh/8760h, or 45.7uA, to provide one year of battery life.

The power-down mode is the most important of all the features that enable mcu to reach the current budget. The low-power mcu has a power-down mode that provides different levels of functionality. For example, TI's ultra-low-power mcu MSP430 family offers five power-down modes. Low power mode 0 (LPM0) turns off the CPU, but keeps other functions running. LPM1 and LPM2 modes add various clock functions to the list of disabled features. The LPM3 is the most commonly used low-power mode, keeping only the low-frequency clock oscillator and the peripherals that use it. The LPM3 is often referred to as the real-time clock mode because it allows the timer to run with a low-power 32768Hz clock source, consumes less than 1uA, and periodically activates the system. Finally, the LPM4 completely shuts down all functions on the device, including RAM memory, with a current consumption of only 100 nanoamps.

The clock system is the key to mcu power consumption. Applications can enter and exit various low power modes multiple times or hundreds of times per second. The ability to enter or exit low-power modes and process data quickly is extremely important because the CPU wastes current while waiting for the clock to stabilize. Most low-power mcus have an "instant-on" clock that can be ready for the CPU in less than 10-20us. However, it is important to understand which clocks are instant-on and which are not. Some mcu have dual-level clock activation, which provides a low-frequency clock (usually 32768Hz) during high-frequency clock stabilization, which can reach 1 millisecond. The CPU runs normally for approximately 15us, but it runs less frequently and is less efficient. If the CPU only needs to execute a small number of instructions, such as: 25, it needs 763us. The CPU low frequency consumes less current than the high frequency, but it is not enough to compensate for the difference in processing time. In contrast, some mcu can provide a high-speed clock to the CPU in 6 microseconds. It takes only about 9us to process the same 25 instructions (6us activates +25 instructions '0.125us instruction rate), and it can be started instantly. High-speed serial communication.

In addition, if the mcu clock system provides multiple clock sources for the peripherals, the peripherals can still run while the CPU is in sleep state. For example, an A/D conversion may require a high speed clock. If the mcu clock system provides a high-speed clock that is independent of the CPU, the CPU can go to sleep while the A/D converter is running, saving CPU traffic.

The event-driven function coexists with the flexibility of the clock system. Interrupts cause mcu to exit low-power mode, so the more interrupts mcu has, the more flexibility it can prevent CPU polling and power consumption from wasting current. Polling means there is a difference between doing and not spending power budgets because it wastes CPU bandwidth and requires extra current while waiting for an event to occur. A good low-power mcu should have sufficient interrupt capability to provide interrupts to all of its peripherals while providing numerous external interrupts for external events.

The button or keyboard application can prove the advantages of external interrupts. If there is no interrupt function, mcu must poll the keyboard or button frequently to determine if it has been pressed. Not only does polling itself consume power, but controlling the polling interval also requires a timer, which consumes additional current. In contrast, with an interrupt, the CPU can remain asleep throughout the process and only activate when the button is pressed.

When selecting a low-power mcu, you also need to consider peripheral power consumption and power management. Some low-power mcu are just an improved version of the old architecture that was designed without low interest rates. Some mcus are designed with low power consumption and built-in low-power features in their peripherals. One feature is the ability to individually enable or disable peripherals when needed, in other words, the ability to automatically power on or off peripherals. An example is the A/D converter, which automatically shuts down after a conversion is completed. In addition, some mcu are introducing direct memory access, which automatically processes data without CPU intervention.

Most mcu have an integrated power-down protection function that resets the mcu when the power supply is below the normal operating range. Power-down protection is typically provided to turn the power-down protection on or off, but the power-down protection must be placed in a usable state throughout the process because power-down is unpredictable. Some mcu require 70uA of current to achieve brownout protection. It is obvious that these mcu can be ignored in application examples where only 45uA average current is required. Leakage current is sometimes ignored during the selection of low-power mcu, but leakage current must be considered in the most demanding low-power applications. Most of the improved low-power mcu have a defined input leakage current of 1uA. In a 20-input device, it can consume 20uA! The latest mcu for low power designs has a leakage current of up to 50nA.

---- Finally, we often misunderstand the efficiency of mcu processing. It is generally assumed that a 16-bit mcu requires twice as much memory as an 8-bit mcu, but a 16-bit architecture actually requires less code than an 8-bit architecture, while a 16-bit mcu generally performs tasks faster. For example, 8-bit mcu requires CPU overhead to manage data in applications with 10-bit A/D conversion data or 16-bit calculations. And many of today's mcu products have a single working file or accumulator whose data must be transferred for processing, thus requiring additional CPU overhead compared to register-based architectures. Table 1 shows the instructions for transferring 10-bit A/D data on a 16-bit modern architecture and an 8-bit 8051 architecture. With a 1Mhz clock, 16-bit devices require 6us for transmission, while 8-bit devices require 24us.

16-bit mcu8-bit mcumov.w &ADC10MEM, &RAMmovf ADRESH, W movwf RAML bsf 0x20 movlf ADCHRESL, W bcf 0x20 movwf RAMH ---- Table 1: 16-bit and 8-bit mcu code requirements

Choosing a low power mcu is a time consuming and tricky task. If we spend some time understanding the architectural features of the available product options, we can develop designs that meet the most demanding power budgets.

Two: ultra low power mcu - how to reduce the power consumption of mcu

Low power consumption is a very important indicator of mcu. For example, some wearable devices have limited power. If the entire circuit consumes a lot of power, it will often run out of power and affect the user experience.

Usually, when we are doing products, the basic functions are very simple to implement, but as long as the problem of low power consumption is more difficult, for example, some mcu can be as low as micro-ampere, and the low-power consumption of our own design is measured. It is milliamperal, the current can be hundreds of times higher than the standard. Don't be afraid to encounter this situation. If you are serious, you will win. Let's take a closer look at the reasons below.

The first one: break the peripheral life pulse - turn off the peripheral clock

First of all, the most intuitive, but also the engineer's attention is to turn off the mcu peripheral clock. For most of the mcu that appear on the market today, its peripheral modules correspond to a clock switch. You only need to open the clock of this peripheral, you can use this peripheral normally. Of course, this peripheral will also generate corresponding power consumption; otherwise, if you want this peripheral to not generate power, just turn it off. The clock is fine.

Article 2: Let the work pace slow down - the clock should not be multiplied

In addition to the peripheral module power consumption, there is also a big power consumer to pay attention to, this is the PLL and FLL module. The PLL and FLL are mainly used to multiply the original clock signal to increase the overall clock of the system, and accordingly, the power consumption is also raised. So before entering low power consumption, you need to switch to a mode, bypass the PLL and FLL module, so as to reduce the power consumption of mcu as much as possible, and then switch the clock back after mcu wakes up.

Ultra low power mcu

Article 3: Containing trickle flow - pay attention to the level status of the I/O port

If you think that you can ensure that the peripherals no longer consume power as long as you turn off the peripheral clock, then you are too naive. If the IO port is not handled properly, it will steal power in the dark, but you don't know. The specific reason is this, the general IO inside or outside will have pull-up resistors, for example, as shown below, if an IO port has a 10KΩ pull-up resistor, pull the pin to 3.3V, however When mcu enters low power mode, this IO port is set to output low level. According to Ohm's law, this pin will consume 3.3V/10K=0.33mA current, if there are four or five such IOs. Mouth, then a few mA will be posted, it is a pity. So before entering low power consumption, please check the status of the IO port one by one:

If this IO port is pulled up, set it to high level output or high impedance input;

If this IO port is pulled down, set it to low level output or high impedance input;

Ultra low power mcu

In a word, don't waste the good current on the function of generating heat. You can't rely on this temperature to warm your hands.

Article 4: Good-neighborly and friendly cooperation - pay attention to the coordination of I/O and peripheral IC

The factor of the upper-lowering resistance of the IO port is relatively obvious. The lower side is an insignificant factor: the current consumption when the IO port is connected to the external IC. If an IO port comes with a pull-up, and the IC pin connected to the IO is pulled down by itself, no matter what level output the pin is in, it will inevitably generate a certain current consumption. So if you encounter this kind of situation, you first need to read the manual of the peripheral IC to determine the state of this pin, so that you know what it is. Then, before controlling mcu sleep, set the up and down mode of the IO port of mcu and Input and output state, to ensure that a trace of current is not consumed by it.

Article 5: Disconnect the debugger and don't be confused by the illusion

There is also a kind of strange, the detected current consumption is very large, but the actual result is that I am worried, what is the reason? Because the mcu is connected to the debugger when testing the power consumption! At this time, most of the current will be debugged. The device gives you a sneak peek, and the engineer is extremely depressed. Therefore, when measuring low power consumption, you must not connect the debugger, and you can't measure the current while debugging.

to sum up

Mcu's low-power design is a meticulous work, to develop a good habit, to re-verify whether the low power consumption meets the requirements for each function added, so that you can eliminate the power consumption factor anytime and anywhere. If you design all the functions to consider the low-power problem, you may have to change the architecture of the program if you are not careful. Even so, you may not be able to completely reduce the power consumption.

Recommended reading: How is an ultra-low-power MCU made?

KNB1-32 Miniature Circuit Breaker

KNB1-32 Mini Circuit breakers, also named as the air switch which have a short for arc extinguishing device. It is a switch role, and also is a automatic protection of low-voltage electrical distribution. Its role is equivalent to the combination of switch. Fuse. Thermal Relay and other electrical components. It mainly used for short circuit and overload protection. Generally, According to the poles, mini Circuit breaker can be divided into 1P , 1P+N , 2P, 3P and 4P.


KNB1-32 Miniature Circuit Breaker,KNB1-32 Electronics Miniature Circuits Breaker,KNB1-32 Automatic Miniature Circuit Breaker,KNB1-32 Mini Circuit Breaker

Wenzhou Korlen Electric Appliances Co., Ltd. , https://www.korlen-electric.com

Posted on