Touch sensors can replace mechanical switches, but first you must understand noise, materials, and software.
By Jon Titus, Senior Technical Editor
Many product designers have thought, "My product uses four push buttons, a rotary switch, and 7-segment displays. How do I take the first step with touch-control replacements?" Semiconductor manufacturers now supply a wide range of touch-control ICs--from stand-alone devices through high-end microcontrollers--that can do the job. They also give engineers many design tools such as royalty-free software libraries and code examples, and they sell many types of evaluation and development kits. These manufacturers have used their own tools to create the kits, sensors, and firmware. So when you must replace electromechanical controls with touch controls, IC vendors can get you close to the finish line.
But winning the race comes at the cost of careful design strategies that require engineers to think about touch controls when a project starts, not as the project wraps up. I divide the main challenges engineers face into three broad categories: noise, mechanics and materials, and software. The information in this column concentrates on low-resolution button-, slider-, and wheel-type controls, not multi-touch or high-resolution touch-screen controls.
"Engineers must understand that touch sensors are analog and not digital devices," said Yann LeFaou, mTouch marketing manager at Microchip Technology. "That's the biggest pitfall, because engineers sometimes try to replace on-off mechanical switches with touch controls without giving ambient noise a second thought."
"On a circuit board you have a thin copper trace that leads to a finger-sized conductor," said Steve Gerber, director of human-interface products at Silicon Laboratories. "Interference could couple into the touch circuits through the back of the sensor or via that thin trace. So you must understand how to route the traces to reduce their coupling with interference sources. You can surround a trace for a finger-sized touch sensor with grounded traces. Normally we recommend a cross-hatch ground pattern that helps reduce the amount of capacitance that surrounds the sensor. You aim to shield the sensor from noise yet not increase its capacitance so much that the sensor IC can't detect a finger."
"In our ICs that include a capacitive-to-digital converter (CDC) for touch sensors, engineers can run a parallel trace along the sensor-signal line," said Gerber. "Then the chip performs a capacitance measurement on the parallel trace that ends just before the sensor pad. That capacitance value provides a baseline we can subtract from the capacitance measurement from the actual sensor to get a better reading."
"The CDC can make a capacitance measurement in 40 microseconds," said Gerber. "We multiplex sensor inputs to the CDC that includes two digital-to-analog converters with current outputs. One DAC pumps current into the sensor and the other pumps current into an internal reference capacitor. The sensor IC does this 16 times and we end up with a successive approximation of the external capacitor value based upon the known internal capacitance value, and of course the known currents. The CDC also includes an accumulator that sums as many as 64 values from a single sensor, so by averaging values, we help eliminate interference."
"At Cypress Semiconductor, we have two core sensing methods, CapSense Successive-Approximation (CSA) and CapSense Sigma-Delta (CSD) for our CapSense controllers," said Dirk Franklin, business unit director at Cypress. "Noise immunity, the ability to have robust sensing performance -- and no false triggers -- in noisy environments is critical. The sizes of devices and components continue to get smaller, so you must understand effects switch-mode power supplies, LCD drivers and RF transceivers. If you haven't done your design homework properly these noise sources can cause problems for the touch-sensing user interface."
Mechanics and Materials
"You must involve mechanical and production engineers in product-design decisions right away," noted LeFaou of Microchip. "You need to know as soon as possible the type of plastic you can use on top of the touch controls, whether you need a curved panel, and if the touch panel requires an air gap between some layers. Getting the mechanical design nailed down early makes everyone's life easier."
"Many customers choose to employ a touch-sensing interface because it gives them a fully sealed design," explained Rishi Vasuki, product marketing manager at Microchip. They don't want to punch holes in an enclosure and use electromechanical controls that need rubber seals or boots to protect them."
In some cases, engineers find it takes longer than expected to tune a touch-sensor system to ensure adequate performance. Things work well in their prototype but when they go into production, things have changed slightly. Perhaps stray capacitances have changed, a different PCB material has altered electronic characteristics, or the thickness of the overlay material has changed. Touch-sensor ICs and MCU software algorithms can overcome these changes, but engineers should understand they might see different materials used during R&D, design, and manufacturing processes.
"In one case, a manufacturer used a painted overlay on its capacitive touch user interface," said Cypress' Franklin. "When they went offshore for manufacturing they experienced some unexpected sensor failures. The paint used in production contained metallic particles that detuned the sensors. If the company had implemented our SmartSense auto tuning, the change in paint characteristics, which affected overall sensor capacitance, would have been accounted for, or retuned, automatically."
"Suppose you build a consumer product several factories around the world," said Franklin. "And you use local suppliers in Eastern Europe, Mexico, and China, for example. They all produce PCB and overlays for the same end product but all will have minor variations in materials and tolerances, so your sensor-tuning process must take into account those differences." Cypress’ SmartSense Auto-tuning eliminates the need to production retune based on the supply chain.
"You have two main ways to create touch-sensor electrodes; first you can draw your keypad with PCB layout software," said Eduardo Viramontes, an applications engineer in Freescale's Microcontroller Solutions Group. "Second, you can use a capacitive film that typically has three or four layers, one of which is a clear plastic with a known dielectric value. Then you have another layer with the touch sensors printed with a conductive ink. This type of sensor 'sandwich' also has another conductive layer -- a ground plane -- that helps protect the keys from electrical noise. We work with a third party, the Kee Group USA, that helps customers create capacitive-switch films. Because you can place flexible capacitive films on curved surfaces, they give you many product-design and human-interface options."
Some designers have had problems with capacitive-touch electronics because of their sensitivity to moisture and their inability to detect heavy gloves. "So we came up with the mTouch Metal over Cap technology," explained Microchip's LeFaou. "When you close the gap between two metal plates in a capacitor, the capacitance changes. A PCB with the sensor conductors has a thin spacer layer with a hole above each fixed sensor element. A thin piece of metal -- the second capacitor plate -- goes over the holes. Then when someone presses on a keypad, the metal pieces move closer together and the mTouch MCU detects the capacitance change and signals a pressed key. It's a bit more than a touch, but it requires only a small force to move the outer metal cover by about 10 microns."
This type of control can carry an embossed Braille legend and users can operate controls with heavy gloves or a stylus, even with moisture on the control surface. That means washing the surface or leaving moisture on it will not cause an MCU to detect a touched sensor. Nor will someone simply feeling or wiping the surface trigger an MCU action.
But, moisture might not have as big an effect as some think. "You can add a sensing region on a touch-sensor keypad just to detect whether you have water on the surface," said Parker Dorris, an application Engineer at Silicon Laboratories. "It could be just a guard ring that goes around the sensing region. If you see a change in capacitance across that guard you know you have something going on across the face of the keypad. But most often, designers rely on firmware that determines the characteristics of the change in capacitance and determines whether you have a finger, noise or moisture.
"A human is full of electromagnetic interference that we can sense with these capacitive-to-digital converters," noted Silicon Labs' Gerber. "When you put water on the surface it doesn't cause much noise because water's capacitance to ground is small and it doesn't absorb and transmit a great deal of electrical interference. So one of the ways to tell the difference between water and human touch is that, a human touch is inherently noisier and you can detect that higher noise level."
"Engineers might not realize the importance of software in touch-sensor controls," emphasized Freescale's Viramontes. "Software can determine whether a person has touched a control or if someone is wiping a cloth across the sensors. That's an issue with touch panels on industrial equipment or appliances that people clean regularly. And you might have high humidity and moisture on the surface. Good software can handle those conditions. Our Xtrinsic Touch Sensing Software (TSS) library includes algorithms that filter out wiping actions and moisture on touch sensors. The libraries work with our Touch Sensing Input hardware in the Kinetis MCU family and the TSS code gives the 8-bit S08 and 32-bit ColdFire V1 MCUs touch-sensor capabilities on general-purpose I/O pins."
"The MCUs that connect to touch sensors will have other tasks, too," stressed Vasuki of Microchip. "They might control an LCD, handle a USB interface, and operate a motor. When you try to integrate these functions you might find another designer plans to use internal peripherals assigned to touch sensors to measure temperatures or pressures and someone plans to use a USB port for streaming data. They each take processor time. As a project begins, designers might not think about sharing MCU resources. So in some cases, engineers might need a mini-scheduler or a small RTOS that lets software efficiently share peripherals and I/O devices."
"If designers create battery-powered products with touch sensors, they must figure out how to reduce power consumption," said Vasuki. "Mechanical switches draw no power and could wake up a low-power MCU. But in an analog touch-sensing design, the MCU must actively sense the analog inputs, so it can use more power. Several types of MCUs now lower power consumption and still perform touch sensing, which makes touch sensors more attractive in portable devices."
"We offer general-purpose, low-cost MCUs with the necessary peripherals to implement dedicated touch controllers, when someone needs to replace mechanical switches," noted Microchip's LeFaou. "But as the complexity of a design increases and designers have a complex application, they could choose to integrate touch controls into a high-end processor that will handle the application code. So there's a need for touch controls at both ends of the spectrum."
For further reading:
"Capacitive Sensing through Long Wires," AN529, Silicon Labs, 2010. http://www.silabs.com/Support Documents/TechnicalDocs/AN529.pdf.
CapSense SmartSense Basics," AN57316, Cypress Semiconductor. http://www.cypress.com/?rID=39252
"Four Button CapSense Design using CY8CMBR2044," AN59004, Cypress Semiconductor. http://www.cypress.com/?rID=45830
"Introduction to Capacitive Sensing," AN1101, Microchip Technology. http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en531112.
"Printed Circuit Design Notes for Capacitive Sensing with the CS0 Module," AN447, Silicon Labs, 2009.http://www.silabs.com/Support Documents/TechnicalDocs/AN447.pdf
"mTouchTM Metal Over Cap Technology," AN1325, Microchip Technology, 2010. http://ww1.microchip.com/downloads/en/AppNotes/01325A.pdf.
"Techniques for Robust Touch Sensing Design," AN1334, Microchip Technology. http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en549837.
Freescale Semiconductor Touch Sensors: http://www.freescale.com/webapp/sps/site/taxonomy.jsp?code=SNSPROXIMITY.
Guerra, Eduardo Viramontes, "Migration to Touch Sensing Software 2.0," AN4213, Freescale Semiconductor. http://cache.freescale.com/files/sensors/doc/app_note/AN4213.pdf.
Knirsch, Paulo, et al., "Touchsensing Software 2.0FTF Hands-on Session," Freescale Technology Forum, June 2010. http://cache.freescale.com/files/ftf_2010/Americas/FTF10_ENT_F0458.pdf.