Getting in touch with capacitance sensor algorithms -

Getting in touch with capacitance sensor algorithms


Increasingly embedded applications must interact directly with their environment and their end users. Consider the best new touchscreen phones, in which the user interface is a large capacitive sensing screen that differentiates a flick from a tap and tracks the motion of your finger but doesn't track your ear.

Sensors are at the heart of these systems. They sense the environment and user behavior, enabling the product to respond in an intuitive but reliable way. However, the sensor films themselves aren't intelligent. They don't even collect data. They only sense. They aren't capable of differentiating between useful and useless data or discriminating between the quality of different types of inputs.

Truth be told, these sensor films hardly sense at all. They really just project an electric field created by an intelligent capacitive sensing chip. This type of capacitive sensing is known as projected capacitive technology, and it's used in the most advanced capacitive touchscreen solutions. Figure 1 shows and example of how a projected capacitive touchscreen works.

View the full-size image

This is not to say that the sensors themselves are not complex. On the contrary, a capacitive touchscreen sensor consists of a large array of indium tin oxide (ITO) conductors on one or more layers of glass or polyethylene terephthalate (PET) plastic. Figure 2 presents an example of a touchscreen sensor construction.

View the full-size image

The good optical clarity and low resistivity of ITO make it the perfect conductor for creating a touchscreen. When the ITO sensor is connected to a capacitive sensing chip with a suitably high signal-to-noise ratio (SNR), it can accurately sense minute changes in capacitance. A finger's presence for instance is on the order of a picoFarad (1012 Farads).

It is typically accompanied by background capacitances of 10's of nanoFarads (109 Farads). This situation makes the sensing environment challenging and mandates an exceptionally high SNR. Charge transfer technology is well suited to high SNR capacitive sensing systems. It allows the capacitive system to sense minute changes in capacitance–even from a finger as it approaches the phone before it touches it or from the touch of a fingernail.

Charge transfer technology enables high SNR by using a pair of sensing electrodes for each capacitive channel. One is a transmit electrode into which a charge consisting of logic pulses is driven in burst mode. The receive electrode couples to the emitter via the overlying panel dielectric. When a finger touches the panel, the field coupling is reduced and touch is detected.

Most charge signal acquisition techniques leave the charge lines hot (sensitive to the touch) during signal conversion. The current on the sensor edge wiring can be included as part of the position calculation, introducing positional inaccuracy to the measurement.

The contribution of the edge wiring increases with the length of the routing between the sensor and the driver chip and becomes seriously problematic if the distance exceeds a few centimeters.

The charge transfer technique holds the receive lines at zero potential during the charge acquisition process and solves this problem, effectively restricting the transfer of charges to those between the transmitter X and receiver Y electrodes at the point of interest in the main sensor area.

This “charge-transfer” signal-acquisition technique uses individual resistive one-dimensional stripes to create a touchscreen. These stripes can be read either in parallel or sequentially, since the connections to these stripes are independent of one another. There is an interpolated coupling between adjacent lumped electrode elements and an object such as a finger.

The charge-transfer technique restricts signal acquisition to the immediate vicinity where a row and column electrode couple to each other. This localized coupling means that all other parts of the row and column are largely not touch sensitive at the time the signal is acquired, literally enabling true, unlimited multi-touch capability.1 Figure 3 shows an example of a charge transfer.

View the full-size image

Mutual vs. Self Capacitance

There are two approaches to determining finger position with a projected capacitive touchscreen: measuring self capacitance and measuring mutual capacitance. Touchscreen solutions that measure self capacitance measure an entire row or column for capacitive change.

Self capacitance works OK for single-touch systems, but with multi-touch systems there is no way to resolve the positional ambiguity that results from more than one simultaneous touch on different parts of the screen.

For example, if a user touches on the capacitive grid at locations X1, Y1 and X2, Y2, the energized lines simply tell the chip that X1, X2, Y1, Y2 lines have all been touched. It doesn't know the combination thereof. It could be that the chip reports X1, Y2 and X2, Y1 were the touch locations. This problem is known as ghosting.

Another problem with self-capacitance touchscreens is the snapping effect. It happens when tracking two touches moving towards a shared row or column electrode; the reported coordinates tend to “snap” to that electrode causing a strong nonlinearity and poor user feel.

In contrast, mutual capacitance measurement uses an orthogonal matrix of transmit and receive electrodes arranged as an array of multiple smaller touch nodes created by the geometry of the electrode structure.

In a mutual capacitance based system, each touch is uniquely detected as an xy coordinate pair, whereas in a self capacitance system, the detection of X and Y coordinates of a touch is independent.

If two touches are present in a mutual capacitance system, this would be detected as (X1,Y1) and (X2,Y2), whereas in a self-capacitance system it would be detected as (X1,X2,Y1,Y2), leaving two potential combinations of coordinates. The self-capacitance ghosting problem is exponential and becomes impossible to solve as you transition to three or more touches.

A mutual capacitive array is interpreted as a complete touch surface that maintains the ability to resolve multiple touch points within each individual “small” screen. Because the capacitive coupling at each point in the matrix can be measured independently, it means that there is no ambiguity in the reported coordinates for multiple touches. It is then technically possible to have unlimited touch recognition. Figure 4 compares mutual vs self capacitance.

View the full-size image

Charge-transfer signal acquisition, combined with a mutual-capacitance measurement technique, provides a superior SNR and better tolerance to parasitic capacitance, allowing weak signals, such as capacitance conducted through a fingernail, coin or stylus, to be processed.

Sensor Resolution

Sensor resolution, the ability to a resolve passive conductive stylus, can be directly linked to the electrode pattern or ITO sensor design. A high-resolution pattern can be formed by having an array of vertical transmit bars separated by a dielectric to a second layer, which contains a horizontal array of receiving lines.

In each location the bars cross, a parallel plate capacitor or sensing electrode is formed.2 In order to maximize the resolution and SNR of this pattern, to detect a 2-mm passive stylus tip for instance, it is important to optimize the density of electrodes. Adding more capacitive channels in each axis for a given screen size can have a beneficial effect even though the sensor is more complex to manufacture.

More channels will result in a higher SNR. The optimum row and column pitch of the electrodes should approximate the tip-to-tip distance between thumb and forefinger when pinched together, divided by two (about 5 mm or less). This means that a 4.3-inch screen in a 16:9 aspect ratio should ideally have 19 rows by 11 columns, totaling 209 mutual capacitance electrodes.3

Increasing the electrode density also allows a more qualitative interpretation of the data. For example, a 200+ channel matrix makes it possible to process the “size” and “shape” of the touch, allowing the end user to draw a picture or execute a signature. With a sufficiently high refresh rate (200 Hz), the technology can even support full-speed signature and handwriting recognition with as small as a 2-mm stylus.

While high sensitivity and resolution vastly improves the screen's flexibility, it also introduces the problem of selectivity. The entire surface of the touchscreen measures any small change in capacitance resulting from any charged object (finger, ear, face) that is even near the surface of the sensor, whether intentional or unintentional.

The challenge is to collect the data, discard useless data and utilize useful data in a selective and accurate way. Introducing selectivity and accuracy involves arranging and measuring the change in capacitance in a meaningful way, while also acquiring enough data and applying appropriate algorithms to allow for qualitative differentiation.

Multi-touch: How many is too many?

Two touches allow objects to be stretched, squeezed, and rotated. One might wonder what is the utility of processing five or 10 touches simultaneously, when you can barely fit three fingers on the phone?

The answer goes back to the notion of making the sensor selective–able to interpret the quality or size of a touch and to suppress accidental on unwanted inputs. A true multi-touch technology allows intended touches to be identified and interpreted (such as flick vs. tap). It also allows unintended touches to be identified and rejected.

On its own, a capacitive touchscreen sensor has no idea what is touching it or why. It cannot distinguish between a finger, ear, face, elbow, or butterfly. Thus, it's possible for the end user to issue accidental commands to the phone by just using it: gripping its edges or pressing it to his/her ear or face.

Some of the “extra” touch points in a true multi-touch solution can be assigned to unintended touches. Suppressed touches must be tracked and stay suppressed even if they stray into the active region.

This means the controller must be able to uniquely and unambiguously resolve, classify, and track many touches at once. This enables a user to comfortably hold a small product with some amount of finger/screen overlap, while also allowing the touchscreen to operate normally.

Face and grip suppression algorithms can be used that identify and reject unintentional input from the user's face or ear or from fingers gripping the edges of the phone. Grip suppression is quite tricky, as it isn't as simple as just ignoring presses at the edges.

In actuality, the chip has to be smart enough to determine the touches from a grip at the edges, track them as they move, and ensure that they don't trigger false presses. All the while the chip needs to keep the whole screen active for multi-touch support, even as the correct touches move to the edges where the grip occurs.

Gesture processing algorithms that calculate and interpret the xy coordinates of a stream of physically present data from each of the 10 unique touch points to execute gesture commands such as tap, drag, drop, zoom, rotate, or flick–based on the speed of the gesture and the xy positions in the data stream.

Another potential use of the underlying many-touch data is to recognize shapes on the touch surface. This allows all kinds of potentially useful interface enhancements. Basic shape recognition for a nose, cheek, or even an ear allows further suppression of real-world situations that would otherwise falsely trigger the touchscreen.

As more touches can be uniquely identified and reported to the host, the applications will start making use of multiple touch data.

Noise and System Issues

As noted earlier, capacitive touchscreen controllers measure very small changes in the row to column coupling capacitance. The way the controller performs the measurement has a strong influence on the susceptibility of the controller to external noise.

One common noise generator encountered with touchscreens is the LCD itself. It often has voltage transients measured as several volts with rise/fall times measured in microseconds. Using the right type of capacitive-to-digital conversion and noise suppression algorithms, it's possible to reject most of the noise at source.

Another approach is to use a sensor electrode pattern that uses two ITO layers but is self shielding from behind. This approach saves cost by eliminating the need for an extra shield layer of ITO while still renderings the sensor immune to the noisy LCD surface.

The second most problematic noise source is found with “floating” power supplies that often capacitively couple several hundred volts of distorted 50/60-Hz waveform relative to earth, into the entire touchscreen device. When a user touches the device, the sensor effectively becomes part of a capacitive voltage divider, contaminating the measurements with huge amounts of low-frequency noise. Again, with clever chip design and noise suppression algorithms can eliminate this effect.

Calibrating touch

Although many touchscreen solutions require the factory and/or the end user to calibrate them before use, solutions are available with self-calibration algorithms that allow the chip to operate independently of any user or manufacturing calibration.

Signal drift can occur because of changes in the unknown electrode capacitance and Cs sampling capacitors over time, often resulting from changes in temperature or humidity, and causing false detections, non-detections, and sensitivity shifts.

Drift compensation algorithms compensate using a slew-rate limited change to the reference level; the threshold and hysteresis values are slaved to this reference. Once an object is sensed, the drift compensation mechanism ceases since the signal is legitimately high, and therefore should not cause the reference level to change.4,5,6 Figure 5 illustrates drift compensation.

View the full-size image

ITO sensors are the heart

Capacitive touchscreens will likely make their way into products not even imagined today. Consumers are demanding that user interfaces interact with them in an intuitive, effortless, and reliable way.

ITO sensors are at the heart of the solution. Exploiting these exceptionally sensitive sensors requires thoughtful construction, fast performance, and innovative algorithms, embodied in highly intelligent, capacitive touchscreen controller chips that can deliver high channel density, a high SNR, and a multi-touch capability.

John Carey, director of Marketing Touch Technology at Atmel Corp., has a masters in electrical engineering from California State University, as well as a bachelors in electrical engineering from Arizona State University. You may reach him at


1. “Charge Transfer Capacitive Position Sensor.” U.S. Pat. No. 7,148,704, December 12, 2006.

2. Capacative Position Sensor United States Patent Pending 20080278178 , November 13, 2008.

3. Hybrid Capacitive Screen Element, United States Patent Pending 20070247443 October 25, 2007.

4. Hybrid Capacitive Screen Element, Patent Pending 20070247443 October 25, 200.7

5. Capacitive Position Sensor. U.S. Pat. No. 6,288,707, September 11, 2001.

6. Adjacent Key Suppression–U.S Patent 6,993,607, January 31, 2006.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.