Designing a low-power MCU system, both hard and soft are key

The low power consumption of electronic products often causes product designers to have headaches and has to face. The power consumption of a microcontroller (MCU) is mainly composed of the power consumption of the microcontroller and the power consumption of the peripheral circuit of the microcontroller. To reduce the power consumption of the microcontroller system, it is necessary to start from both hardware and software.

Hardware design considerations

To meet the low power requirements of microcontroller systems, it is easy to implement a microcontroller with low power consumption (for example, the high-speed C8051F series microcontrollers designed by Siliconlaboratories). Because the MCU with low power consumption can greatly reduce the system power consumption, this can examine the low power consumption characteristics of a single MCU from the aspects of the power supply voltage, internal structure, system clock and low power mode of the MCU. In general, users need to consider the following important hardware parameters in the process of selecting technology suppliers and products:

Choose a simple CPU core

When choosing a CPU core, avoid blindly pursuing performance and use the principle of “enough to use”. If the 8-bit machine is enough, there is no need to use a 16-bit machine or a 32-bit machine; the faster the MCU runs, the more power it consumes. The more complex a CPU is, the higher the integration, the stronger the function, the more transistors on-chip, the larger the total leakage current. Even if it enters the STOP state, the leakage current will become negligible; the simple CPU core not only has low power consumption. The cost is also low.

Select low-voltage power supply microcontroller system

The low power supply voltage of the single chip system can effectively reduce the power consumption of the system. Due to the development of semiconductor manufacturing processes, the power supply voltage of the microcontroller has been reduced from 5V to 3.3V, 3V, 2V or even 1.8V. The power supply voltage is low, it can reduce the power consumption of the single-chip microcomputer, and can also reduce the power consumption of the peripheral circuit of the single-chip microcomputer.

Select a microcontroller system with low power mode

Low-power mode refers to the system's Idle, Stop, and Suspend modes. The power consumption in these modes will be much less than the power consumption under normal operation. In Idle mode, the CPU stops working, but the internal system clock does not stop. The peripheral I/O module of the MCU does not stop working. The system power consumption is generally limited, which is equivalent to about 50% of the operating mode power consumption.

If the analog peripherals are turned off when the CPU enters the Stop mode, the power consumption can be reduced to the nA level. However, in Stop mode, the CPU is initialized after the CPU is woken up, and the contents of all special function registers will be reinitialized. This requires attention in some low power applications.

In Suspend mode, the CPU and internal system clocks stop working, I/O modules are suspended, the data stored in the on-chip RAM is held, and the CPU power consumption can be reduced to nA level, which is awakened by the wake-up event. When the CPU is woken up, the system will not be reset by the CPU and continue to execute the program from the place where Suspend mode is entered. This is a very ideal low power mode.

At the hardware level, it is necessary to carefully measure these parameters. In addition, it is also critical to choose the appropriate clocking scheme and use the MIPS power consumption to measure the MCU's low-power performance.

Application considerations

The importance of application software design for a low-power system is often overlooked. An important reason is that software design flaws are not as easy to find as hardware, and there is no strict standard to judge the low-power characteristics of a software. However, designers can avoid the "invisible" power loss if they can reflect the low-power characteristics of the application in the software as much as possible:

Replace "query" with "interruption"

In the case where low power consumption is not required, it is not important that the program uses the interrupt mode or the query mode. However, in the case of low power consumption, the two methods are far apart. Using the interrupt mode, the CPU can do nothing, or even enter the wait mode or stop mode; in the query mode, the CPU must constantly access the I / O registers, which will bring a lot of extra power.

Replace "subprogram" with "macro"

The push-pull operation of the subroutine call, to perform two operations on the RAM, will bring more power consumption. The macro expands at compile time and the CPU executes the instructions in order. Using macros will increase the amount of code in the program, but for applications that don't care about the large amount of program code, using macros will undoubtedly reduce the power consumption of the system.

Minimize the amount of CPU operations

Reducing the computational workload of the CPU can effectively reduce the power consumption of the CPU. The work of reducing the CPU operation can start from many aspects: replace the real-time calculation with the look-up table method; the inevitable real-time calculation, the end of the calculation is enough to avoid the "excessive" calculation; try to use short data types, for example Try to use character-type 8-bit data instead of 16-bit integer data, try to use fractional operations to avoid floating-point operations.

Let the I/O modules run intermittently

During the operation of the system, unused I/O modules should be turned off, and intermittent I/O modules should be turned off in time to save power. At the same time, unused I/O pins should be set to output or set to input and pulled high with a pull-up resistor.

In short, in the design process of the MCU system, it is necessary to deeply understand the low-power characteristics of the MCU, and make full use of the low-power characteristics of the MCU in the design process of hardware and application software, so as to design a product that meets the requirements of low power consumption.

Spring Terminal Blocks

Spring Clamp Terminal Block,Screwless Spring Terminal Blocks,Spring Conductor Terminal,Spring Clip Terminal Blocks

Wonke Electric CO.,Ltd. , https://www.wkdq-electric.com