Using hardware to save energy in MCU-based sensing applications

Rasmus Christian Larsen, Energy Micro

November 2, 2011

Rasmus Christian Larsen, Energy Micro

Since the introduction of the Apple iPhone, consumer device makers have recognized the advantages of incorporating capacitive touch into their products to provide more responsive and intuitive user interfaces. These sensors are generally lower-cost devices and call for a degree of processing on the MCU that can be difficult to realize where ultra-low power consumption is essential.

Capacitance describes how the space between two conductors affects an electric field between them. If two metal plates are placed with a gap between them and a voltage is applied to one of the plates, an electric field will exist between the plates. This electric field is the result of the difference between electric charges that are stored on the surfaces of the plates. The amount of charge determines how much current must be used to change the voltage on the plate.

When using a capacitive sensor in a user interface device, the sensing surface of the probe is the electrified plate and the user’s finger or stylus is the other plate. The driver electronics will continually change the voltage on the sensing surface.

This is called the excitation voltage. The amount of current required to change the voltage is measured by the circuit and indicates the amount of capacitance between the probe and the target. Conversely, a fixed amount of current can be pumped in and out of the probe and the resulting voltage change can be measured.

In a typical implementation, the sensor circuit includes a free-running RC oscillator. This generates a changing excitation voltage at a nominally constant frequency. When the user’s finger approaches the sensor, the overall frequency of the circuit will change because the capacitance within the sensor element increases. The MCU detects this change in frequency using a counter – if the counter value after a fixed period of time drops significantly from the nominal value the algorithm will register that as a touch event.

The measurement algorithm therefore demands two main components: a timer and a counter. The timer is first programmed by the MCU to count down from a fixed value. When the timer reaches zero, it generates an interrupt to the MCU. During this time, the MCU counter increments on every positive swing of the oscillator. When the MCU receives the timer-at-zero interrupt, it can simply look at the counter value to determine whether a touch event has occurred.

The problem with this implementation is that the processor core needs to be active during the sensor reading process in order to respond to the interrupts and manage the counter. During this time, the MCU may have little other work to do so may simply run in an idle loop while it is awake. One way to reduce power consumption is to only wake up periodically in order to sample the touchpad.

However, in a user-interface application, the sensing subsystem (Figure 2, below) has no idea when the next contact will be made by the user. Although the host microcontroller could sleep periodically, longer sleep periods will negatively affect responsiveness. In turn, this will make the system harder to use as some touches may not be registered correctly until the system has fully woken up and put itself into a state that allows it to take accurate measurements.

Figure 2: As most events occur asynchronously, embedded systems should be able to react only when thresholds are reached and without the need to waste energy by periodically polling sensors.

It would be more energy efficient to perform these operations in hardware and only wake the MCU once a touch event has been registered. This is because dedicated hardware does not incur a large amount of overhead. A processor spends most of its energy supplying instructions and data to the execution units rather than performing the computations themselves.

Researchers working on the Stanford University ELM low-power processor project concluded that instruction supply alone was responsible for 42 per cent of total processor power consumption. You also have to take into account the energy demand of moving variable contents from data memory to registers and on into the processing data path and back out again. This data movement, which generally involves higher-capacitance – and therefore higher energy – bus connections, is not needed in hardware implementations.

< Previous
Page 2 of 4
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER