AN2970
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.
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.
Sensing electrode
1 |
|
|
|
|
|
|
|
1 |
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ai15544
May 2009 |
DocID 15625 Rev 1 |
1/8 |
www.st.com
Capacitive sensing overview |
AN2970 |
|
|
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 CX.
CX is fully charged with a stable reference voltage VDD. The charge on CX is transferred to a reference capacitor (CS). CS capacitance is typically from 1000 to 100,000 times bigger than CX. The process is repeated until the voltage on CS reaches a threshold (approximately
20% of VDD). This threshold is referred to as VTRIP. The number of transfer cycles required to reach the threshold represents the size of CX. Refer to Figure 3 and Table 1 for a
representation of the charge-transfer equivalent hardware and charge-transfer sequence for a given channel.
34- 4 43 CAPACITIVE SENSING BLOCK |
|
|
3TABLE 6$$ |
|
|
3 |
#8 |
3ENSINGSELECTRODE |
|
|
|
3 |
|
2EFERENCE |
3 |
#S |
#APACITOR |
42)0 |
|
|
'%.%2!4%$% |
|
|
3TABLE |
|
|
REFERENCE |
|
|
|
|
BJ |
Table 1. |
Charge transfer sequence (1) |
|
||
Step |
Switch S3 |
Switch S2 |
Switch S1 |
Description |
|
|
|
|
|
1 |
1 |
0 |
1 |
CS discharge |
2 |
0 |
0 |
0 |
Deadtime |
|
|
|
|
|
3 |
0 |
1 |
0 |
Charge cycle (CX charge) |
4 |
0 |
0 |
0 |
Deadtime |
|
|
|
|
|
5 |
0 |
0 |
1 |
Transfer cycle (charge transferred to CS) |
6 |
0 |
0 |
0 |
Deadtime |
|
|
|
|
|
7 |
1 |
0 |
1 |
CX discharge |
1. Step 2 to 7 are repeated until the voltage across CS reaches VTRIP threshold.
2/8 |
DocID 15625 Rev 1 |
AN2970 |
Capacitive sensing overview |
|
|
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 CX and the transfer of the charge to the CS capacitor. The charge cycle refers to process of charging CS to VTRIP using a sequence of transfer cycles. The charge cycle duration refers to the time needed to complete one CS charge cycle when no proximity or touch (thus the longest 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: CS capacitor for details on how to select CS capacitors.
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.
#3 PIN VOLTAGE
3AMPLING PERIOD
#HARGE CYCLE DURATION
642)0
T
!I
DocID 15625 Rev 1 |
3/8 |