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.
The Classical Approach to Resistive Touch Screens
Typical resistive screens have two parallel indium tin-oxide (ITO) conducting layers separated by a gap (Figure 1). The edge electrodes of the upper layer (Y) are rotated 90° with respect to those of the lower layer (X). A “touch” occurs when the two layers are brought into electrical contact by pressure applied to a small area of the screen. If a dc voltage is applied between the two electrodes of the top layer, while the lower layer floats, the touch brings the lower layer to the same voltage as the touch point. The touch coordinate in the direction of the top layer is identified by measuring the voltage on the bottom layer to determine the ratio of the resistance at the touch point to the total resistance. Then, electrical connections for the layers are swapped, and the coordinate of the touch point on the other axis is obtained.
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.
Beyond Single Touch
Nevertheless, more information can be extracted from resistive touch screens by understanding and modeling the physics behind the process. When two touches occur, a segment of resistance from the passive screen, plus the resistance of the touch contacts, is paralleled with the conducting segment of the active screen, so the impedance seen by the supply is reduced and current increases. The classical approach to resistive controllers assumes that the current through the active layer is constant, and the passive layer is equipotential. With two touches, these assumptions no longer hold, so additional measurements are required to extract the desired information.
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:
The idea behind gesture recognition can be better described using a pinch as an example. A pinch gesture starts with touches by two well-separated fingers. This produces a double contact, which reduces the impedance of the screen—and, thus, the voltage difference between the plates of the active layer. As the fingers are brought closer together, the paralleled area decreases, so the impedance of the screen increases, as does the voltage difference between the plates of the active layer.
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 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.
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.
Detecting Gestures with the AD7879
The AD7879 touch-screen controller is designed to interface with 4-wire resistive touch screens. In addition to sensing touch, it also measures temperature and the voltage on an auxiliary input. All four touch measurements—along with temperature, battery, and auxiliary voltage measurements—can be programmed into its on-chip sequencer.
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:
- In the first semi-cycle, a dc voltage is applied to the top (active) layer, and the voltage at the X+ pin (corresponding to VY+ – VY–) is measured. This provides information related to motion (together or apart) in the Y direction.
- In the second semi-cycle, a dc voltage is applied to the bottom (active) layer, and the voltage at the Y+ pin (corresponding to VX+ – VX–) is measured. This provides information related to motion (together or apart) in the X direction.
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.
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.
The topology proposed in Figure 9 allows the following:
- Semi-Cycle 1: Voltage is applied to the Y layer while (VY+ – VY–), VX–, and VX+ are measured. The AD7879 generates an interrupt after each measurement is completed, allowing the processor to change the GPIO configuration.
- Semi-Cycle 2: Voltage is applied to the X layer while (VX+ – VX–), VY–, and VY+ are measured.
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.
The variations in voltage associated with soft gestures are quite subtle. The robustness of the system can be improved by increasing these variations by means such as adding a small resistance between the electrodes of the screen and the pins of the AD7879; this will increase the voltage drop in the active layer, with some loss of accuracy of single-touch positioning.
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.
Zooms, pinches, and rotations can be detected using the AD7879 controller with minimum ancillary circuitry. These gestures can be identified with measurements in the active layer only. Rotation direction discrimination can be achieved by measuring the voltage in the passive layer, which can be achieved by using two GPIOs from the host processor. Fairly simple algorithms executed in this processor can identify zooms, pinches, and rotations, estimating their range, angle, and direction.
(Information on all ADI components can be found at www.analog.com.)
1 Finn, Gareth. “New Touch-Screen Controllers Offer Robust Sensing for Portable Displays.” Analog Dialogue, Vol. 44, No. 2. February 2010.
This work has been partially supported by Instituto de la Mediana y Pequeña Industria Valenciana (IMPIVA) under project IMIDTF/2009/15 and by the Spanish Ministry for Education and Science under project Consolider/CSD2007-00018.
The authors wish to thank Colin Lyden, John Cleary, and Susan Pratt for fruitful discussions.