Give away medical masks when you place an order. learn more

Using MCUs to Save Power in LCD


The microcontroller (MCU) now acts as the core of many low-energy and portable systems, but the pressure is constantly there to extend battery life while implementing a wider range of functions. A good way to maintain long battery life is to only run the processor when absolutely necessary but this can make the system harder to use as that may mean powering down the user interface components such as displays. However, there is a growing number of MCUs that make it possible to selectively power down the processor while maintaining the LCD image.

For example, it is useful for a water meter to provide a display of its readings constantly on a built-in LCD. However, it can be wasteful of the meter’s battery to have to keep the MCU-based system active just in case the user will look at it sometime during the day. By making it possible to drive the LCD without direct intervention from the processor core, it is possible to selectively power down parts of the MCU while preserving the LCD’s stored image.


Figure 1: Many low-energy embedded systems now incorporate an LCD-based user interface. (Source: Energy Micro)

Broadly speaking, the power consumption of any active CMOS electronic circuit is given by the formula CV²f. In this formula, C is the total capacitance of the circuitry within the device that needs to be charged and discharged during a cycle. V is the power supply voltage and f is the frequency at which the device runs. As a result, one factor that leads to reductions in power consumption is the supply voltage – the quadratic relationship between voltage and energy provides dramatic savings.

Another saving comes from reducing the frequency of operation although this may only have an impact on power rather than energy. If it takes the same number of cycles to run an algorithm but they are spread over a longer period of time, overall energy consumption can increase. This is due to the leakage component¹.

The semiconductor processes used for low-energy MCUs tend to exhibit low leakage but there is a constant, albeit small flow of electrons from each transistor into the silicon substrate that will slowly drain the battery if not addressed. The leakage is approximately constant, although it tends to rise with operating temperature because of the increase of thermally generated carriers in the transistors. The only way to reduce leakage power beyond careful process design is to withdraw power from the logic block.

Power-aware design in MCUs therefore involves a careful tradeoff between circuit speed and voltage. However, there is a third factor: how often the MCU needs to be active within a given period of time. Very few MCU-based systems have work to do all the time. They will typically run a set of tasks periodically and then stop. To avoid wasting power, the MCU will not be allowed to simply cycle in an idle loop, it will simply go to sleep and power down most of the functional units.

Ideally, in metering and monitoring applications, battery life is maximized by maintaining a low duty cycle such that the processor within the system spends almost all of its time asleep. Typically, the MCU in a utility meter will sleep for most of its life. It may be awake for just 1 percent of the time, waking only to collect data from sensor inputs. The MCU will do its work and then, once completed for that cycle, program a timer to trigger a wakeup interrupt after a period of time or simply wait for other external stimuli to trigger an interrupt and then shut down. The ability to shut down almost all of the MCU’s units is vital. Because the device will be unused for 99 percent or more of its lifetime, even tiny amounts of leakage power will drain a disproportionate amount of the battery.

MCUs designed for these low duty-cycle environments provide a number of sleep modes that provide fine-tuned control over power consumption. For example, a ‘drowse’ mode may simply disable some of the peripherals but leave the core running at a very slow clock rate in an idle loop. This consumes more power than a ‘deep sleep’ in which the processor core and almost all peripherals are powered down, but generally results in a rapid response to interrupts.

In terms of power, the difference between deep sleep and drowsy modes can be orders of magnitude. A deep sleep may see an MCU drawing on the order of tens of nanoamps – just enough energy to keep a timer and interrupt controller running – whereas less intensive sleep modes can draw tens or hundreds of microamps, if not more. Clearly the choice of sleep mode has a dramatic impact on battery life.

The choice of sleep mode also has significant impact on the product design when it comes to the user interface. The liquid crystal display (LCD), if it is not backlit, does not consume much energy so does not necessarily need to be powered down. A constantly displayed reading is important for applications such as meters where the user may want to check a reading without having to ‘wake’ the system so that it can drive the LCD.

Many conventional MCUs will power down the LCD controller when the device is put into deep sleep, blanking the display. However, vendors have in recent years recognized the value of maintaining at least a static display and made it possible to keep an LCD running even when almost all of the rest of the MCU has been disabled. Some even make it possible to alter the display while the processor core is sleeping.

A number of Microchip Technology’s MCUs, including the PIC18F6x90, make it possible to drive the LCD controller separately from the processor core. To operate the LCD in sleep mode, the user simply has to select an oscillator source other than the main oscillator – which will be disabled during sleep – and clear a control bit that determines whether the LCD should be powered down or not². Depending on the MCU model, the LCD’s clock source can be the internal RC oscillator or the Timer1 clock, which is usually connected to an external 32 kHz crystal, which will often be used to control when the processor core next wakes up.

Similarly, the LCD controller on STMicroelectronics’ STM32L151 and L152 32-bit MCUs, among others, can operate in stop mode and has its own step-up voltage converter so that it can drive standard LCD modules from its own low-voltage supply.

The Texas Instruments MSP430’s RISC processor core was designed for low-energy applications, such as metering, where the range includes a number of devices with built-in LCD controllers that can maintain an image and even selectively blink parts of it while the main core is powered down.

One of the peripherals available on the Energy Micro EFM32 Gecko is a low-energy LCD controller that consumes 900 nA in a mode that not only maintains a display while the processor core is disabled but can update the display periodically without intervention.

The EFM32 has a hardware sequencer that can be used to control the LCD. For example, the 160-segment LCD controller can for instance be programmed to run custom animations on a set of LCD segments, without run-time control from the CPU. A frame counter interrupt lets the LCD controller wake up the processor core so that its frame buffer can be updated.

As many LCD displays cannot operate at voltages below 3 V, the LCD driver has an integrated voltage boost function. When the supply voltage drops below 3 V, the voltage booster can be enabled dynamically to boost the outputs to the LCD display up above 3 V. This allows operation even with a battery that is close to the end of its discharge cycle as the voltage will often drop below 3 volts towards the end of the battery’s lifetime.

As the pressure increases to reduce energy consumption in these systems, we can expect vendors to provide peripherals such as LCD controllers with greater autonomy, allowing them to be updated without calling on the processor core except for major changes. That will help maintain ever-lower duty cycles and power consumption.

Summary

This article has described how sleep modes are vital to the longevity of battery-based power supplies for MCUs and that maintaining a clear user interface is important even when the processor core is powered down. MCU products are available that make it possible to drive an LCD even from deep-sleep modes. They include products from Energy Micro, Microchip Technology, STMicroelectronics, and Texas Instruments. You can obtain more information by utilizing the links provided to pages on the Hotenda website.

References:

  1. Chadrakasan, A & Broderson, R “Minimizing Power Consumption in CMOS Circuits”, University of California at Berkeley CMOS course.
    http://bwrc.eecs.berkeley.edu/publications/1995/Min_pwr_consump_CMOS_crct/paper.fm.pdf
  2. Microchip LCD Tips ‘n’ Tricks.
    http://www.microchip.com/stellent/groups/picmicro_sg/documents/devicedoc/en023491.pdf
Supplier