ST AN4038 Application note

AN4038

Application note

Guidelines to optimize proximity detection with STM8TL5xxx capacitive sensors

Introduction

The STM8TL5xxx is a microcontroller group targeting touch sensing applications. It offers a high performance capacitive sensing engine which uses the projected ProxsenseTM acquisition principle. Outstanding STM8TL5xxx performances allow long range proximity detections. This is a key feature for many end-applications such as personal navigation devices (PNDs) or stove tops which are equipped with backlighting that switches on when a user is detected. Proximity detectors are also implemented in white goods, automotive devices, palm tops, and on any type of kitchen or office appliance where the display needs to be turned on to allow some parameters to be adjusted by the user.

One of the key features of capacitive sensors versus conventional proximity detectors (such as infrared light sensors), is the low power scheme, µA versus mA. Such a low power scheme is a fundamental characteristic of power sensitive applications.

The events described in this document exist in all capacitive sensing implementations. Because of the high sensitivity required by proximity detection, their impact seems amplified compared to touch sensors and therefore must be considered with great care.

Every application has specific proximity detection requirements. The design of the proximity sensing electrode is the result of the sensing requirements of the application and of a careful analysis of what the sensor environment can become in the lifetime of the application. The purpose of this application note is to provide designer guidelines on how to construct proximity electrodes.

The information provided in this application note is based on tests performed using an STM8TL53xx device, but the information extracted is common for the whole STM8TL5xxx product group (see Table 1). The absolute performance values, such as detection distance, depends on the environmental test: STM8TL5x sensitivity setting and approach speed.

Table 1. Applicable products

Type

Part numbers

Microcontrollers

STM8TL52F4, STM8TL52G4, STM8TL53C4,

STM8TL53F4, STM8TL53G4

May 2012

Doc ID 022686 Rev 1

1/39

www.st.com

Contents

AN4038

 

 

Contents

1

Main factors influencing proximity sensitivity . . . . . . . . . . . . . . . . . . .

. 5

2

Test setup overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 6

 

2.1

Sensor performance measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

2.2

Test environment description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

3

STM8TL5xxx sensitivity setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

 

3.1

CS capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

 

3.2

Target reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

3.3

Detection threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

3.4

Electrode parasitic capacitance compensation (EPCC) . . . . . . . . . . . . . .

16

 

3.5

Approach speed and environmental change . . . . . . . . . . . . . . . . . . . . . .

17

4

Proximity sensor design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

 

4.1

Tx/Rx electrode spacing influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

 

4.2

Tx/Rx electrode length influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

4.3

Tx/Rx electrode width influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

4.4

Electrode size and shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

4.5

Ground coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

5

Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

6

Environmental variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

6.1

Power supply variation influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

6.2

Temperature and humidity variation influence . . . . . . . . . . . . . . . . . . . . .

33

6.2.1 Temperature influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 6.2.2 Humidity influence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

7

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

 

7.1

Practical example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

 

7.2

Influential parameters summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

8

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

2/39

Doc ID 022686 Rev 1

AN4038

List of tables

 

 

List of tables

Table 1. Applicable products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Table 2. Sensor board characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Table 3. Sensor board with ground surrounding characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Table 4. CS equivalent ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Table 5. Best detection range versus target reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Table 6. Detection range versus hand or finger approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Table 7. Detection range versus electrode ground surrounding. . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Table 8. Sensor parameter results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Table 9. influential parameters summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Table 10. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Doc ID 022686 Rev 1

3/39

List of figures

AN4038

 

 

List of figures

Figure 1.

Sensor board - Tx/Rx electrode spacing test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 6

Figure 2.

Sensor board - Tx/Rx electrode length test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 7

Figure 3.

Sensor board - Tx/Rx electrode width test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 7

Figure 4.

Sensor board - Tx/Rx electrode ground surrounding test. . . . . . . . . . . . . . . . . . . . . . . . . .

. 7

Figure 5.

Detection distance versus CS capacitor with fixed detection threshold . . . . . . . . . . . . . . .

10

Figure 6.

Noise versus CS capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

Figure 7.

Detection distance versus CS capacitor with best detection threshold . . . . . . . . . . . . . . . .

11

Figure 8.

Detection distance versus target reference with fixed detection threshold . . . . . . . . . . . . .

12

Figure 9.

Noise versus target reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

Figure 10.

Detection distance versus target reference with best detection threshold . . . . . . . . . . . . .

13

Figure 11.

Detection distance versus detection threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

Figure 12.

Detection threshold versus noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

Figure 13.

EPCC variation versus target reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

Figure 14.

Delta burst count versus hand distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

Figure 15.

Illustration of the theoretical projected capacitance equation . . . . . . . . . . . . . . . . . . . . . . .

18

Figure 16.

Detection distance versus Tx/Rx electrode spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

Figure 17.

Noise standard deviation versus Tx/Rx electrode spacing . . . . . . . . . . . . . . . . . . . . . . . . .

20

Figure 18.

Detection range versus Tx/Rx electrode length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

Figure 19.

Noise standard deviation versus Tx/Rx electrode length . . . . . . . . . . . . . . . . . . . . . . . . . .

21

Figure 20.

Detection range versus Tx/Rx electrode width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

Figure 21.

Noise standard deviation versus Tx/Rx electrode width . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

Figure 22.

EPCC versus Tx/Rx electrode width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

Figure 23.

Hand versus finger detection area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

Figure 24.

Detection area versus shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

Figure 25.

Influence of ground plane on projected capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

Figure 26.

Detection distance versus distance between ground plane and electrode

 

 

for dielectric material (FR4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

Figure 27.

Detection distance versus distance between ground backplane and

 

 

electrode for two dielectric materials (air and FR4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

Figure 28.

Detection area and detection distance versus ground surrounding . . . . . . . . . . . . . . . . . .

29

Figure 29.

Influence of panel on detection distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

Figure 30.

Detection distance versus front panel thickness. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

Figure 31.

Burst count variation versus VDD and target reference. . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

Figure 32.

Acquisition signal variation versus temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

Figure 33.

Air permittivity variation versus relative humidity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

Figure 34.

Two electrode designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4/39

Doc ID 022686 Rev 1

AN4038

Main factors influencing proximity sensitivity

 

 

1 Main factors influencing proximity sensitivity

To design a proximity sensor system using an STM8TL5xxx device, the following parameters must be considered:

STM8TL5xxx setting

Whatever the sensor design of an application, the detection distance can be fine tuned thanks to the STM8TL5xxx sensitivity. Sensitivity is determined by three parameters:

the sampling capacitance (CS), the target reference, and the detection threshold. The CS is a capacitor used to accumulate charge from the parasitic capacitor created by the sensor electrodes. The target reference is the gain and the detection threshold defines the detection trigger level. The higher the sensitivity is, the better the detection distance is, but the noise on the acquisition signal increases. When the noise increases, the threshold should be increased to filter the noise. However, this effectively decreases the sensitivity. A compromise must be defined between the detection range and the noise immunity.

The approach speed is one of the constraints of a proximity application. STM8TL5xxx

devices are able to compensate environmental change (temperature, VDD variation) thanks to the environment control system (ECS) feature. The response time of the ECS should be in line with the desired approach speed. The lower the approach speed is, the slower the compensation is.

Electrode design

The detection distance and detection area of a system are determined by the sensor design which is influenced by both the sensor size and shape. Generally, increasing the sensor size, increases the proximity detection distance. The electrode is built with two electrodes. The length, the width, and the spacing between the two electrodes are the three parameters that define the sensor and influence the detection distance.

Coupling with ground strongly influences the sensitivity of the proximity sensor system. Ground plane or ground surrounding are not recommended. The nearer the ground is from the proximity sensor, the lower the sensitivity is. But, the surrounding ground can have a beneficial effect on the directivity. The directivity can be an important parameter and can be improved by the electrode shape and the surrounding ground. In addition, the mechanical environment around the sensor can significantly modify the detection area and distance.

Front panel

Front panel materials and thickness modify the detection distance and the projected capacitance. The better the dielectric value is, the better the sensitivity of the sensors is.

Doc ID 022686 Rev 1

5/39

Test setup overview

AN4038

 

 

Environmental variation

Variation in the power supply level can disrupt the sensor measurement and cause unwanted proximity detection.

Temperature and humidity variations modify the electrical field of the sensor and affect the proximity detection range.

Designers with applications which are influenced by one of these parameters and which are susceptible to large variation should consider and evaluate the impact on the proximity sensing solution. The system should guarantee the stability of the detection to avoid any false detection.

Special care should be taken of the above factors to ensure stability of the systems. Excessive increase of a sensor’s sensitivity can cause an unstable system and trigger unwanted proximity detection.

2 Test setup overview

All information provided in this application note is based on tests performed using different hardware boards.

2.1Sensor performance measurements

The sensor performance measurements presented below were made using very basic sensors. These sensors were designed so that only one parameter was changed in each test series (length, width, clearance gap, etc). In this way, the influence of the ‘control’ parameter was clearly evaluated.

The sensors used for the tests are shown in Figure 1, Figure 2, Figure 3, and Figure 4. During testing, the sensors were connected to an STM8TL5xxx controller board: MCD10-016.

Figure 1. Sensor board - Tx/Rx electrode spacing test

 

 

 

 

 

 

-3 6

6/39

Doc ID 022686 Rev 1

AN4038

 

 

 

 

 

Test setup overview

 

 

 

 

 

 

Figure 2.

Sensor board - Tx/Rx electrode length test

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-3 6

 

 

 

 

 

 

Figure 3.

Sensor board - Tx/Rx electrode width test

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-3 6

 

 

 

 

Figure 4.

Sensor board - Tx/Rx electrode ground surrounding test

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-3 6

 

 

 

 

 

 

 

 

Doc ID 022686 Rev 1

7/39

Test setup overview

AN4038

 

 

Table 2 summarizes the sensor board characteristics.

Table 2.

Sensor board characteristics

 

 

Sensor board

Electrode spacing (mm)

Electrode length (mm)

Electrode width (mm)

 

 

 

 

 

#1

 

0.5

20

1.5

 

 

 

 

 

#2

 

1

20

1.5

 

 

 

 

 

#3

 

2

20

1.5

 

 

 

 

 

#4

 

5

20

1.5

 

 

 

 

 

#5

 

10

20

1.5

 

 

 

 

 

#6

 

20

20

1.5

 

 

 

 

 

#7

 

2

5

1.5

 

 

 

 

 

#8

 

2

10

1.5

 

 

 

 

 

#9

 

2

20

1.5

 

 

 

 

#10/#17/#18/

2

35

1.5

#19/#20

 

 

 

 

 

 

 

 

#11

 

2

50

1.5

 

 

 

 

 

#12

 

2

20

0.21

 

 

 

 

 

#13

 

2

20

1

 

 

 

 

 

#14

 

2

20

1.5

 

 

 

 

 

#15

 

2

20

3

 

 

 

 

 

#16

 

2

20

5

 

 

 

 

 

Table 3.

Sensor board with ground surrounding characteristics

 

Sensor board

#17

#18

#19

#20

 

 

 

 

 

 

Surrounding distance (mm)

No ground

2

5

10

surrounding

 

 

 

 

 

 

 

 

 

 

 

8/39

Doc ID 022686 Rev 1

AN4038

Test setup overview

 

 

2.2Test environment description

The detection distance measurements were performed automatically using a three-axes table. The table simulated the approach of a finger or hand and guaranteed high precision and repeatability of the measurement. The finger was simulated by a conductive pen (diameter 10 mm) and the hand with a copper plate (80 mm x 80 mm). The approach speed used for the detection distance was 60 mm/second.

The default parameters for measurements of the STM8TL5xxx were:

CS (sampling capacitor) = 0 (register value)

Target reference value = 1000

Threshold = 30

The front panel, which was used with all sensors, was made of acrylic material with a 1.5 mm thickness. It was glued to the sensor board with a 100 µm of pressure sensitive adhesive.

The noise graphs in this application note are expressed by the standard deviation. The standard deviation (see Equation 1) is used to measure the dispersion or variability that exists from the mean (average) value.

Equation 1: Standard deviation

 

n 1 ( Xi

 

)2

σ =

X

----------------------

 

n 1

 

= 0

 

 

 

Where X is the mean of the sampled values. The standard deviation was calculated using 5000 samples.

The firmware test developed for the detection distance measurements is based on the STM8TL5x_STMTouch_Lib_V0.1.0.

Doc ID 022686 Rev 1

9/39

STM8TL5xxx sensitivity setting

AN4038

 

 

3 STM8TL5xxx sensitivity setting

STM8TL5xxx sensitivity can be configured and is defined by the following three parameters:

CS sampling capacitor(Section 3.1)

Target reference (Section 3.2)

Detection threshold (Section 3.3)

3.1CS capacitor

The CS capacitor is used to accumulate charge from the capacitor created by the sensor. It is implemented on-chip. The CS capacitor value is selected by choosing a ratio from a constant capacitor. Table 4 shows the chosen ratios versus the CS register values. The higher the ratio is, the higher the CS capacitance is.

Table 4.

 

 

CS equivalent ratio

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CS

0

 

1

2

8

3

4

5

9

6

10

16

 

11

7

12

17

13

18

19

14

24

15

20

25

21

26

22

27

23

28

29

30

31

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ratio

2

 

3

4

5

6

7

9

9

12

12

14

 

15

16

21

21

27

28

35

36

36

48

49

54

63

72

84

90

112

126

162

216

288

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The CS capacitor value influences the detection distance and the noise on the measured signal with a fixed detection threshold. This influence is illustrated in Figure 5.

Figure 5. Detection distance versus CS capacitor with fixed detection threshold

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DISTANCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$ETECTION

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

##3RATIO

 

 

 

 

 

 

 

 

 

 

-3 6

Note:

The detection threshold value is fixed at 30 regardless of the target reference.

The higher the CS capacitor is, the lower the detection distance is. However, as shown in Figure 6, the higher the CS capacitor is, the lower the noise is.

10/39

Doc ID 022686 Rev 1

ST AN4038 Application note

AN4038

STM8TL5xxx sensitivity setting

 

 

Figure 6. Noise versus CS capacitor

 

 

 

 

 

 

 

 

COUNT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BURST

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DEVIATION

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3TANDARD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

##3RATIO

 

 

 

 

 

 

 

 

 

 

-3 6

When the detection threshold (Dth) is adjusted regarding the noise level (see Section 3.3: Detection threshold), it is not influenced by the CS capacitor value. Figure 7 shows the detection distance versus the CS capacitor with the best detection threshold value. This test was performed using sensor #10 (see Figure 2).

Figure 7. Detection distance versus CS capacitor with best detection threshold

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DISTANCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$ETECTION

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#S RATIO

 

 

 

 

 

 

 

 

 

 

-3 6

With an optimized detection threshold, the CS value has no effect on the detection distance.

Doc ID 022686 Rev 1

11/39

STM8TL5xxx sensitivity setting

AN4038

 

 

3.2Target reference

The target reference determines the gain of the system. The influence of the target reference on the detection distance is illustrated in Figure 8. This test was performed with a fixed detection threshold value using sensor #10 (see Figure 2).

Figure 8. Detection distance versus target reference with fixed detection threshold

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MM

 

 

 

 

 

 

 

$ETECTIONNDISTANCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4ARGET REFERENCE BURSTTCOUNT

 

 

 

 

 

 

 

 

 

-3 6

Note:

The detection threshold value is fixed at 30 regardless of the target reference.

The higher the target reference is, the better the detection distance is. Increasing the target reference, also increases the acquisition time as more charge transfer cycles are required.

The choice of sensitivity directly influences noise on the acquisition signal. Noise increases when sensitivity increases. Figure 9 shows the influence of the target reference on the noise standard deviation and on the maximum noise delta variation (signal - reference). This test was performed using sensor #10 (see Figure 2).

12/39

Doc ID 022686 Rev 1

Loading...
+ 27 hidden pages