White Paper: How to Minimize Energy Consumption in Capacitive Sensing Applications
Capacitive sensing is all about the ability to measure the capacitance, or more often the change in capacitance, between two or more electrodes. As a technique it is frequently employed to detect proximity or position but can also be used to measure humidity, fluid level and acceleration. Because capacitive sensing supports such a diverse range of applications, solutions are found in many different markets — from industrial, automotive and medical through to consumer. And as more and more electronic products are being designed with touchpads and touchscreens we are seeing an explosion in the use of capacitive sensing technology to provide the vital human machine interface (HMI).
Along with this dramatic uptake in the use of capacitive sensing, there is an increasing consciousness in the environmental aspects of product design. So while the use of capacitive sensing to replace mechanical switches may increase the reliability and hence the life expectancy of a product this benefit could be negated by the increased energy consumption of the electronic circuits needed to continually monitor the sensor inputs. This white paper looks at a number of capacitive sensing applications to understand how they operate and the benefits they offer over alternative solutions. It then goes on to consider how concerns regarding energy consumption can be mitigated using a microcontroller (MCU) that can remain in an ultra-low power, deep-sleep mode while still being able to detect and respond to sensor inputs quickly and reliably.
Capacitive sensing applications
Position and displacement sensing
Specialist capacitive sensors that can provide high precision position or displacement measurements with nanometer or better resolution are typically used in conjunction with sophisticated controllers in high-end instrumentation or control systems. These systems use one- or two-plate sensor configurations where the measurement range (between the ‘probe’ and ‘target’ electrodes) is determined by well-defined electrode geometries, often with guard rings for improved linearity. Systems are calibrated to achieve the required accuracy and employ various techniques to minimize the influence of environmental factors such as temperature and humidity. Similar accuracy is possible with laser interferometry but at a far higher cost.
In position and displacement sensing the measurement is dependent on the capacitance varying in inverse proportion to the separation between the two electrodes. This principle can of course be applied to less demanding applications using simpler electrode and control circuit design in applications where such precise measurements are not required, even to the point where it may be used for basic go/no-go proximity detection.
Figure 1: Measurement principle for position and displacement sensors
A variation on displacement sensing is used to measure acceleration. Conceptually, an accelerometer behaves as a damped mass on a spring so that when it experiences acceleration, the mass is displaced to the point where the spring is able to accelerate the mass at the same rate as the casing. The displacement is then measured to give the acceleration. This principle is used in the MEMS accelerometers found in automotive air-bags and increasingly in personal electronic devices such as mobile phones, games controllers and image-stabilized cameras.
Fluid level sensing
Fluid level sensing generally falls into one of two categories, either measuring discrete levels (e.g. full or empty) or continuous level sensing. 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 the difference in permittivity of the fluid, K, and free space, C0.
Figure 2: Fluid level measurement with capacitive sensing
Competing technologies are mechanical float and reed switch, ultrasonic echo sounding and conductive electrodes. All methods have advantages and disadvantages e.g. conductive electrodes can’t be used with flammable liquids and mechanical solutions often have a shorter operating life so may be less reliable.
Capacitive humidity sensors exploit the effect of humidity on the dielectric constant of certain materials e.g. polymers. When suitably calibrated, such sensors are accurate to within a couple of percent over a relative humidity (RH) range from 5% to 95%.
Touchscreens and trackpads
Used increasingly to replace mechanical buttons and sliders, touchscreens have become the human interface device (HID) of choice in mobile phones, tablet computers and similar products. Touchscreens are also starting to appear in kitchen appliances and cars where the widespread use of microcontrollers makes it easy and often more cost-effective to deploy touch controls with added benefits that include better ergonomics and increased reliability. These interface devices range in complexity from simple single-touch touchscreens to multipoint and trackpad implementations that recognize gestures like pinching and dragging involving two or more points of contact with the screen.
The sensor for a capacitive touch switch 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 the obvious requirement for a touchscreen display is a transparent conductive material that can be overlaid on the screen. Indium tin oxide (ITO) is a proven solution that provides 90% transparency (for a single layer) and can also be patterned to provide various electrode configurations including an X-Y grid.
Two techniques are employed to determine the point of touch on a touchscreen. The more basic ‘surface capacitance’ type of touchscreen uses a conductive layer on the inside of the glass that forms the top surface of the screen. An electrostatic field created by applying a voltage to this layer then allows the self-capacitance induced by a finger touching the external surface of the glass to be measured at each corner of the screen. Because of the sheet resistivity of the conducting layer the various capacitance measurements can then be used to determine the finger’s position.
The ‘projected capacitance’ type of touchscreen is where the conductive layer is etched to provide a grid pattern of electrodes. This can be either on one layer or as perpendicular sets of parallel lines on two layers. In the single layer case the self-capacitance created by touching the screen is measured separately for the rows and columns. But with the two-layer approach the mutual capacitance at the intersection of each row and column is measured. Projected capacitance touchscreens offer higher resolution with the use of a two-layer grid and mutual capacitance measurement enables multi-touch operations i.e. the ability to detect and track multiple fingers at the same time.
Because there is no direct contact with the sensor, this type of touchscreen technology can be used at lower resolution for proximity sensing by simply increasing the measurement sensitivity. In a similar way, touchscreens can be designed to be impervious to the effects of surface water or other contaminants and can be made to work with gloved hands.
Low energy versus application performance
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
In considering low energy applications a common assumption has been to use 8- or 16-bit MCUs because of their lower active power consumption. But this is a false logic since energy is ‘power times time’ and actually a more powerful 32-bit CPU core like the ARM Cortex-M3 can typically complete a given task in a quarter of the time of older 16-bit CPU cores. This is particularly true if the designer opts for an MCU such as Energy Micro’s Tiny Gecko that, even in active mode, only consumes 150µA/MHz.
The next common obstacle encountered when interfacing an MCU to external sensors is the need to periodically wake up the processor to detect an external event (see figure 3). Part of the problem here is that most modern MCUs have various low-power modes ranging from ‘standby’ to ‘sleep’ and even ‘deep sleep’, typically with an increasing overhead in the time taken to wake from the lowest power mode. One issue here is that in order to achieve a timely respond to an event it may not be possible to use the deepest sleep mode. Also during the wake-up period energy is being used but no useful work is being done. This problem is exacerbated if the device needs to wake too frequently to the point where it might be consuming more power than it would in a higher activity state.
Figure 3: Generic MCUs waste energy by waking up to monitor sensor inputs
The solution with LESENSE
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. This is what Energy Micro offers in the EFM32 Gecko series MCUs with its Low Energy Sensor Interface (LESENSE) combined with its Peripheral Reflex System (PRS) as illustrated in figure 4.
The LESENSE interface comprises analog comparators, a DAC and a sequencer module running at 32 kHz. The sequencer 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 once a predetermined set of conditions has occurred, for example two taps of a touch screen within a certain time window or perhaps the operation of a touch switch while some other condition is true. All this is possible while the MCU remains in a sub-µA deep sleep mode.
Figure 4: LESENSE reduces energy consumption with various wake up conditions
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. And, while other modern MCUs may include on-chip peripherals, Energy Micro’s Gecko architecture takes this approach a step further with its PRS solution.
Using 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 is often achieved by including the capacitance between the sense pin and ground as part of an RC-oscillator circuit such that the frequency of oscillation changes depending on the capacitance seen at the sense pin. So a touch switch can be implemented simply by connecting the sense pin directly to the touch pad area of the circuit board with no other external components required.
As can be seen in figure 5, the analog comparator converts the oscillating signal from the touch pad to a stream of pulses allowing the LESENSE interface to increment a counter on each rising edge. The counter is allowed to run for a preset time and then the counter value is transferred to a result buffer. The increased capacitance of a finger touching the sensor produces a lower frequency and hence a lower count. The resulting count is compared to a threshold value and when the count is below the threshold the LESENSE interface can proceed to wake up the MCU.
In most situations, capacitive sensors are only touched briefly so it is important to minimize power consumption while the device is waiting for an input. Typically this is achieved by reducing the rate at which the sensor is measured. Unfortunately the downside is a longer sampling interval resulting in a slower response time, which is clearly not user-friendly. Fortunately, because the LESENSE interface uses a minimum of resources and operates independently of the MCU, a higher sampling frequency can be maintained to ensure user responsiveness without compromising overall system performance and energy consumption.
Figure 5: Example of capacitive sensing with a simple touch switch
Current consumption considerations
A number of factors will influence the current consumption of capacitive sensing designs. Predominantly these relate to the sampling frequency and the thickness of the touch pad overlay. The sampling frequency has a direct bearing on current consumption; if the sampling frequency is doubled then the power consumption is doubled. The impact of overlay thickness on current consumption is less straightforward. While a thicker overlay does result in a higher current consumption, other considerations come into play.
With a thicker overlay the difference in capacitance between touch and no-touch is smaller. So to ensure the two frequencies are correctly identified the oscillator will need to run for a longer period. How much longer will depend on the touch pad’s size, its dielectric material and aspects of the PCB design. For example, the dynamic current consumption of an individual touch pad with a 5mm acrylic overlay might be 500nA so a 4 button application might have a total consumption of 3µA including the static MCU consumption (<1µA). To improve the user experience, the sampling speed could be increased to 10 Hz after the first touch event, taking the total consumption to 5µA.
Energy Micro’s Low Energy Sensor Interface (LESENSE) is ideally suited to capacitive sensing applications allowing its EFM32 series devices to monitor sensor inputs while leaving the MCU in a deep sleep mode. LESENSE operates with a low frequency clock and can monitor up to 16 sensors with an average current consumption of just 1.2µA. By utilizing the device’s low-energy peripherals along with its sequencer and decoder circuits LESENSE can detect and evaluate a combination of sensor states and event patterns before waking the MCU. Designers can really take advantage of these features to maximize system performance while keeping energy consumption to the absolute minimum.
This white paper was written by Anders Guldahl, Application Engineer at Energy Micro
P.O. Box 4633 Nydalen, N-0405 Oslo, Norway
Telephone: +47 23 00 98 00
Fax: +47 23 00 98 01
If you are familiar with RSS feeds, you can also sign up for our free blog feed. Our RSS feed is updated in real-time while our newsletter is updated daily.