Home Alternative Low Power MCU Design Techniques

Low Power MCU Design Techniques

In today's highly competitive markets, designers are required to design more features for less: less cost, less power, less size. This is especially true in markets targeted for energy efficiency and "green" products. Next generations of microcontrollers like the Renesas RX100 are designed to save power, without compromising strong CPU performance levels, with advanced integration of peripherals, memory, and near-zero power consumption in operations.

These innovative devices can wake up quickly from standby mode, consuming much less current than existing solutions, and achieving exceptional levels of performance. These are advantages that systems engineers can use to create products that offer a wide range of new capabilities to meet the requirements of today's and tomorrow's markets.

This article highlights the advantages of using the low power characteristics of 32-bit microcontrollers, such as the Renesas RX100, and shows how system engineers can apply them to design battery-powered products within extremely tight power dissipation limits. . We will also show how this class of devices can be used in real low consumption applications, leading to an increase in system performance, but at the same time a decrease in the total cost of the system. The RX100 MCUs are the industry's first 32-bit MCUs that combine revolutionary power control technology with the innovative features of ultra-fast wake-up time, zero flash access timeout, multiple security features, USB 2.0 integrated host/device and on-the-go, all at a very competitive price.

These microcontrollers are the best choice for low-end, 32-bit applications such as mobile healthcare devices, smart meters/meters, security systems, as well as sensors, detectors, and other elements of industrial control and building automation equipment. The main low-power features of these devices include:

•Exceptional power efficiency in active mode: 100µA/MHz

•Wake-up time, Ultra-fast: 4.8µs or less.

•Superior Architecture: Performance 3.08 Coremarks/MHz.

•Six modes of operation, plus numerous other energy-saving design options.

•Standard and advanced peripherals: ADC, LVD, RTC, USB, and more. 

Multiple, power-optimized modes of operation (high speed, medium speed, and low speed) minimize power consumption when different CPU speeds are needed for different application tasks. In addition, three low-power modes (asleep, deep sleep, and software standby), combined with the short wake-up time from these modes, allow system engineers to fine-tune system performance and power supply to meet the requirements of a specific application. There are many other power-saving techniques to consider, such as the use of zero-flash access timeout technology, which lowers power consumption because the CPU doesn't have to sit idle while waiting for data to be fetched from the flash. nonvolatile storage. Each peripheral module can be turned off individually, so those not in use don't waste energy. An advanced clock system allows peripheral clocks to be slowed down while the CPU operates at full frequency. On the other hand, several oscillators (HOCO or LOCO) can be chosen for the CPU and obtain an extra consumption reduction in some situations, by using these clocks to replace the Phase-Lock Loop (PLL).

The RX100 family CPU architecture is extremely computationally efficient, achieving the highest possible number of instructions per mW. Interrupt latency is just 5 cycles and throughput is rated at 1.54 DMIPS/MHz and 3.08 Coremarks/MHz. 

The architecture's large number of parallel buses makes simultaneous data movement between the CPU, Flash, SRAM, and peripherals possible. This design feature ensures that no bottlenecks occur when the CPU wakes up from a low power/shutdown mode. By maintaining direct control of all elements of development and manufacturing at Renesas, our semiconductor technology experts enable high-quality production and optimized system design that customers can use to implement ultra-low-power products and systems. .

As previously mentioned, the CPU has three power control modes: high speed, medium speed, and low speed. Each of these modes makes available a different set of peripherals. However, some restrictions should apply. The availability of some oscillators, PLL, Flash memory programming at certain clock frequencies, depend on the selected operating mode. In contrast, the MCU's supply voltage requirements are not affected by power regulation modes of operation. Operations are always allowed over the entire MCU power operating range from 1.8V to 3.6V. However, the clock frequencies used, in high, medium, and low speed modes, do depend on the supply voltage. (See Table 1.) In addition to the three power regulation modes, the RX100 also offers the aforementioned low-power modes of operation: Sleep, Deep Sleep, and Software Standby. In each of them, different MCU functions are stopped and/or turned off, saving various amounts of current. Details can be seen below:

Sleep Mode: The CPU stops with the data held. This reduces the dynamic current consumption of the CPU, which is a significant contributor to the total current consumption of the MCU. The CPU wakes up from sleep mode to active mode in just 0.21µs at 32MHz.

Deep Sleep mode (Deep Sleep mode): The CPU, RAM and Flash memory are stopped with the retained data. At 32MHz with various peripherals active, typical operating current is only 4.6mA. It takes only 2.24µs to wake up the CPU from deep sleep mode to active mode. Software Standby mode: The PLL, and all oscillators except the sub-clock and IWDT are stopped. Almost all of the RX100 modules: CPU, RAM, Flash, DTCs, and peripheral blocks, stop with the retained data. The Power on Reset (POR) is still active, although if necessary, the iWDT, RTC and LVD can also work. The current draw in this mode is 350nA to 790nA, depending on whether the LVD and RTC are used or not. When waking up in 4MHz working mode, CPU operation starts after a delay of 4.8µs. When wake up in 32MHZ working mode, the time is extended to 40µs.

While the RX100's sleep, deep sleep, and software standby modes are very helpful in reducing the current the chip draws, system engineers can use other techniques to further reduce power consumption. For example, various frequency division ratios of the clock signal can be set individually. This capability applies to the system clock, module clock, ADC clock, and flash memory clock. It is a valuable design choice when application requirements differ between different function blocks. Each peripheral module also has an independent shutdown control per bit. This feature allows software to exercise individual control of MCU functions to further reduce dynamic current.

The remainder of this article discusses the use of a low power 32-bit microcontroller, such as the RX100, in a real life application, in this case a flow meter. This application is useful for exploring and explaining various ultra-low power system design techniques. This app appropriately highlights fuel efficient techniques and/or design choices and explains how to best apply key features of the RX100. The performance data is used to calculate the average current use of the design in the example and to show the duration of the battery life.

 

Flow meter design

 

Modern flow meters (electric meters, water meters, gas...) are evolving from simple manual readers of mechanical units, to electronic versions based on microcontrollers with wireless connectivity. More advanced designs offer the flexibility of monitoring and data communications, allowing control of the system by the companies that provide the service. These advanced functionalities must be able to be implemented even though the meter is running. Therefore, electronics must consume on average minuscule amounts of power. The rule is to use batteries, as AC power is rarely available to run the meter. Typical design specifications call for a total battery life of more than 20 years.

The primary low power consumption requirements of an electronic flow meter can be grouped according to the main functions that the unit performs. Most of the time, the microcontroller operates in the lowest power modes, with only the Real-Time Clock (RTC) and Low Voltage Detector (LVD) active. Also, it is generally recommended that SRAM be kept active so that it can store intermediate processing results, eliminating the need to continually write data to flash memory. Periodically the meter wakes up and makes a flow measurement. Key parameters (used for billing) are held in non-volatile memory so they will not be lost if power is lost. The communications with the central control system will be carried out by means of a serial transceiver, whenever the data must be collected or updated. In addition, battery voltage levels are checked regularly to manage the MCU's modes of operation.

The following analysis is of a typical flow meter design that analyzes in detail the key aspects of its operation to obtain essential information in estimating battery life. For this example, the data comes from an implementation based on an RX111 chip (see Figure 2).

The RX111 processor, memory and peripheral devices integrate most of the functions of a flow meter. The main peripherals used are: the analog-to-digital converter (ADC) that measures the output of the flow sensor, an SPI port that connects to the central controller that collects data from various meters, and another SPI port that controls the LCD screen that displays the data flow and system status. In addition, the MCU's RTC accurately keeps track of when each measurement is made, and the Low Voltage Detector (LVD) continuously monitors the meter's battery voltage.

 

Functional description

 

In order to estimate the power usage and battery life of the flow meter, it is necessary to identify key factors: the main functions that the meter MCU has to perform, which modules are used in performing the tasks, how often the functions are performed, how long it takes to execute those functions, and the current the MCU uses to handle those tasks. Some of the MCU peripherals, such as the RTC and LVD, operate continuously, while others, such as the ADC or SPI ports, are needed only for short periods of time. The details of the flow meter example functions are described below:

Battery Monitor: This function checks the battery voltage level, providing information that is included in the operating status data sent periodically to the central control system. The battery monitor can also perform a tamper detection task, to determine if the meter has been hacked.

The voltage measured on the battery (and its variation in time) is used to adjust the operating frequency of various meter functions, because by prolonging the time between operations, as the battery level drops with them, the useful life of the battery can be extended. When the battery voltage drops too low, the monitor can initiate a 'going off air' signal which results in vital use of the data stream to be stored in flash memory for later recovery and diagnostics. This operation is rarely necessary, so it is not usually included in the calculation of the battery life time. (System engineers are encouraged to set the low level alert high enough to ensure that there is enough battery power left for the MCU to perform any data collection 'last try' tasks and of security.)

Flow Monitor: The ADC reads the sensor output to accurately measure flow rate. The data you provide must be further processed to determine the actual billable measures. The required calculations fit well into the processing power that the RX111s have.

Send Updates: This function communicates key data (flow, battery level, quality of service, etc) to the central control system. The time between sending and receiving transmissions can be extended when the battery runs out, in order to save battery power.

Receive Updates: The flow meter receives the function and is activated according to the needs of the central control. When the meter receives a data update, the MCU must be able to quickly perform important maintenance functions before executing the update. A basic functions table, such as the one shown in Table 3, is a convenient way to organize these basic functions. It shows the active peripherals associated with each measurement function, the frequency with which the job is performed, and the time it takes the MCU to execute each function.

The data in Table 3 are the estimated values ​​for the required MCU processing time for each function, rather than the measured values, because the functions have not currently been implemented. Still, they are “conservative best guesses” based on similar functions in other designed applications and are valid for the power usage calculations in this example.

 

Low Power Design Techniques and Deployment Options

 

There are typically several application options in designing a low power MCU based system. One of the common software options is to put the system into power off mode, and then power it back on after a specified amount of time has elapsed. This option is called periodic wake-up.

Applying the periodic wake-up approach to a flow meter design example, the following operating hours were specified: The software wakes up the CPU every second. The MCU has to execute the delivery update function at every 10-minute interval, perform the battery monitoring task at every 1-minute interval, and activate the flow monitor function at every 1-second interval.

The function of receiving updates is, however, different. It is an exception in the operation of the program, since it runs asynchronously to the MCU time base whenever the central control system requests it. For the purposes of this application example, the worst case is that the update reception function is performed approximately once every 10 minutes. Therefore, for meter consumption current calculations, receiving update is considered to be a regular function with an interval of 10 minutes. Here we can find more details about the main meter tasks that the microcontroller performs:

Trigger Generation: Because the real-time clock runs continuously in this meter design, it offers a convenient, energy-efficient, low-power method of 1-second trigger signal generation. The 128 Hz clock that feeds the RTC comes from the Sub-clock (xcin) 32.768 kHz input. The RTC counters produce precise time signals (year, month, week, day, hour, minute and second) for a maximum of 99 years, making automatic corrections in leap years. The MCU alarm mode (ALM) can generate an interrupt per year, month, date, weekday, hour, minute, or second.

Another interrupt source, the periodic interrupt (PRD), is convenient for starting shorter periods of time, since it can generate an interrupt every 2 seconds, 1 second, 1/2 second, 1/4 second, 1/8 of second, 1/16 second, 1/32 second, 1/64 or 1/256 second. The 1 second PRD interrupt is used in the flow meter design example to measure run time.

Flow Monitor: Once per second, the microcontroller's ADC converts the output of the external flow sensor to produce digital data. The ADC converter is turned on by software before each measurement. This keeps the current draw low, as the converter adds 0.66mA to the current draw when the MCU is running at 32MHz. At that clock speed, the ADC has to be enabled for 3µs to make a measurement: 1µs to enable the ADC, 1µs to perform the conversion, and a 1µs delay before the converter is disabled. At 32 MHz, the RX111's wake-up time to active mode is 40µs. This time you have to add 15µs that the CPU takes to process the ADC stream data.

Battery Level Measurement: The Low Voltage Detector (LVD) on the RX100 has two independent voltage detection circuits. The LVD1 circuit measures the battery voltage (VCC). He can compare this voltage to ten different voltage “steps”, ranging from 1.86V to 3.1V. In contrast, the LVD2 circuit can compare an external voltage source with four different voltage “steps”, ranging from 1,8V to 2,9V. In this flowmeter design, VCC is checked every minute to monitor its condition by LVD1 module for more accurate measurement. An interrupt is generated when the level begins to approach the RX111's specified lower voltage limit of 2.7V at 32MHz of operation. The MCU stores the measured battery voltage and, if necessary, sends an alert to the utility company's central control system during the next update send operation. The battery measurement function can operate at 1 MHz, so its associated wake-up time is only 4.8µs. Its processing time (at 1 MHz) is estimated to be approximately 35µs. Therefore, the total active time for this function is approximately 40µs.

Send Updates – Every 10 minutes, the send updates command uses the SPI peripheral to transmit data to the central control system. To calculate the energy used per designed meter, a good assumption is that about 1000µs are required to process and transfer the data. Receive Updates: Every 10 minutes, the receive update command uses the SPI peripheral to receive data from the central control system. It is assumed that 2000µs are needed to wake up, receive and process the data.

 

Average calculation of current consumption of the MCU

 

Table 4 – Shows the run time and current draw for each of the flow meter functions. 0.6mA current draw (high speed run mode, Table 3) is used here because the RX111's CPU is active and some peripherals may also be active. When the ADC is active, 0.66mA is added to the current draw. To determine the meter's battery life, the individual average current for each function is calculated by multiplying the Current Draw by the Percent On Cycle. The results are shown in the right hand column in Table 5. The sum of these contributions is the total average MCU current (ICC): 1.46µA. 

Major contributors to the meter's average current draw are the software standby mode, 0.79µA, which is about 54% of the total 1.46µA, while the flow monitor function draws 0.62µA, about 42 % of the total. In applications like this, which have relatively long periods of inactivity, the current drawn in software standby and run mode generally contributes most of the average current to the MCU. Therefore, it is important that the MCU used in the design has excellent low power characteristics in both modes. 

 

Battery Life Calculation

 

For the example application, it is assumed that the meter's battery has a capacity of 300mAh and provides approximately 3V for most of its life. Taking this information into account, the battery life is calculated by dividing the battery capacity by the average current of the MCU as follows: 300.000 µAh/1.46µA = 206243 hours, or 23,5 years. The calculation reveals that the battery life time of the RX111 based flow meter exceeds the specified requirement of 20 years. This result clearly demonstrates the system design advantages gained by applying the exceptional low-power features of an RX100.

The previous calculations of the useful life of the battery, focus on the current contributed by the microcontroller. For clarity, the current drawn from external components and self-discharge characteristics are not considered in this example. 

Various design techniques are useful for applications where external devices must be considered; however, they are beyond the scope of this article.

The RX100's advanced low power features make it excellent for flow meter solutions and other similar applications that require battery operation. Of the most useful features of the device, we find some such as the following:

 

• Consumption efficiency in active mode (Run mode).

• Very low power consumption while waiting for software (Software Standby).

• Fast wake up time from Sofware standby mode.

• Low current consumption for the RTC and LVD.

• Power efficient processing at lower clock frequencies. 

 

The modes of operation at low frequencies in the RX100 allow extending the life of the batteries, if the routines of the main application have a fixed execution time, that is, one that is not determined exclusively by the performance of the CPU.

Renesas RX100 series microcontrollers offer exceptional performance along with advanced power savings to better address the design requirements of applications that have limited power requirements. These impressive 32-bit devices give system engineers exciting opportunities to produce new products that extend battery life to limits that were previously impossible. The described current consumption reduction techniques facilitate the design of environmentally friendly products and banish the idea of ​​frequently replacing batteries or recharging them.


Tags
mcu