Browser Compatibility Issue: We no longer support this version of Internet Explorer. For optimal site performance we recommend you update your browser to the latest version.Update Microsoft Internet Explorer

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:

Figure 2. Basic model of dual touch in resistive screens.

Gesture Recognition

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 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.

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.

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.

Practical Hints

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.

Conclusion

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.

Acknowledgements

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.

Authors

Javier Calpe

Javier Calpe received his B.Sc. in 1989 and his Ph.D. in physics in 1993, both from the Universitat de Valencia, Spain. Javier is the site manager of ADI’s development center in Valencia, Spain.

Italo Medina

Italo Medina received his degree in electronic engineering from Universidad Politécnica de Valencia, Spain, in 2010. Italo joined ADI in 2010 as an analog designer in the Precision DAC Group in Limerick, Ireland.

Alberto Carbajo

Alberto Carbajo received his degree in electronic engineering from Universidad Politécnica de Valencia, Spain, in 2000, and obtained his MEngSc from University College Cork (UCC), Ireland, in 2004. Alberto joined ADI in 2000, and he has worked in the test and design departments. Presently, his work focuses on IC-based sensing products, including signal processing and integration with microcontroller-based designs.

Maria Jose Martinez

María José Martínez received a BE degree in telecommunications engineering from the Universidad Politécnica de Valencia in 2005. She joined ADI in 2006 and has been working as an applications engineer in touch-screen products. She is mainly focused on CapTouch® and touch-screen controller and lens driver products. Maria is currently based in Valencia working for the portable segment.

Related Markets & Technology

Analog Devices Uses Cookies for Enhanced Online Performance

Some cookies are required for secure log-ins but others are optional for functional activities. Our data collection is used to improve our products and services. We recommend you accept our cookies to ensure you’re receiving the best performance and functionality our site can provide. For additional information you may view the cookie details. Read more about our privacy policy.

These are cookies that are required for the operation of analog.com or specific functionality offered. They either serve the sole purpose of carrying out network transmissions or are strictly necessary to provide an online service explicitly requested by you.

Analytics/Performance Cookies:

These cookies allow us to carry out web analytics or other forms of audience measuring such as recognizing and counting the number of visitors and seeing how visitors move around our website. This helps us to improve the way the website works, for example, by ensuring that users are easily finding what they are looking for.

Functionality Cookies:

These cookies are used to recognize you when you return to our website. This enables us to personalize our content for you, greet you by name and remember your preferences (for example, your choice of language or region). Loss of the information in these cookies may make our services less functional, but would not prevent the website from working.

Targeting/Profiling Cookies:

These cookies record your visit to our website and/or your use of the services, the pages you have visited and the links you have followed. We will use this information to make the website and the advertising displayed on it more relevant to your interests. We may also share this information with third parties for this purpose.

Analog Devices is a global leader in the design and manufacturing of analog, mixed signal, and DSP integrated circuits to help solve the toughest engineering challenges.

Interested in the latest news and articles about ADI products, design tools, training and events? Choose from one of our 12 newsletters that match your product area of interest, delivered monthly or quarterly to your inbox.