|Home Analog Devices Feedback Subscribe Archives 简体中文 日本語|
AD7879 Controller Enables Gesture Recognition on Resistive Touch Screens
An enhanced, low-cost user interface using touch is a valuable feature for a variety of consumer, medical, automotive, and industrial devices. In many consumer applications, designers prefer expensive capacitive touch screens to resistive technologies because they can track a large number of fingers and seem to offer a friendlier interaction with the user. At present, low-cost resistive technologies fill a market niche where only a single touch is required, extremely accurate spatial resolution is paramount, a stylus facilitates specific functionality—such as Asian-language character recognition, or in environments where users must wear gloves.
Although resistive technologies have conventionally been used to detect the position of a single touch on the screen, this article offers a new dual-touch concept that uses the AD7879 resistive touch-screen controller to detect the most common two-finger gestures (zoom, pinch, and rotation) using inexpensive resistive touch screens.
Approach to Resistive Touch Screens
The layer supplied with the dc voltage, which carries a current inversely proportional to its impedance, is called the ‘active’ layer. The layer the voltage is measured from is called the ‘passive’ layer, since no relevant current flows through it. When a single touch occurs, a voltage divider is formed in the active layer, and the passive-layer voltage measurement allows an analog-to-digital converter to read the voltage proportional to the distance of the touch point from the negative electrode1.
The classical 4-wire resistive touch screen is popular for single-touch applications because of its low cost. Resistive approaches for multitouch have employed various techniques that always include a matrix layout screen—but at a daunting increase in screen manufacturing cost. Furthermore, the controller requires many inputs and outputs to measure and drive the various screen strips, increasing controller cost and measurement time.
1. (a) Construction of a resistive touch screen,
A model of dual touch sensing in a resistive screen is shown in Figure 2. Rtouch is the contact resistance between layers; in most of the screens currently available, it is typically of the same order as the resistance of both layers. If a constant current, I, flows through the terminals of the active layer, the voltage across the active layer is as follows:
Figure 2. Basic model of dual touch in resistive screens.
When tightly pinched, the parallel resistance approaches zero and Ru + Rd increases to the total resistance, so the voltage increases to
Figure 3 shows an example where the pinch is executed along the vertical (Y) axis. The voltage between the electrodes of one of the layers is constant while the other layer shows a step decrease when the gesture starts, followed by an increase as the fingers come closer together.
Figure 3. Voltage measurements when a vertical pinch is performed.
Figure 4 shows the voltage measurements when a pinch is executed at a slant. In this case, both voltages show the step decrease and slow recovery. The ratio between the two recovery rates, normalized by the resistances of each layer, can be used to detect the angle of the gesture.
Figure 4. Voltage measurements when a diagonal pinch is executed.
If the gesture is a zoom (fingers moved apart), the behavior can be deduced from the previous discussion. Figure 5 shows the voltage trends measured in both active layers when zoom gestures are executed along each axis and in an oblique direction.
Figure 5. Voltage trends when zooms are executed in differing directions.
with the AD7879
The AD7879, accompanied by a pair of low-cost op amps, can perform the above pinch and zoom gesture measurements, as shown in Figure 6.
The following steps describe the procedure to recognize gestures:
The circuit in Figure 6 requires the differential amplifiers to be protected against shorts to VDD. During the first semi-cycle, the output of the lower amplifier is shorted to VDD. During the second semi-cycle, the output of the upper amplifier is shorted to VDD. To avoid this, two external analog switches can be controlled by the AD7879’s GPIO, as shown in Figure 7.
Figure 6. Application diagram for basic gesture detection.
Figure 7. Application diagram that avoids shorting the amplifier outputs to VDD.
In this case, the AD7879 is programmed in slave conversion mode, and only one semi-cycle is measured. When the AD7879 completes the conversion, an interrupt is generated. The host processor reprograms the AD7879 to measure the second semi-cycle and changes the value of the AD7879 GPIO. At the end of the second conversion, results for both layers are stored in the device.
A rotation can be modeled as a simultaneous zoom in one direction and an orthogonal pinch, so detecting one is not difficult. The challenge is discriminating clockwise (CW) and counterclockwise (CCW) gestures; this cannot be achieved by the process described above. Detecting both a rotation and its direction requires measurements on both layers, active and passive, as shown in Figure 8. Since the circuit in Figure 7 cannot meet this requirement, a new topology is proposed in Figure 9.
Figure 8. Voltage measurements when CW and CCW rotations are executed.
The topology proposed in Figure 9 allows the following:
The circuit of Figure 9 permits all the voltages required to achieve full performance to be measured, namely, a) single touch location, b) zoom, pinch, and rotation gesture detection and quantification, and c) CW vs. CCW rotation discrimination. Single-touch operation when performing a dual-touch gesture provides an estimation of the gesture centroid.
Figure 9. Application diagram for single touch location and gesture detection.
An alternative is to add a resistor to only the low-side connection, sensing just the X– and Y– electrodes when they are active layers. By doing this, some gain can be applied, since the dc value is pretty low.
Analog Devices offers a variety of amplifiers and multiplexers that fulfill the needs of the applications shown in Figure 6, Figure 7, and Figure 9. The AD8506 dual op amp and ADG16xx family of analog multiplexers, which offers low on resistance with a single 3.3-V supply, were used to test the circuits.
The authors wish to thank Colin Lyden, John Cleary, and Susan Pratt for fruitful discussions.
1 Finn, Gareth. “New Touch-Screen Controllers Offer Robust Sensing for Portable Displays.” Analog Dialogue, Vol. 44, No. 2. February 2010. (return to text)
Copyright 1995- Analog Devices, Inc. All rights reserved.