Give away medical masks when you place an order. learn more
Capacitive touch technology is used in a broad range of electronic products from smartphones to refrigerators and automobiles. In many applications, the capacitive touch sensor provides input to a dedicated controller chip. MCUs become directly involved when the controller is integrated as a peripheral on the MCU die.
Regardless of whether the MCU has the sensor/controller circuit integrated on-chip or if the touch sensor information comes in a dedicated device, the MCU must handle a number of issues created by the capacitive touch inputs in order to achieve a satisfactory user experience. These include latency (timely response for the user), accuracy, and energy consumption. Energy consumption is particularly important in battery-powered devices.
MCU vendors are providing a wide variety of capacitive touch solutions ranging from specialized peripherals to ultra-low-power interfaces with the capacitive touch sensor for battery-powered applications. Before reviewing the solutions, however, a quick review of capacitive touch technology should be helpful.
Capacitive touch basics
Sensors in general present special design problems and capacitive touch sensors are no different. Much of the complexity is due to the fact that the distributed nature of sensor electric fields make “lumped element” approximation of their behavior inaccurate and misleading. To address these issues, semiconductor companies have published numerous application notes that basically provide rules that – if followed – will result in a successful design. This article will address basic considerations; knowing a few basics is essential to get a design started in the right direction.
Capacitive touch sensors can be broadly categorized using simple spatial parameters:
The technology is considerably more complex but, as always, the first important step in designing an end-user system is to choose a sensor type that corresponds to the application.
The most basic capacitive touch technology for one- and two-dimensional sensors depends on surface capacitance. One side of the panel is coated with a conductive material and the other side is insulating material. A small voltage is applied to the conductive layer to create a weak electric field. When a conductive finger or stylus touches the surface, a capacitor is momentarily created, which changes the electric field.
The sensor’s controller can calculate the location of the touch indirectly by measuring the change in capacitance from the four corners of the panel. The larger the change in capacitance, the closer the touch is to that corner. Surface capacitance technology has fairly low resolution and is subject to errors caused by capacitive coupling. For these reasons, it is typically used in industrial controls and kiosks.
Projected capacitive touch
Projected capacitive touch (PCT) technology is more accurate and flexible than using just surface capacitance. The conductive layer is etched in an X-Y grid. There are two types of PCT sensor technologies: self-capacitance and mutual capacitance.
In self-capacitance sensing, the rows and columns of the X-Y grid operate independently. Location is determined by the relative position of the capacitive load of a finger on each column or row. A strong signal is created but self-capacitance sensing cannot accurately resolve more than one finger, which can result in “ghosting,” or misplaced location sensing.
Mutual capacitive sensors have a capacitor at the intersection of each row and column. When a voltage is applied to the rows or columns, even bringing a finger or conductive stylus near the surface of the sensor changes the local electric field and reduces the mutual capacitance. The touch location can be determined very accurately by measuring the capacitance change at every individual point on the grid. Mutual capacitance supports multi-touch operation, which means that the position of multiple fingers can be accurately tracked at the same time.
PCT is a popular sensing option for point-of-sale devices that require the ability to record a signature. However, PCT performance can be negatively affected by conductive smudges on the panel surface. Dust that adheres to the panel can also be a problem.
MCU vendors have designed product families precisely to handle the types of sensors just discussed. Atmel, for example, developed sensor controller families for buttons, sliders, and wheels. The products are available as either IP integrated in one of Atmel's AVR or Atmel ARM MCU cores using the company’s QTouch Library or as application-specific devices. The Qtouch family is used for designs with self-capacitance sensors. Its QMatrix sensor controllers are used with mutual-capacitance sensors. Atmel makes evaluation boards available for both families.
Some configurations of Texas Instruments’ MSP430 Value Line G2xx2/3 MCUs are specifically designed for capacitive touch applications. These MCUs include capacitive touch-sense IOs that enable developers to interface directly with capacitive touchpads without external components. For more sophisticated applications, the company’s MSP430F51x2 devices, such as the MSP430F5152IDAR, include a high-performance timer that delivers 4 ns resolution, which enables high-precision touch sensing.
Numerous IC companies have product lines for capacitive touch. They include but are not limited to Atmel, Cypress Semiconductor, Freescale Semiconductor, Microchip Technology, NXP Semiconductors, Silicon Labs, and Texas Instruments.
Capacitive touch applications require designers to consider more than just the MCU. Power consumption is important in battery-powered designs, and the time that elapses (latency) between the moment the button is pressed and a reaction from the system is also critically important.
Other factors must also be considered in light of the application’s use case. These include ambient light sensitivity (screen glare), cost, durability, and minimum/maximum sizes. An exploration of all of these criteria is beyond the scope of this article, but a 2014 analysis by Minnesota State University published in the ASEE Proceedings (ASSE-NWMSC2014-1C1) included a table (Figure 1) that should be helpful for designers. Resistive touch technology was also included in the analysis because it is still in wide use although not generally as capable as capacitive touch. The technologies are ranked on a scale of 0 to 5 with 5 being “best” and 0 being “worst” performance. PCT has the best ratings overall but surface capacitive technology should be considered for cost-sensitive applications and products with larger screens.
|Features||Resistive (4-wire)||Surface Capacitive||Projected Capacitive|
|Ambient Light Sensitivity||5||5||5|
|Best Applicable Size||2" - 26"||12" - 26"||2" - 10"|
Figure 1: Comparative features of three popular touch technologies. (Courtesy of Minnesota State University)
When interfacing an MCU to external sensors, significant energy can essentially be wasted by the interaction – or lack of interaction – between the sensor and the MCU. Ironically, the problem comes about because most of today’s MCUs have multiple low-power operating modes ranging from “standby” to “deep sleep.” Each step deeper into lower-power operation is typically accompanied by more overhead in the time needed to wake up from the power mode.
When dealing with touch-sensor inputs, a primary objective is to achieve a timely response, but this may not be possible in the lower sleep modes. The problem is exacerbated if the MCU has to wake up so often to achieve a timely response that it actually starts consuming more power that it would in a higher activity state.
Silicon Labs' approach to energy conservation is its low-energy sensor interface (LESENSE), which has been designed to respond to sensor input while the MCU is still in deep-sleep mode. LESENSE is integrated into the company’s EFM32 series of 32-bit ARM-based MCUs. In battery-powered touch applications, the Tiny Gecko family often offers the best choice.
LESENSE circuits include 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 awakes only if a predetermined set of conditions has occurred, such as two taps of a touchscreen within a certain time window. All this is possible while the MCU remains in a deep-sleep mode.
LESENSE operates independently of the MCU because it is configured to work with other peripherals, specifically the company’s Peripheral Reflex System (PRS). This makes it possible for designers to create state-machine structures for monitoring external events without CPU intervention.
In capacitive sensing, it is almost always the case that measuring a change in capacitance is more important than making an absolute measurement. Designers typically monitor these changes by positioning the capacitance between the sense pin and ground pin as part of an RC-oscillator circuit. In this configuration, the frequency of oscillation depends on the capacitance present at the sense pin. As a result, a touch switch can be implemented simply by connecting the sense pin directly to the touch pad. No other external components are needed.
The simplicity of the state-machine operation is shown in Figure 2. The differences between the upper and lower parts of the figure are that the different analog inputs produce different results in the LESENSE state machine and that, in turn, leaves the MCU in sleep mode (upper) or wakes it (lower).
Figure 2: Capacitive sensing with a simple touch switch using LESENSE and PRS. (Courtesy of Silicon Labs)
Touch-sensitive input has become a mainstream technology in a wide spectrum of applications from simple buttons to smartphones and tablets. Capacitive touch has become the dominant technology because of its accuracy, durability and other performance features. In many applications, an MCU interfaces with the capacitive touch sensors, which often challenges designers to provide timely responses to the human interface and manage energy consumption efficiently. There is no one-size-fits-all solution in capacitive touch applications, but MCU vendors have provided a range of solutions and one is sure to fit any application.
For more information about the parts discussed in this article, use the links provided to access product information pages on the Hotenda website.