Download Print this page

Advertisement

Quick Links

TN0074
Technical note
Calibration procedure for a resistive touchscreen
system based on the STMPE811
Introduction
This document describes the calibration procedures for a resistive touchscreen system
based on the STMPE811 8-bit port expander with advanced touchscreen controller. The
system consists of a screen to display information to the user, and a touch sensor panel
controlled by the STMPE811 to detect and define the location of a touch event. Each
component has its own resolution and independent coordinate system.
It may not be possible to use the touch coordinates produced by the touchpanel directly as
the screen coordinates. This is because typically there is a mismatch between the two
coordinate systems caused by factors such as mechanical placement error, scale
difference, or the series resistance of the tracks connecting the touchpanel and its driver IC.
A set of transfer functions must be used to convert the touchpanel coordinates to the screen
coordinates. The constants of the functions are defined during the calibration process.
January 2009
Rev 1
1/13
www.st.com

Advertisement

loading
Need help?

Need help?

Do you have a question about the STMPE811 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ST STMPE811

  • Page 1 STMPE811 to detect and define the location of a touch event. Each component has its own resolution and independent coordinate system.
  • Page 2 Contents TN0074 Contents 2-constants calibration ........3 3-constants calibration .
  • Page 3 TN0074 2-constants calibration 2-constants calibration 2-constants calibration only corrects misalignment on the X and Y axes, both scaling factor and offset. Angle misalignment is not corrected. This type of calibration is suitable when the angle error is negligible (small screen) and a simple calculation is required. The procedure for 2-constants calibration is quite straightforward.
  • Page 4 2-constants calibration TN0074 Figure 2. Example of calibration points AM01967v1 The calibration points are described in Table 1 below: Table 1. 2-constants calibration points Point After the user touches the points on the touchpanel, the panel coordinates are as shown in Table 2 , assuming there is some variation in touch locations.
  • Page 5 TN0074 2-constants calibration To solve these equations, points 1 and 3 are used: ● Y axis Equation 5 ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎜ ⎜ ⎟ ⎟ ⎜ ⎜ ⎟ ⎟ ⎜ ⎜ ⎟ ⎟ ⎝ ⎠ ⎝ ⎠ ⎝...
  • Page 6 2-constants calibration TN0074 Hence, the transfer functions from the touchpanel coordinates to the display coordinates are: − 4905 1045 1125 The points chosen for calibration should be capable of representing the entire screen area. The recommended positions are the corners of the screen, but not too close to the center of the screen or the borders of the touchpanel.
  • Page 7 TN0074 3-constants calibration 3-constants calibration This method of calibration corrects misalignment of the X and Y axes, as well as angle misalignment. Figure 4 shows an illustration of mechanical misalignment. Figure 4. Mechanical placement error which includes angle error ,Y D ) (X,Y) θ...
  • Page 8 3-constants calibration TN0074 Equation 15 θ ∆ θ θ Equation 16 ∆ θ θ − θ To simplify the equations, Equation 15 can be rewritten as: Equation 17 Equation 18 It is clear that to solve Equation 17 , at least 3 points are required. The points used must be independent of each other (not in a straight line).
  • Page 9 TN0074 3-constants calibration Equation 20 ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ × ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ The unknown can be calculated using the equations that follow. Equation 21 ⎛...
  • Page 10 3-constants calibration TN0074 Equation 24 ⎛ ⎞ ⎜ ⎟ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ × ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎜ ⎟ ⎝ ⎠ where ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟...
  • Page 11 TN0074 3-constants calibration Equation 28 × α × β − χ × χ × ε × φ − α × φ − β × ε × × β − χ φ × × ε − × φ × χ × φ...
  • Page 12 Revision history TN0074 Revision history Table 4. Document revision history Date Revision Changes 26-Jan-2009 Initial release. 12/13...
  • Page 13 No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.