manuals.online logo
Brands
  1. Home
  2. •
  3. Brands
  4. •
  5. ST
  6. •
  7. Computer Hardware
  8. •
  9. ST STMPE811 Specification sheet

ST STMPE811 Specification sheet

Other ST Computer Hardware manuals

ST TIP122FP User manual

ST

ST TIP122FP User manual

ST X-NUCLEO-STMODA1 User manual

ST

ST X-NUCLEO-STMODA1 User manual

ST X-NUCLEO-IHM02A1 User manual

ST

ST X-NUCLEO-IHM02A1 User manual

ST X-NUCLEO-OUT02A1 User manual

ST

ST X-NUCLEO-OUT02A1 User manual

ST X-NUCLEO-IDB05A2 User manual

ST

ST X-NUCLEO-IDB05A2 User manual

ST STM32 Nucleo User manual

ST

ST STM32 Nucleo User manual

ST STM32 Nucleo User manual

ST

ST STM32 Nucleo User manual

ST X-NUCLEO-IDB04A1 User manual

ST

ST X-NUCLEO-IDB04A1 User manual

ST STEVAL-MKI015V1 Quick start guide

ST

ST STEVAL-MKI015V1 Quick start guide

ST B-U585I-IOT02A User manual

ST

ST B-U585I-IOT02A User manual

ST STEVAL-ETH001V1 User manual

ST

ST STEVAL-ETH001V1 User manual

ST STSW-ST25DV002 User manual

ST

ST STSW-ST25DV002 User manual

ST EVLKST8500GH-2 User manual

ST

ST EVLKST8500GH-2 User manual

ST ST25DV-DISCOVERY User manual

ST

ST ST25DV-DISCOVERY User manual

ST X-NUCLEO-EEPRMA1 User manual

ST

ST X-NUCLEO-EEPRMA1 User manual

ST ST10R272L User manual

ST

ST ST10R272L User manual

ST EVSPIN948 User manual

ST

ST EVSPIN948 User manual

ST X-NUCLEO-IKA01A1 User manual

ST

ST X-NUCLEO-IKA01A1 User manual

ST STEVAL-OET005 User manual

ST

ST STEVAL-OET005 User manual

ST M41ST85W User manual

ST

ST M41ST85W User manual

ST TDA911 Series Installation and operating instructions

ST

ST TDA911 Series Installation and operating instructions

ST X-NUCLEO-S915A1 User manual

ST

ST X-NUCLEO-S915A1 User manual

ST I-CUBE-LRWAN User manual

ST

ST I-CUBE-LRWAN User manual

ST X-NUCLEO-IDW04A1 User manual

ST

ST X-NUCLEO-IDW04A1 User manual

Popular Computer Hardware manuals by other brands

Toshiba TOSVERT VF-MB1/S15 IPE002Z Function manual

Toshiba

Toshiba TOSVERT VF-MB1/S15 IPE002Z Function manual

Shenzhen MEITRACK MVT380 user guide

Shenzhen

Shenzhen MEITRACK MVT380 user guide

TRENDnet TEW-601PC - SUPER G MIMO WRLS PC CARD user guide

TRENDnet

TRENDnet TEW-601PC - SUPER G MIMO WRLS PC CARD user guide

StarTech.com CF2IDE18 instruction manual

StarTech.com

StarTech.com CF2IDE18 instruction manual

Texas Instruments LMH0318 Programmer's guide

Texas Instruments

Texas Instruments LMH0318 Programmer's guide

Gateway 8510946 user guide

Gateway

Gateway 8510946 user guide

Devon IT TC2D Quick setup guide

Devon IT

Devon IT TC2D Quick setup guide

Krüger & Matz Air Shair2 owner's manual

Krüger & Matz

Krüger & Matz Air Shair2 owner's manual

Crystalio VPS-2300 quick guide

Crystalio

Crystalio VPS-2300 quick guide

MYiR FZ3 user manual

MYiR

MYiR FZ3 user manual

Protech Systems BC-K200 Quick reference guide

Protech Systems

Protech Systems BC-K200 Quick reference guide

Miranda DENSITE series DAP-1781 Guide to installation and operation

Miranda

Miranda DENSITE series DAP-1781 Guide to installation and operation

Sierra Wireless Sierra Wireless AirCard 890 quick start guide

Sierra Wireless

Sierra Wireless Sierra Wireless AirCard 890 quick start guide

Leadtek Killer Xeno Pro Quick installation guide

Leadtek

Leadtek Killer Xeno Pro Quick installation guide

Star Cooperation FlexTiny 3 Series Instructions for use

Star Cooperation

Star Cooperation FlexTiny 3 Series Instructions for use

Hotone Ampero user manual

Hotone

Hotone Ampero user manual

Connect Tech Xtreme/104-Express user manual

Connect Tech

Connect Tech Xtreme/104-Express user manual

Yealink WF50 user guide

Yealink

Yealink WF50 user guide

manuals.online logo
manuals.online logoBrands
  • About & Mission
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Copyright 2025 Manuals.Online. All Rights Reserved.

January 2009 Rev1 1/13
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.
www.st.com
Contents TN0074
2/13
Contents
1 2-constants calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 3-constants calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
TN0074 2-constants calibration
3/13
1 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.
Figure 1. Mismatch which can be corrected with 2-constants calibration
Point A in Figure 1 is located at coordinate (3,3) on the touchpanel, but on the screen it is
located at coordinate (1.6,1.4). This condition can be corrected using the following transfer
function:
Equation 1
Equation 2
Where:
●YDis the screen's Y value
●XDis the screen's X value
●Y is the touchpanel's Y value
●X is the touchpanel's X value
●a, b, c, d are the transfer function parameters
The two unknowns in both equations can be resolved by choosing two points and defining
them on the screen. For an example, please refer to Figure 2.
AM01966v1
A
baYYD+=
dcXXD+=
2-constants calibration TN0074
4/13
Figure 2. Example of calibration points
The calibration points are described in Table 1 below:
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.
Only two points are required to solve the equations, but it is recommended to perform the
equations twice and use an average of the results.
In this illustration, there are two groups of equations to be solved. Group 1 is defined as
follows:
Equation 3
Equation 4
Table 1. 2-constants calibration points
Point XDYD
113
211
351
453
Table 2. Input from touchpanel for defined points
Point X Y
11.86.3
21.852.3
39.752.2
4 9.8 6.35
AM01967v1
1
2
3
4
1
2
3
4
5
1
2
3
4
5
6
7
8
9
10
11
3
2
1
1
2
3
4
5
6
7
11D bYaY +=
11D dXcX +=
TN0074 2-constants calibration
5/13
To solve these equations, points 1 and 3 are used:
●Y axis
Equation 5
Solving the matrix results in a1 = 0.487 and b1 = -0.073
●X axis
Similarly, the results are c1 = 0.503 and d1 = 0.095
Group 2 is defined as follows:
Equation 6
Equation 7
Point 2 and 4 are used to solve these equations:
●Y axis
Solving the equation:
Equation 8
●X axis
Solving the equation:
Equation 9
At this point, take an average of the results from the two groups of equations, and this is the
final result of the calibration.
Table 3. Final calibration result using the average of the two point groups
Parameter 1 2 Average
a 0.487 0.494 0.4905
b -0.073 -0.136 -0.1045
c 0.503 0.497 0.5
d 0.095 0.130 0.1125
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
1Y 1Y
b
a
Y
Y
3
1
1
1
3D
1D
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
12.2 13.6
b
a
1
3
1
1
22D bYaY +=
22D dXcX +=
a2 = 0.494 and b2 = -0.136
c2 = 0.497 and d2 = 0.130
2-constants calibration TN0074
6/13
Hence, the transfer functions from the touchpanel coordinates to the display coordinates
are:
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. Choosing calibration points too close to the
center results in poor representation of the areas further away from the center. However, if
the points are too near the edges, any mechanical imperfections present in the panel may
affect the result of the calibration.
It is recommended to use points located at 20% and 80% of the X and Y axes, as shown in
Figure 3 below.
Figure 3. Recommended calibration point positions: 20% and 80% of X and Y axes
1125.0X5.0X 1045.0X4905.0Y
D
D
+=
−=
AM01968v1
20%
80%
100%
80%
100%
20%
TN0074 3-constants calibration
7/13
2 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
Mathematical expressions can be derived from Figure 4. They are:
Equation 10
Equation 11
Introducing a scale difference between the panel and the display, we have:
Equation 12
If an error is introduced in the X and Y axis (represented by XTand YT) of Equation 12, the
resulting equation is:
Equation 13
Using trigonometric identity with the assumption that ∆θ → 0, the result is:
Equation 14
and Equation 13 can be modified to:
AM01969v1
θ
-
Δθ
θ
Δθ
(X
D
,YD)
(X,Y)
()
[]
θθ= sinR,cosRY,X
() ()()
[]
θ∆−θθ∆−θ= sinR,cosRY,X DDDD
( ) () ()
[]
θ∆−θθ∆−θ= sinRK,cosRKY,X YXDD
( ) () ()
[]
TYTXDD YsinRK,XcosRKY,X +θ∆−θ+θ∆−θ=
()
θ−θθ∆=θ∆−θ
θθ∆+θ=θ∆−θ
sincos)sin( sincoscos
3-constants calibration TN0074
8/13
Equation 15
Equation 16
To simplify the equations, Equation 15 and 16 can be rewritten as:
Equation 17
Equation 18
It is clear that to solve Equation 17 and 18, at least 3 points are required. The points used
must be independent of each other (not in a straight line).
The 3 independent points chosen are illustrated in Figure 5. The coordinate (XDn,YDn)
contain the chosen points of the screen coordinate, while (Xn,Yn) represents the user’s
input on the touchpanel corresponding to the points displayed on the screen.
Figure 5. Example of 3 independent points
The matrix representation is as follows:
Equation 19
TXXD XsinRKcosRKX +θθ∆+θ=
TYYD YsinRKcosRKY +θ−θθ∆=
CBYAXXD++=
FEYDXYD++=
AM01970v1
(X1,Y 1)
(X2,Y 2)
(X3,Y 3)
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
×
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
=
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
C
B
A
1YX 1YX 1YX
X
X
X
33
22
11
3D
2D
1D
TN0074 3-constants calibration
9/13
Equation 20
The unknown can be calculated using the equations that follow.
Equation 21
Equation 22
where
and
To increase accuracy, more points can be used to solve the equation. An example 5-point
calibration is shown below. Similar to 3-point calibration, a matrix representation is formed:
Equation 23
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
×
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
=
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
F
E
D
1YX 1YX 1YX
Y
Y
Y
33
22
11
3D
2D
1D
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
=
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
−
3D
2D
1D
1
X
X
X
C
B
AM
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
=
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
3D
2D
1D
1
Y
Y
Y
F
E
DM
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
=
1YX 1YX 1YX
33
22
11
M
() ()
M
M
MAdj
det1
1=
−
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
×=
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
C
B
A
X
X
X
X
X
5D
4D
3D
2D
1D
M
3-constants calibration TN0074
10/13
Equation 24
where
Equation 23 and 24 are solved by multiplying both sides by (MTxM)-1x MTto get:
Equation 25
Equation 26
To simplify, the values of the unknowns are calculated as follows:
Equation 27
where
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
×=
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
F
E
D
Y
Y
Y
Y
Y
5D
4D
3D
2D
1D
M
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
=
1YX 1YX 1YX 1YX 1YX
55
44
33
22
11
M
()
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
×××=
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
−
5D
4D
3D
2D
1D
T
1
T
X
X
X
X
X
C
B
AMMM
()
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
×××=
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎝
⎛
−
5D
4D
3D
2D
1D
T
1
T
Y
Y
Y
Y
Y
F
E
DMMM
d/dF d/dE d/dD d/dC d/dB d/dA
3Y
2Y
1Y
3X
2X
1X
=
=
=
=
=
=