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 HTSSOP38 User manual

ST

ST HTSSOP38 User manual

ST STEVAL-OET005 User manual

ST

ST STEVAL-OET005 User manual

ST X-NUCLEO-IHM09M2 User manual

ST

ST X-NUCLEO-IHM09M2 User manual

ST CLT01-38SQ7 User manual

ST

ST CLT01-38SQ7 User manual

ST STM32F038 6 Series User manual

ST

ST STM32F038 6 Series User manual

ST STEVAL-C34KAT1 User manual

ST

ST STEVAL-C34KAT1 User manual

ST X-NUCLEO-OUT02A1 User manual

ST

ST X-NUCLEO-OUT02A1 User manual

ST STM32MP157D-DK1 User manual

ST

ST STM32MP157D-DK1 User manual

ST STNRG328S User manual

ST

ST STNRG328S User manual

ST ControlBD-7FMC2 User manual

ST

ST ControlBD-7FMC2 User manual

ST X-NUCLEO-IHM02A1 User manual

ST

ST X-NUCLEO-IHM02A1 User manual

ST X-NUCLEO-53L3A2 User manual

ST

ST X-NUCLEO-53L3A2 User manual

ST STEVAL-IFP044V1 User manual

ST

ST STEVAL-IFP044V1 User manual

ST X-NUCLEO-IHM12A1 User manual

ST

ST X-NUCLEO-IHM12A1 User manual

ST STSW-L9026-Y0 User manual

ST

ST STSW-L9026-Y0 User manual

ST X-NUCLEO-IHM08M1 User manual

ST

ST X-NUCLEO-IHM08M1 User manual

ST X-NUCLEO-OUT06A1 User manual

ST

ST X-NUCLEO-OUT06A1 User manual

ST STA309A User manual

ST

ST STA309A User manual

ST X-NUCLEO-OUT01A1 User manual

ST

ST X-NUCLEO-OUT01A1 User manual

ST STSW-L9961BMS User manual

ST

ST STSW-L9961BMS User manual

ST PCC020V1 User manual

ST

ST PCC020V1 User manual

ST X-NUCLEO-EEPRMA1 User manual

ST

ST X-NUCLEO-EEPRMA1 User manual

ST UM0575 User manual

ST

ST UM0575 User manual

ST TIP120 User manual

ST

ST TIP120 User manual

Popular Computer Hardware manuals by other brands

EMC2 VNX Series Hardware Information Guide

EMC2

EMC2 VNX Series Hardware Information Guide

Panasonic DV0PM20105 Operation manual

Panasonic

Panasonic DV0PM20105 Operation manual

Mitsubishi Electric Q81BD-J61BT11 user manual

Mitsubishi Electric

Mitsubishi Electric Q81BD-J61BT11 user manual

Gigabyte B660M DS3H AX DDR4 user manual

Gigabyte

Gigabyte B660M DS3H AX DDR4 user manual

Raidon iT2300 Quick installation guide

Raidon

Raidon iT2300 Quick installation guide

National Instruments PXI-8186 user manual

National Instruments

National Instruments PXI-8186 user manual

Hauppauge WinTV-HVR-2250 Quick installation guide

Hauppauge

Hauppauge WinTV-HVR-2250 Quick installation guide

Kontron CP6002 user guide

Kontron

Kontron CP6002 user guide

Manhattan 702843 user manual

Manhattan

Manhattan 702843 user manual

Aphex 230 instruction manual

Aphex

Aphex 230 instruction manual

Intel NUC 12 Pro user guide

Intel

Intel NUC 12 Pro user guide

Galaxy GHDX2-2430S-24F4D Installation and hardware reference manual

Galaxy

Galaxy GHDX2-2430S-24F4D Installation and hardware reference manual

Intel AXXRMFBU4 Quick installation user's guide

Intel

Intel AXXRMFBU4 Quick installation user's guide

Kontron DIMM-PC/MD product manual

Kontron

Kontron DIMM-PC/MD product manual

STEINWAY LYNGDORF SP-1 installation manual

STEINWAY LYNGDORF

STEINWAY LYNGDORF SP-1 installation manual

Advantech ASMB-935 Series user manual

Advantech

Advantech ASMB-935 Series user manual

Jupiter RAM PACK instructions

Jupiter

Jupiter RAM PACK instructions

Measurement Computing CIO-EXP-RTD16 user manual

Measurement Computing

Measurement Computing CIO-EXP-RTD16 user manual

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