Using hardware to save energy in MCU-based sensing applications

Rasmus Christian Larsen, Energy Micro

November 2, 2011

Rasmus Christian Larsen, Energy Micro

Moving the sensing circuitry into hardware can greatly reduce the energy consumption of the system (Figure 3, below). However, the hardware components needed to perform inductive sensing are subtly different to those needed for capacitive sensing.


Figure 3: The MCU’s LESENSE hardware block monitors the capacitive sensor and not until the counter is below the comparator trigger level does the CPU wake up. As a result CPU can spend more time in deep sleep mode.

Many of the same features are present, such as the analog comparator to monitor the sensor voltage output and timers and counters to define a measurement period and proximity detection. But the inductive sensor requires an additional DAC to provide a voltage level that the sensor can oscillate around and requires that the individual components be wired in a different way. If an MCU needs to be designed to support both forms of sensor, it will increase system cost.

The commonality between the two types of sensor interface can be exploited by careful design of a hardware subsystem: the key is recognizing that the primary changes lie in how the individual hardware components such as analog comparators, DACs, counters and timers are connected to each other and the way in which MCU sensing algorithms are composed.

The algorithms are primarily state based and move between states based on certain properties being true: such as the count value being less than a certain value after timer expiry or the analog comparator input being below a certain threshold before the timer expires.

These conditions can be monitored and controlled by a state machine, which, if made programmable, can be configured to handle a wide range of sensor-processing functions without waking the processor core. This was the approach that was taken in implementing a proprietary peripheral block developed by Energy Micro engineers (Figure 4, below).

Figure 4: Very important for energy efficient operation are the new autonomous MCU functions blocks. The LESENSE low energy sensor interface can be configured to support monitoring of virtually any type of analog sensor without the need for CPU intervention. (To view larger image, click here)

A problem with many programmable state machines is that they can only act on and trigger a fixed set of outputs when they move from state to state. In this specialized peripheral block, states and the conditions used to select them are programmed through descriptors that can be chained together to form relatively complex operations where needed, or restricted to simple outputs if that is all that is required. In this way, it is possible to build quite complex logic before intervention need be sought from the processor core.

By adding a configurable decoder to the peripheral, it becomes possible to extend the reach of the state machine to process inputs from multiple sensors For example, quadrature decoding is common in flow-rate metering and other rotational sensing applications that employ inductive techniques.

With quadrature decoding, the sensors repeatedly pass through a set of states that correspond to the position of the sensors. The decoder makes it possible to choose a set of sensors in turn for analysis without involving the processor core. As a result, the MCU only needs to be woken up once a positive reading has been taken by one of the quadrature positions and a recording taken.

By looking at the combination of hardware and software that can be implemented in an MCU-based system as a whole – and by moving functions between them – it is possible to ensure that the full flexibility of software is only called upon when necessary. By calling upon software to process sensor inputs when there are inputs to process, overall energy consumption is kept to the bare minimum.

Rasmus Christian Larsen heads Energy Micro's technical support team and is responsible for training customers and sales force. As one of the designers of Energy Micro’s first microcontroller series, the EFM32 Gecko, Rasmus has in-depth knowledge of the complete EFM32 product family. He has previously worked as a digital design engineer for Atmel AVR and has a Masters degree in electronics from The Norwegian University of Science and Technology (NTNU) in Trondheim, Norway.

< Previous
Page 4 of 4
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER