AN2970
1
1
ai15544
Sensing electrode
Application note
Principles of capacitive touch and proximity sensing technology
The objective of this document is to present the principles of capacitive sensing and charge
transfer used in STMicroelectronics STM8T and STM8TS capacitive sensors. All devices
can be configured in touch or proximity sensing.
1 Capacitive sensing overview
1.1 Sensing electrode capacitance
A capacitance exists between any reference point relative to ground as long as they are
electrically isolated. If this reference point is a sensing electrode, it helps to think of it as a
capacitor. The positive electrode of the capacitor is the sensing electrode, and the negative
electrode is formed by the surrounding area (virtual ground reference, labelled 1 in
Figure 1).
When a conductive object is brought into proximity of the sensing electrode, the coupling
between the object and the electrode increases, together with the capacitance of the
sensing electrode relative to ground. For example, a human hand will increase the sensing
electrode capacitance as it approaches it. Touching the dielectric panel that protects the
electrode increases its capacitance significantly.
The sensing electrode can be made of any electrically conductive material, such as copper
on PCBs, or transparent conductive material like Indium Tin Oxide (ITO) deposited on glass
or Plexiglas.
Figure 1. Coupling with hand increases the capacitance of the sensing electrode
May 2009 DocID 15625 Rev 1 1/8
www.st.com
Capacitive sensing overview AN2970
1.2 Principles of charge transfer
The sensing electrode is connected to the CX pin of the STM8T or STM8TS device. The
equivalent capacitance of the sensing electrode is referred to as C
C
is fully charged with a stable reference voltage VDD. The charge on CX is transferred to a
X
reference capacitor (C
C
. The process is repeated until the voltage on CS reaches a threshold (approximately
X
20% of V
). This threshold is referred to as V
DD
to reach the threshold represents the size of C
). CS capacitance is typically from 1000 to 100,000 times bigger than
S
. The number of transfer cycles required
TRIP
. Refer to Figure 3 and Ta bl e 1 for a
X
representation of the charge-transfer equivalent hardware and charge-transfer sequence for
a given channel.
Figure 2. Depiction of channel charge-transfer hardware
34-443CAPACITIVESENSINGBLOCK
.
X
3TABLE6
$$
3
3
3
#8
3ENSINGELECTRODE
2EFERENCE
#APACITOR
#S
42)0
'%.%2!4%$
3TABLE
REFERENCE
Table 1. Charge transfer sequence
(1)
Step Switch S3 Switch S2 Switch S1 Description
11 0 1 C
2 0 0 0 Deadtime
BJ
discharge
S
3 0 1 0 Charge cycle (CX charge)
4 0 0 0 Deadtime
5 0 0 1 Transfer cycle (charge transferred to C
6 0 0 0 Deadtime
71 0 1 C
1. Step 2 to 7 are repeated until the voltage across C
2/8 DocID 15625 Rev 1
reaches V
S
TRIP
threshold.
discharge
X
)
S
AN2970 Capacitive sensing overview
T
#HARGECYCLEDURATION
!I
6
42)0
#3PINVOLTAGE
3AMPLINGPERIOD
Figure 3 and Figure 4 show the evolution of the CX voltage during one and five charge
transfer sequences, respectively. The transfer cycle refers to the charging of C
transfer of the charge to the C
C
to V
S
using a sequence of transfer cycles. The charge cycle duration refers to the time
TRIP
needed to complete one C
capacitor. The charge cycle refers to process of charging
S
charge cycle when no proximity or touch (thus the longest
S
and the
X
duration of a charge cycle with the current system parameters). The charge cycles can be
probed from the CS pin. It is graphically illustrated in Figure 5. Refer to Section 1.4: C
capacitor for details on how to select C
capacitors.
S
S
In addition, the devices can compensate to environmental changes by tracking the average
capacitance of the sensing electrode. This average value is compared to the latest charge
cycle to determine whether a proximity or touch occurred.
Figure 3. Voltage across C
Figure 4. Voltage across C
over a full charge transfer sequence
X
over the first 5 charge transfers
X
Figure 5. Charge cycle
DocID 15625 Rev 1 3/8