citive sensing is all about measuring capacitance, or the change in capacitance, between two or more electrodes. It is frequently employed to detect proximity or position but can measure humidity, fluid level and acceleration. Applications, in markets ranging from industrial, automotive and medical through to consumer, continue to expand as more and more electronic products adopt touchpads and touchscreens for the vital human machine interface (HMI).
Position and displacement can be measured as the change in capacitance between two electrodes, which varies in inverse proportion to their separation (Figure 1). Specialist capacitive sensors can provide high precision measurements with nanometer or better resolution in high-end instrumentation or control systems but less demanding applications, using simpler electrodes and control circuits can be used in applications where such precise measurements are not required or even for simple go/no-go proximity detection.
Figure 1: Measurement principle for position and displacement sensors
Acceleration is a variation on displacement sensing where a damped mass on a spring is displaced when it experiences acceleration. This principle is used in the MEMS accelerometers found in automotive airbags and devices such as mobile phones, games controllers and image-stabilised cameras.
Fluid level sensing may be used when measuring discrete (e.g. full or empty) or continuous levels. Applications range from domestic coffee machines through to uses in the chemical, pharmaceutical and food processing industries. Unlike position/displacement sensing, the principle at work here is the change in capacitance due to the difference in permittivity of the fluid, K, and free space, C0 (Figure 2). Humidity sensing exploits the effect of humidity on the dielectric constant of materials, like polymers.
Figure 2: Fluid level measurement with capacitive sensing
Capacitive touch sensing can be implemented with any number of conductive materials. For a simple switch this could be a copper pad on a printed circuit board. But a touchscreen display needs a transparent conductive material like indium tin oxide (ITO) that can be overlaid on the screen and patterned to provide the required electrode configurations, such as an X-Y grid.
Two techniques are employed to determine the point of touch on a touchscreen: The simpler ‘surface capacitance’ type applies a voltage to a conductive layer on the inside of the glass screen to create an electrostatic field. The self-capacitance induced by a finger touching the external surface can then be measured at each corner of the screen and used to calculate the finger’’s position.
A ‘projected capacitance’ touchscreen is where the conductive layer is etched to provide a grid pattern of electrodes. The use of perpendicular sets of parallel lines on two layers allows the mutual capacitance at the intersection of each row and column to be measured to determine the touch point. This provides a higher resolution solution and enables multi-touch operations including pinch and drag gestures.
Because there is no direct contact with the sensor, this type of touchscreen technology can be used at lower resolution for proximity sensing and can be designed to be impervious to the effects of surface water or other contaminants and even made to work with gloved hands.
Whatever the application, a capacitive sensor is an input device and therefore the system it is part of has to be capable of detecting and responding to that input in an appropriate and timely manner. This is especially true following a period of inactivity when the system may need to wake from a sleep mode. Since the whole point of a sleep mode is to conserve energy, especially for battery-powered equipment, it is vital that the process of monitoring inputs does not increase current consumption. This is where the Low Energy Sensor Interface (LESENSE) incorporated into Energy Micro’’s EFM32 microcontrollers really wins out without compromising the processing performance delivered by its 32-bit CPU core.
Challenging Conventional Wisdom
For low energy applications, 8- or 16-bit MCUs may appear to offer lower active power consumption. But energy is ‘dependent on power and time,’ and powerful 32-bit cores, like the ARM Cortex-M3, can typically complete a task in a quarter the time of older 16-bit devices. This is particularly true if the designer opts for an MCU (such as the Tiny Gecko) that only consumes 150μA/MHz.
Figure 3: Generic MCUs can waste energy when waking up to monitor sensor inputs
Generic MCUs need to wake periodically to detect an external event (Figure 3) but modern MCUs with multiple sleep modes may take too long to wake from the lowest power mode. Also during the wake-up period energy is being used but no useful work is being done and the device may be consuming more power than it would in a higher activity state.
A sensor interface that can operate independently of the MCU offers a huge advantage especially when it can be configured to work with other peripherals so that the MCU only needs to wake up when a particular set of conditions are met. Energy Micro’’s EFM32 Gecko MCU achieves this through the combination of its Low Energy Sensor Interface (LESENSE) and Peripheral Reflex System (Figure 4).
Figure 4: LESENSE reduces energy consumption with various wake up conditions
The LESENSE interface comprises analog comparators, a DAC and a sequencer, running at 32kHz, that controls which pins are connected to the comparators and whether the DAC is used to provide a more accurate comparator reference. Comparator outputs can be counted and combined so that the CPU is only woken from its sub-μA deep sleep mode once a predetermined set of conditions has occurred. And, since the sensor results from LESENSE are available to the Peripheral Reflex System (PRS) it is then possible for the designer to create even more complex state-machine structures for monitoring external events without CPU intervention.
LESENSE With Capacitive Sensors
It is evident from the capacitive sensing applications considered above that measuring a change in capacitance is usually more important than being able to obtain an absolute measurement. This can be achieved by simply connecting the touch pad to the sense pin so that its capacitance forms part of an RC-oscillator circuit and hence determines the oscillation frequency. This signal is then converted to a stream of pulses by an analog comparator, allowing the LESENSE interface to increment a counter on each rising edge and transfer the result to a buffer after a preset time. The increased capacitance of a finger touching the sensor produces a lower frequency and hence a lower count and only when the count is below a defined threshold does the LESENSE interface need to wake up the MCU (Figure 5).
Figure 5: Example of capacitive sensing with a simple touch switch
While it is important to minimise power consumption while waiting for an input from a capacitive sensor, reducing the sampling rate will result in a slower response. However, because the LESENSE interface operates independently of the MCU, a higher sampling frequency can be maintained to ensure user responsiveness without compromising overall system performance or energy consumption.
Energy Micro’’s Low Energy Sensor Interface (LESENSE) addresses capacitive sensing applications by enabling its EFM32 series devices to monitor sensor inputs while leaving the MCU in a deep sleep mode. By utilising the device’’s low-energy peripherals along with its sequencer and decoder circuits LESENSE can evaluate a combination of conditions before waking the MCU. Designers can really take advantage of these features to maximise system performance while keeping energy consumption to the absolute minimum.
Anders Guldahl as an Application Engineer (AE) at Energy Micro supporting customers, developing energy-friendly code examples, and writing application notes. Anders also worked in Energy Micro's Simplicity team, designing development kits for the EFM32 Gecko microcontrollers, LESENSE peripherals, and capacitive touch. Anders holds a Master's Degree in control systems engineering from The Norwegian University of Science and Technology (NTNU) in Trondheim, Norway.