by David Marsh, Contributing Technical Editor, EDN
While electronics engineers struggle to embed more functions into ever-shrinking size and power-consumption footprints, product designers wrestle with a bigger but similarly unchanging picture. Their perspective, which resonates from the board room to the consumer-product media, is that cutting-edge packaging and smart user interfaces ultimately sell products—sometimes despite the underlying hardware. In the automotive industry, similar presentation concerns dominate, even though the technologies are complex, and the value of the end product is high. For instance, Osram recently won the 2006 PACE (Premier Automotive Suppliers’ Contribution to Excellence, www.trcpg.com/pace.htm) innovation award for its color-on-demand LEDs, which offer car makers the opportunity to specify custom hues that differentiate their products from those of their competitors. Such simple stratagems sell. Meanwhile, back on the shop floor, it’s always been a high priority for automation vendors to offer user interfaces that are as simple yet as powerful as possible—not to mention utterly reliable.
These and countless other applications depend upon two primary elements: switches and displays. Although displays and enabling technologies, such as OLEDs (organic LEDs) attract massive attention, the lowly switch partner often receives scant recognition. But this technology moves on too, with a new generation of capacitive touch sensors providing compelling reasons for designers to reconsider their switch-panel choices. Traditionally difficult to design and unreliable in sensitivity and stability, today’s touch switches are often cheaper and more reliable than their electromechanical counterparts. Gone too are the days when choosing a touch switch or panel required custom manufacture, as a growing variety of capacitive-sensing ICs makes even one-off designs affordable. Crucially, such developments offer product designers the scope to differentiate their equipment and offer electronics engineers the benefit of owning their designs. So, how good are these new parts, and how easy are they to design with?
The product of Russian government-sponsored research into proximity sensors, the Theremin sensor, which Leonard Theremin invented in 1919, represents possibly the first commercial use of capacitive sensing. The device senses the proximity of a musician’s hands to a pair of antennas that modulate the frequency and amplitude of two heterodyning oscillators that form the heart of the world’s first electronic music synthesizer. Continuing this theme, in 1972, designer David Cockerell at Electronic Music Studios penned the KS keyboard as a sequencer for the company’s range of voltage controlled synthesizers (Reference 1). This intriguing device boasts a 30-note, touch-sensitive keyboard whose inputs rely on the TTL characteristics of two 74150 16-toone-line multiplexers. These devices scan the keyboard, taking their clock inputs from a 4-bit binary ripple counter. A network biases the inputs to the multiplexers to hold them close to their switching threshold, which a finger press then exceeds. At this time, the appropriate data-selector output goes low to latch the 4-bit code and the multiplexer’s identity to create a 5-bit address that represents key position.
SHUNT FIELD SENSES OBJECTS Surprisingly perhaps, today’s capacitive-sensor ICs from Analog Devices, Cypress Semiconductor, Freescale Semiconductor, and Quantum Research Group similarly demonstrate different approaches to sensing. These vendors also offer evaluation kits that make it easy to compare the ease of design and relative complexity and robustness of their technologies (see box “What’s in the box?” at the web version of this article at www.edn.com/060622cs). Here, “robustness” refers to the ability to reliably determine key-press information across a range of user profiles and environments. Any touch sensor has a background capacitance, a signal level, or both that is a product of its environment and a higher level above which threshold the sensor records a key press event. Accordingly, mobile devices present significant challenges. One minute, the mobile device may be in free space, and, the next minute, its user places it beside a PC, cellphone, or other electronic equipment that emits unpredictable frequency components at various field strengths (see box “Don’t try this at home!” also at the web version of this article at www.edn.com/060622cs). Electrostatic discharges are other potential sources of mistriggering, and water and other contaminants can cause similar problems. To overcome these and other issues, such as drift with temperature and time, touch sensor ICs often embed logic and analog subsystems that continually calibrate the system. By characterizing individual channels, such techniques can also accommodate keypads that have widely different user fingerprints and key profiles, improving both detection and the product designer’s options.
The issues are clear to see using the new AD7142 from Analog Devices as an example and apply in varying measure to any of the other chips that are available today. With a base price of $1.65 (1000), the AD7142 packs 14 capacitance-to-digital-conversion channels into a 32-pad, 5 5mm leadless CSP (chipscale package). A key feature of this d vice is its self-calibration capability, which is essential for its mobile-electronics target market. The sensor works by generating a 240kHz square-wave signal that drives one of each button’s electrodes to create an electric field that a partner electrode assesses. A switch matrix multiplexes the receiver electrodes’ signals to a 16-bit sigma-delta ADC that performs the capacitance-to-digital transformation. The presence of a finger or another conductor shunts the background capacitance of the appropriate button, causing the ADC’s output code to change; when this change exceeds a programmable threshold value, the sensor registers a key press (Figure 1).
RESULT REGISTER Each of the AD7142’s channels has its own result register that the host reads using an SPI or I2C interface. The chip can generate interrupts to signal exceeding a sensor’s threshold level, completing a conversion sequence, and detecting an event on the device’s general-purpose I/O pin. At the measurement level, each input channel has its own 2-bit field within a configuration register that determines how it connects to the CDC (capacitance-to-digital-converter) block. The options are: no connection, connect to the CDC’s positive or negative input, and connect to the bias rail that drives an external shield conductor. This facility provides the flexibility that’s necessary to support different sensor types. For instance, one button might connect to a single CDC input, or two buttons might connect differentially across both inputs. Either of these options requires a single stage of capacitance-to-digital conversion to resolve a single button press; pressing both buttons in the differential arrangement results in the recognition of neither. A slider requires the differential connection and two conversion stages, in which the first detects sensor activation—that is, the proximity of an object—and the second resolves its relative position. The chip’s sequencer supports as many as 12 stages of conversion per measurement sequence, and you can optimize performance by balancing the number of conversions and the decimation rate that the acquisition block applies. ADI recommends setting the time for a full conversion sequence to 35 to 40msec.
The proximity-detection function is important for holding off the chip’s internal recalibration routine, which runs after every conversion sequence to assess changes in background capacitance. Registers allow designers to adjust the calibration hold-off time for the chip’s full- and low-power operating modes, which helps guard against a user’s finger hovering over the key for an excessive time, disabling the calibration routine. The user’s finger depositing moisture on the panel can create this hovering effect, so forcing a recalibration helps the sensor to maintain optimal detection performance. The chip’s adaptive threshold-and-sensitivity algorithm continuously monitors each sensor’s output levels, automatically scaling the threshold levels to compensate for changes in sensor area due to factors such as different finger sizes.
TRADE OFF All capacitive sensors incur some trade-off among the amount of power a device uses to support its detection technique, the frequency of its key-press updates, and the overall power budget. The AD7142 offers full-power, lowpower, and device-shutdown operating modes. In full-power mode, all sections of the device are on, and it continuously converts and recalibrates at a constant rate. The low-power mode reduces conversion frequency to, for instance, once per 400msec until it detects a key press, whereupon it reverts to a 40msec sequence. (These timings are programmable.) Meanwhile, a proximity timer counts down, and—providing that no other key presses occur—the sensor returns to its 400msec cycle. For these timings, low-power mode reduces the chip’s full-power drain of around 1mA to an average level of approximately 50μA. The shutdown mode reduces quiescent-current drain to approximately 2μA.
Brad Stewart, a product specialist at Freescale, explains that the company’s MC33794 electric-field sensor accommodates as many as nine sensing and two reference electrodes to suit challenging automotive applications, such as seat sensors that require large-area, 3-D imaging to optimize air-bag deployment for differing occupants and seating positions. Available at a base price of $2.22 (1,000), the 54- pin SOIC device features an active shield driver to compensate for capacitive effects when using coaxial cables to connect to remote sensing plates. Critical internal nodes, such as the detection-signal level, are available from device pins for connection to the analog inputs of a microcontroller, which can then take measurements and apply corrections. An ISO-9141 physical layer interface eases connection to this 10.4kbps, UART-based bus that’s one of three legally mandated onboard diagnostic communications structures that North American vehicles must support.
The capacitance between the electrodes is proportional to the area of the electrodes and the dielectric constant of the separating material, and it is inversely proportional to the distance between them: C=(k OA)/d, where k is the material’s dielectric constant, O is the permittivity of free space, A is the area of the plates in square meters, and d is the distance between them in meters. Stewart notes that the relationship suits alternative sensing applications, such as open/closed door detection and imbalance compensation in spinning appliance drums: “Because interelectrode capacitance is inversely proportional to distance, our sensors are finding new markets in correcting wobble in dryers and other domestic appliances,” he says. He claims that designers tend to regard electrode design as something of a black art, whereas the reality is that it’s most often simple: “We recommend a 10 10mm area for a button on standard FR4” (Reference 2). Automatic ice makers and refrigerator-defrost systems are also potential applications, along with sensing liquid levels or even detecting spills around a stove’s burners (Figure 2).
APPLICATIONS Targeting use in consumer and general industrial applications, the new MC34940 dispenses with automotive-specific features to drive seven electrodes and a shield from its 24-pin wide-SOIC package. This arrangement allows the use of as many as 28 touchpad sensors. Freescale offers C-code drivers to implement functions such as sliders, adjacent-key suppression, and periodic recalibration, together with a project environment that runs under the CodeWarrior IDE (integrated development environment) to suit microcontrollers, including the company’s recently introduced S08 core-based portfolio. Using the 68HC908QY4 microcontroller to furnish its intelligence, the DEMO1985MC-34940E develop-ment tool includes embedded-code samples along with a PC-resident application that’s written in a pre-.Net version of VisualBasic, enabling programmers to modify this code to suit requirements. Available now, the kit costs $57.65; the price for the MC34940 is $2.12 (1,000).
Cypress adopts a different sensing technique with its CapSense products. Its CY8C21x34 and CY8C24x94 build on the company’s PSoC (programmable system-on-chip) mixed-signal microcontrollers to implement relaxation oscillators. In this arrangement, the capacitance between a sensor electrode and a ground electrode forms the timing element in a sawtooth generator. A constant-current source charges the capacitor until the voltage ramp reaches a threshold, whereupon a switch discharges the capacitor, and the cycle repeats (Figure 3). Because the capacitance and its charging current determine the oscillator’s frequency, the circuit senses the presence of the user’s finger by measuring the difference in frequency that the accompanying capacitance increase causes. Cypress publishes a range of application notes that covers the operational principles and describes suitable pad layouts for this type of sensor.
PACKAGE OPTIONS Available in four package options from 16-pin SOIC to 5 5mm MLF, the CY8C21x34 features 8 kbytes of flash, 512 bytes of RAM, and both I2C and SPI ports. The CY8C24x94 uses a 56-pin, 8 8-mm MLF to accommodate 16 kbytes of flash, 1 kbyte of RAM, an SPI, and a full-speed USB port. The base price for the devices spans $1.90 to $2.85 (1,000). Steven Berry, marketing manager for CapSense products at Cypress, observes that the company’s PSoC devices differ from conventional microcontrollers in offering various combinations of analog blocks to complement a configurable digital core: “The core is a state machine to which users can add function blocks, such as UARTs and timers, simply by setting registers,” he says. Similarly, the technology supports analog-function blocks that include continuous-time devices such as op amps, comparators, and resistor arrays, as well as switched-capacitor circuits that build filters, ADCs, and DACs. A floor planner tool within the PSoC Designer suite provides a method of visualizing the necessary connections: “PSoC Designer is a step up in abstraction that enables users to think in terms of connecting up modules on a pc board,” says Berry. Each module has a data sheet that describes electrical specifications and suggests design strategies. The development environment provides drivers and APIs (application-programming interfaces) that include register settings and function calls in C or assembly code. Crucially for many small systems, the embedded microcontroller can enable singlechip systems.
At the application level, Berry concurs that handheld devices present the greatest challenges due to their unpredictable environments. To compensate, an API allows designers to periodically run a correction algorithm that updates each electrode’s baseline level register. You can set both noise and detection thresholds, enabling continual software correction for systems that experience frequent environmental changes. You can also balance the device’s power consumption and detection sensitivity by adjusting the sensing algorithm to accommodate sensor patterns and material overlays. Berry notes that, although the constant-current source approach rejects voltage changes, the company is working on a patentable method for temperature compensation to maintain the current source’s accuracy. A forthcoming part will offer an onboard linear regulator and lower power consumption. Cypress is also exploring new techniques in silicon to reduce susceptibility to noise and other interference—such as ESD events—that firmware must currently accommdate.
CONQUERING WATER With touch sensors as its specialist market, British fablesschip designer Quantum Research Group distinguishes itself from broad-line device vendors by offering a wide range of ICs that employ charge-transfer technology. The company’s founder and managing director, Hal Philipp, explains that the human body presents about 100 to 300pF to ground in free space, with a finger contributing only a few picofarads. To meet the needs of applications such as domestic appliances—one of his company’s biggest markets— any capacitive-sensing technique must be able to resolve this level in the presence of water and other contaminants, such as the dirt and grease buildup that accompany stove-burner and similar applications.
CAPACITIVE-SENSING SCHEMES Referring readers to Larry Baxter’s classic text for the best available coverage of capacitive sensing schemes (Reference 3), Philipp explains that Quantum’s QT (charge-transfer) scheme relies on the conservation-of-charge principle: “Our QT sensor is essentially a microcontroller that’s programmed to charge a sense plate of unknown capacitance to a known potential. The sense plate can be anything conductive, from a pc-board pad to an area of optically clear indium-tin-oxide over a display screen.” By measuring the charge on this plate after one or more charge/transfer cycles, the chip determines the sense plate’s capacitance; objects such as a finger disturb the charge on the sense plate to allow detection. Philipp emphasizes that applying a low-impedance source to the sense electrode and then sampling a narrow-width pulse ensure reliable finger detection even in the presence of substantial moisture levels: “From an electrical admittance viewpoint, water films have a far greater disturbing effect at low frequencies due to the 2-D RC network formed by the film itself and its capacitance loading to the local environment,” he observes.
Quantum refines this model by switching VCC to the sense electrode using a spread spectrum, burst-mode technique. Randomizing the charge pulses and inserting long delays between bursts minimize EMC issues and further boost robustness. Individual pulses can be as short as 5% or less of the intraburst pulse spacing, which also lowers power consumption and cross-sensor interference: “Most noise sources [that affect capacitive sensors] are either monotonic or occupy narrow bandwidths,” Philipp says. The company’s sensors typically use sampling frequencies of approximately 100kHz, but some of its devices realize effective frequencies of 10MHz and more by using sample times on the order of 100nsec. The result is a sensor that can resolve objects through more than 50mm of glass or proportionally less through materials with lesser dielectric constants. For instance, conventional glass has a value of approximately 7.8, FR4 fiberglass is about 5.2, and most plastics are approximately 2.7 (Reference 4). In particular, the technology’s sensitivity suits replacing resistive touchscreens, in which the traditional requirement for two layers of resistive material compromises light transmission.
To safeguard against false triggering due to momentary unintentional touches, an object’s proximity, or ESD events, voting filters require the system to detect a number of successful samples before registering a touch. The signal-processing logic also implements adjacent-key suppression, an iterative technique that repeatedly measures each key’s signal strength. It determines the user’s true selection by identifying the area of greatest signal-level change. Providing that the selected key’s signal remains above a threshold level, the sensor then ignores adjacent keys.
DRIFT-COMPENSATION SCHEMES All of the company’s chips implement automatic drift compensation schemes, which Philipp asserts are sufficiently responsive to maintain detection performance in applications such as microwave-oven panels that can experience temperature slew rates of 1°C/sec or more. An algorithm periodically assesses each input’s baseline-signal level when no one is touching the sensor, adjusting the detection threshold to maintain constant sensitivity. Depending on the type of QT device, designers set the threshold level using reference capacitors or software: “Although the signal change that’s necessary to ensure reliable detection doesn’t change much over time, the baseline level changes quite significantly,” Philipp says.
A range of ICs suits single or multiple keys, matrix keyboards, touch sliders and wheels, touchscreens, and combinations of these styles. Demonstrating many features that are common throughout these products, the QT118H single-key sensor senses through as much as 100mm of glass and consumes approximately 12μA from a 3.3V supply. The chip includes multiplexing logic and a 14-bit-resolution, switched capacitor ADC that sequentially sources pulses and measures the sensor’s charge level, performing recalibrations on the fly. A single capacitor sets the device’s sensitivity. The charge-transfer sampling period is 2μsec, and pulse bursts vary from 0.5 to 7msec with around 95msec separation. Consensus logic requires four consecutive active samples to register a key press, which acts as a debounce filter. Accordingly, following an initial detection, the chip reduces interburst spacing to 20msec to yield an average response time of approximately 95msec. Two option pins configure the chip’s output pin as an activelow signal of 10- or 60-sec duration; as a 10-sec-long toggle-action output; or to generate a 75msec active-low pulse for every new detection. A three-state “heartbeat” pulse of about 350μsec superimposes all output types to signal that the sensor is working correctly. Widely available from catalog distributors, such as Digi-Key and Farnell InOne, the QT118H costs less than $1 (10,000) in an eight-pin SOIC or DIP, and an evaluation board is available for $19.95.
Respectively suiting linear sliders and touch wheels, the QT411 and QT511 employ three electrode sections to create a position-sensing touch area. For instance—and forming a cheaper and simpler alternative to the 18-electrode structure and its resistors that appear in the current version of the device’s data sheet—the QT511 can use just three arcs of interleaved metal that are also usually built onto an FR4 substrate (Figure 4).
POLAR GRIDS Although contemporary pcboard-layout packages, such as those from Pulsonix, include polar grids that make it easy to lay out the original 18-electrode radial pattern, Philipp acknowledges that the new structure challenges most board design software: “Our CAD technician used CorelDraw to create the pattern and then imported a dxf-format file into our pc-board design environment,” he says. Three sense lines connect to this new structure, with the chip’s logic interpolating between electrodes to resolve 128 discrete positions. Three reference capacitors, whose values depend on the thickness and dielectric constant of the panel material, set the circuit’s sensitivity, with the device outputting a 7-bit number through its SPI port. A host microcontroller sets acquisition timings and operating parameters, such as a synchronized mode that optimizes ac-line interference rejection. The QT511 costs approximately $1.50 (10,000) in a 14-pin SOIC.
Quantum’s multiple-key sensors provide for setting individual sensitivity for each key, allowing product designers maximum flexibility in using keys of different sizes and shapes. Further flexibility comes from using a custom microcontroller core, which the company can modify to address the needs of small-system applications, such as food blenders, within a single chip. Philipp concludes, “QT technology has a dynamic range of several decades, and, unlike traditional capacitive sensors, QT sensors don’t require coils, oscillators, RF components, special cable, RC networks, or a lot of discrete parts.”
AUTHOR INFORMATION You can reach Contributing Editor David Marsh at forncett@btinternet.com.