文档库 最新最全的文档下载
当前位置:文档库 › STMTouch For STM8 STM32L_ST触摸按键应用笔记

STMTouch For STM8 STM32L_ST触摸按键应用笔记

AN2869

Application note Guidelines for designing touch sensing applications 1 Introduction

This application note describes the layout and mechanical design guidelines used for touch

sensing applications.

Capacitive sensing interfaces provide many advantages compared to mechanical user

interfaces. They:

●offer a modern look and feel

●are easy to clean

●are waterproof

●are robust

Capacitive sensing interfaces are more and more used in a wide range of applications.

The main difficulty designing such interfaces is to ensure that none of the items interfere

with each other.

This document provides simple guidelines covering three main aspects:

1.Printed circuit board (PCB)

2. Overlay and panel materials

3. All other items in the capacitive sensor environment

Depending on which application you are designing, you may not need to refer to all of the

contents of this document. Y ou can go to the appropriate section after reading the common

part which contains the main capacitive sensing guidelines. For example, if you are

developing an application with only projected electrode, you should first read the main

capacitive sensing guidelines and then go through the sections giving specific

recommendations for projected electrode designs.

October 2011Doc ID 15298 Rev 51/47

https://www.wendangku.net/doc/352766634.html,

Contents AN2869

Contents

1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2Capacitive sensing technology in ST . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1RC acquisition principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2Charge transfer acquisition principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.3Surface ProxSense TM acquisition principle . . . . . . . . . . . . . . . . . . . . . . . . 6

2.4Projected ProxSense TM acquisition principle . . . . . . . . . . . . . . . . . . . . . . . 6

2.5Surface capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.6Projected capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3Main capacitive sensing guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.2Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.2.1Substrates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.2.2Electrode and interconnection materials . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2.3Panel materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.2.4Mechanical construction and PCB to panel bonding . . . . . . . . . . . . . . . 14

3.2.5Metal chassis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2.6Air gap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2.7Transfer of an electrode from PCB to the front panel . . . . . . . . . . . . . . . 15

3.3Placing of LEDs close to sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.4Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4Surface electrode design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4.1Touchkey sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4.2Touchkey matrix sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.3Linear sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.3.1Normal patterned linear sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.3.2Interlaced linear sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.4Rotary sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.4.1Normal patterned rotary sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.4.2Interlaced patterned rotary sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.4.3Rotary sensor with central touchkey . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2/47Doc ID 15298 Rev 5

AN2869Contents

4.5Specific recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.5.1LEDs and sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.5.2Driven shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.5.3Using electrodes separated from the PCB . . . . . . . . . . . . . . . . . . . . . . 29

4.5.4PCB and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.5.5Component placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.5.6Ground considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.5.7Rotary and linear sensor recommendations . . . . . . . . . . . . . . . . . . . . . 33

5Projected electrode design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.1Touchkey sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.1.1Symmetrical Rx and Tx electrodes - diamond type . . . . . . . . . . . . . . . . 35

5.1.2Symmetrical Rx and Tx - square with one gap . . . . . . . . . . . . . . . . . . . 36

5.1.3Asymmetrical Rx and Tx - Tx square with Rx wire . . . . . . . . . . . . . . . . 37

5.1.4Asymmetrical Rx and Tx - interlacing teeth . . . . . . . . . . . . . . . . . . . . . . 38

5.2Linear sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.3Rotary sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.4Specific recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.4.1Mounting electrodes separately from the PCB . . . . . . . . . . . . . . . . . . . 41

5.4.2PCB and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 7Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Doc ID 15298 Rev 53/47

List of tables AN2869 List of tables

Table 1.Potential application problems with flex PCB placement . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Table 2.Dielectric constants of common materials used in a panel construction. . . . . . . . . . . . . . . 13 Table 3.Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4/47Doc ID 15298 Rev 5

AN2869List of figures List of figures

Figure 1.Equivalent touch sensing capacitances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Figure 2.Example of capacitive sensor construction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 3.Clear ITO on PET with silver connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Figure 4.Silver printing on PET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Figure 5.Flexible PCB (FPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Figure 6.FR4 (2-sided epoxy-fiberglass). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Figure 7.Typical panel stack-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Figure 8.Examples of cases where a LED bypass capacitor is required . . . . . . . . . . . . . . . . . . . . . 16 Figure 9.Typical power supply schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Figure 10.Sensor size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Figure 11.Recommended electrode size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Figure 12.Simple matrix implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Figure 13.Normal patterned linear sensor with five electrodes (20-50 mm long) . . . . . . . . . . . . . . . . 21 Figure 14.Interlaced slider with three elements (up to 60 mm long). . . . . . . . . . . . . . . . . . . . . . . . . . 22 Figure 15.Normal patterned rotary sensor (three electrodes). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Figure 16.Interlaced patterned rotary sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Figure 17.Back-lighting touchkey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Figure 18.STM8T141 driven shield solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Figure 19.Simple driven shield using RC acquisition principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Figure 20.STM8L1xx driven shield example using the charge-transfer acquisition principle . . . . . . . 27 Figure 21.STM32L driven shield example using the charge-transfer acquisition principle. . . . . . . . . 28 Figure 22.Printed electrode method showing several connection methods . . . . . . . . . . . . . . . . . . . . 29 Figure 23.Spring and foam picture (both are not compressed) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Figure 24.Track routing recommendation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 25.Ground plane example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figure 26.Hatched ground and signal tracks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figure 27.Electric field between 2 surface electrodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Figure 28.Diamond implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Figure 29.Square with one gap implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Figure 30.Two-layer implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Figure 31.Projected touchkey sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Figure 32.Merged Tx regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Figure 33.Single layer linear sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Figure 34.Single layer rotary sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Figure https://www.wendangku.net/doc/352766634.html,ing a spring in a projected touch sensing design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Figure 36.Effect of a touch with a spring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Figure 37.Ground floods around Tx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Figure 38.Cross-section of a multi-layer PCB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Figure 39.Potential false key detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Doc ID 15298 Rev 55/47

2 Capacitive sensing technology in ST

STMicroelectronics offers different capacitive sensing technologies for STM8 and STM32

family products. These technologies are based on:

●The RC acquisition principle for STM8S and STM8L.

●The charge transfer acquisition principle for STM8L and STM32L.

●The surface ProxSense TM acquisition principle for STM8T14x.

●The projected ProxSense TM acquisition principle for STM8TL53xx.

Note:ProxSense? is a trademark of Azoteq.

principle

acquisition

2.1 RC

The RC acquisition principle is based on the charging/discharging time measurement of an

electrode capacitance through a resistor. When the electrode is touched, the

charging/discharging time increases and the variation is used to detect the finger proximity.

The RC acquisition principle is detailed in AN2927.

2.2 Charge

transfer acquisition principle

The charge transfer acquisition principle uses the electrical properties of the capacitor

charge (Q). The electrode capacitance is repeatedly charged and then discharged in a

sampling capacitor until the voltage on the sampling capacitor reaches a given threshold.

The number of transfers required to reach the threshold is a representation of the size of the

electrode’s capacitance. When the electrode is “touched”, the charge stored on the

electrode is higher and the number of cycles needed to charge the sampling capacitor

decreases.

ProxSense TM acquisition principle

2.3 Surface

The surface ProxSense TM acquisition principle is similar to the charge transfer one except

that the acquisition is fully managed by a dedicated hardware IP providing improved

performance. For more information, please refer to the application note AN2970.

ProxSense TM acquisition principle

2.4 Projected

The projected ProxSense TM acquisition principle is a measurement of a charge transferred

by a driven electrode to another one. Like the charge transfer, there is also a sampling

capacitor which stores the charges coming from the electrodes which form a coupling

capacitor with less capacitance than the sample one. When a finger approaches, the

dielectric (between the two electrodes) is modified and so the capacitance also changes. As

a consequence, the time taken to load the sample capacitor becomes different and this

difference is used to detect if a finger is present or not.

6/47Doc ID 15298 Rev 5

capacitance

2.5 Surface

A capacitance is modified when a finger get close to a sensing electrode.

The return path goes either through:

● a capacitor to ground through the user’s feet

● a capacitor between the user hand and the device

● a capacitor between the user’s body and the application board through the air (like an

antenna)

Background

C X is the parasitic capacitance of the electrode.

C X is composed of two capacitances: the first, refers to earth which is neglible and can be

ignored and the second, refers to the application ground which is dependent on the PCB or

the board layout. This latter parasitic capacitance includes the GPIO pad capacitance and

the coupling between the electrode tracks and the application ground.

The PCB and board layout must be designed to minimize this parasitic capacitance.

C F is the feedback capacitance between earth and the application. Its influence is important

in surface capacitance touch sensing applications, especially for applications which do not

feature a direct connection to earth

C T is the capacitance created by a finger touch and it is the source of the useful signal. Its

reference is earth and not the application ground.

The total capacitance measured is a combination of C X, C F and C T where only C T is

meaningful for the application. So we measure C X plus C T in parallel with C F, which is given

by the formula: C X + 1 / ((1 / C T ) + ( 1 / C F ) ).

Doc ID 15298 Rev 57/47

2.6 Projected

capacitance

A capacitor is modified when the finger get close to a sensing electrode. The finger changes

the dielectric properties.

The return path is on the sensor itself. The finger only modifies the capacitor dielectric

element.

8/47Doc ID 15298 Rev 5

Doc ID 15298 Rev 59/47

3 Main capacitive sensing guidelines

3.1 Overview

A surface or projected capacitive sensor is generally made up of the following different

layers:

A fiberglass PC

B ●

A set of electrodes made of a copper pad ●

A panel made of glass, plexiglass, or any nonconductive material ● A silk screen printing 3.2 Construction

3.2.1 Substrates

The substrate is the base material carrying the electrodes.

A substrate can be chosen among any nonconducting material, in practice, PC

B materials

(e.g. FR4, CEM-1), acrylics like Polyethylene Terephthalate (PET), or Polycarbonate can be

used. Glass is also an excellent material for this purpose.

In many cases, the substrate which is used in electronic application will also work well for

capacitive sensing. Special care is required to avoid materials which can retain water

contained in the atmosphere (e.g. hygroscopic material such as paper based).

Unfortunately, this would modify ε

R (relative permittivity) with environmental conditions.It is not recommended to directly set the substrate against the front panel without gluing it by

pressure or by bonding. Some moisture or air bubbles can appear between them and cause

a change on the sensitivity. Indeed, if the substrate and the panel are closely linked together

Glass/plexiglass panel Silkscreen printing Copper pad (Cu)

electrode

Fiberglass PCB

this will avoid a varying sensitivity loss which is hard to predict (when the air bubbles are

greater than 2 mm diameter). Hence the way used is to strongly glue them all mechanically

or with a suitable bonding material.

It is possible to construct sensors that do not rely on a substrate. These are described in this

document under separate sections (Section3.2.7, Section4.5.3 and Chapter5.4.1).

3.2.2 Electrode and interconnection materials

Generally, an electrode is made with the following materials: copper, carbon, silver ink,

Orgacon TM or Indium Tin Oxyde (ITO).

The resistance to electric current of a material is measured in ohm-meters (Ωm). The lower

this degree of resistivity the better, as well as a good RC time constant. That’s why

interconnections will be made with low Ωm material. e.g. a printed silver track at 15.9 nΩm

that is 100 mm long, 0.5 mm wide and 0.1 mm thick (so the area is 0.05 mm2) will have a

resistance of 32 μΩ.

About metal deposition, another well-known approach is to consider the Ω/?(a) of a

material. For instance, you can compare silver and ITO (which is about 10 times greater)

and deduce which material is well suited for the connections.

Figure 3.Clear ITO on PET with silver connections

a.Pronounced “Ohms per square” and also called sheet resistance, if you know this constant (given by the

manufacturer) and how many squares are put in series, you can deduce the overall resistance of the line.

10/47Doc ID 15298 Rev 5

Doc ID 15298 Rev 511/47

Figure 4.Silver printing on PET More and more applications need a flex PCB or FFC/FPC (a) to interconnect circuitry, it is

suitable provided that the overall application is mechanically stable. Furthermore the FPC

tracks will be part of the touch sensor. So if the flex moves a little bit, even a few

micrometers, the capacitance to its surroundings will definitely change and might be

significant, causing false touch detections or drops in sensitivity. Putting the flex in close

proximity to a metal chassis or other signals, or on top of noisy circuitry, can cause problems

as well (loss of sensitivity or spurious detection).

a.FFC = Flat Flexible Conductor, FPC = Flexible Printed Circuit

Table 1.Potential application problems with flex PCB placement

When the flex PCB is in close proximity to...

...the following can occur....the ground or to a metal chassis

connected to the ground.

...the sensitivity is reduced.... a floating metal object or to a floating

metal chassis

... the object or the chassis conducts the touch to the electrode ... a source of noise ... the acquisition will be strongly perturbed

and so the touchkey will become non-usable

Figure 5.Flexible PCB (FPC)

Figure 6.FR4 (2-sided epoxy-fiberglass)

materials

3.2.3 Panel

Y ou can choose the panel material which best suits your application. This panel material

MUST NOT be conductive. The material characteristics impact the sensor performance,

particularly the sensitivity.

Dielectric constant

The panel is the main item of the capacitor dielectric between the finger and the electrode.

Its dielectric constant (εR) differentiates a material when it is placed in an electric field. The

propagation of the electric field inside the material is given by this parameter. The higher the

dielectric constant, the better the propagation.

Glass has a higher εR than most plastics (see Table2: Dielectric constants of common

materials used in a panel construction). Higher numbers mean that the fields will propagate

through more effectively. Thus a 5 mm panel with an εR of 8 will perform similarly in

sensitivity to a 2.5 mm panel with a relative epsilon of 4, all other factors being equal.

A plastic panel up to 10 mm thick is quite usable, depending on key spacing and size. The

circuit sensitivity needs to be adjusted during development to compensate for panel

thickness, dielectric constant and electrode size.

The thicker a given material is, the worse the SNR. For this reason, it is always better to try

and reduce the thickness of the front panel material. Materials with high relative dielectric

constants are also preferable for front panels as they help to increase SNR.

12/47Doc ID 15298 Rev 5

Doc ID 15298 Rev 513/47Table 2.Dielectric constants of common materials used in a panel construction

Sensitivity

A useful parameter to consider with panel material and thickness(t) is the electric field

equivalent vacuum thickness T V .

Equation 1

where t is the thickness of the dielectric.

T V is the thickness of vacuum with an electric field conduction equivalent to that of the

material. The smaller it is, the easier the field can reach through. Panels with the same T V

make keys with identical sensitivity. This works for both directions of course and may be

used to evaluate the touch sensitivity from the back side of the application.

For a panel built from a stack of different materials, it is possible to add the vacuum

equivalent thickness of each layer:

Equation 2

Each material has an influence on the sensitivity. So the equation can be used when, for

example, the electrodes are on the bottom surface of the PCB substrate, then the thickness

and ε

R of the substrate will be also factors of the global sensitivity.Material

εR Air

1.00059Glass

4 to 10Sapphire glass

9 to 11Mica

4 to 8Nylon

3Plexiglass

3.4Polyethylene

2.2Polystyrene

2.56Polyethylene terephthalate (PET)

3.7FR4 (fiberglass + epoxy)

4.2PMMA (Poly methyl methacrylate)

2.6 to 4T ypical PSA 2.0 -

3.0 (approx.)

T V t εR

-----=T V STACK ()T V layers ()∑

=

construction and PCB to panel bonding

3.2.4 Mechanical

In order to ensure stable touch detection, the PCB must always be at the same place on the

panel. The slightest variation, as small as 100 microns may lead to differences in the signal

which can be detected. This must be avoided to ensure the integrity of the touch detection.

The panel and other elements of the device must not be moved, or only as little as possible,

by the user’s finger. T o avoid this kind of problem, glue, compression, co-convex surfaces

can be used to mechanically stabilize the PCB and the panel very close together.

In the list of the different ways to achieve this we can put: heat staking plastic posts, screws,

ultrasonic welding, spring clips, non-conductive foam rubber pressing from behind, etc.

Normal construction is to glue a sensor to a front panel with Pressure Sensitive Adhesive

(PSA). 3M467 or 468 PSAs work very well.

14/47Doc ID 15298 Rev 5

chassis

3.2.5 Metal

A metal chassis behind a touch sensor is a good path to the ground and tends to reduce the

sensitivity of the touch response in case there is a significant area of overlap. Such a

metallic surface must never be electrically floating as it makes the whole product unstable in

terms of touch detection. This is also applicable for any conductive decorative feature close

to the sensor.

Metal chassis and decorative items must be grounded or connected to the driven shield (see

Section4.5.2: Driven shield) if it is implemented.

Metallic paints can be an issue if they contain conductive particles. Low particle density

paint is recommended.

gap

3.2.6 Air

Due to its dielectric constant, air can be used as an isolator. An air gap reduces the touch

sensitivity when it is in the touch side stack. However, in some conditions, air can be useful

to reduce the ground loading in the nontouch side stack. Such ground loading can be due to

the metal chassis or an LCD. For instance, when designing a touch-screen solution, an air

gap of 0.5mm to 1mm between the LCD and the touch sensor is recommended. Air gaps

also help to reduce the sensitivity of the back side of a portable device.

3.2.7 Transfer of an electrode from PCB to the front panel

It is possible to use a conducting cylinder or a compressed spring to achieve a transfer of an

electrode from a PCB to the front panel.Please refer to Section4.5.3 or Section5.4.1 for

further information.

Doc ID 15298 Rev 515/47

3.3 Placing of LEDs close to sensors

Light-emitting diodes (LEDs) are very often implemented near capacitive sensor buttons on

application boards. The LEDs are very useful for showing that the button has been correctly

touched. When designing applications boards with LEDs, the following considerations must

be taken into account:

●LEDs change capacitance when switched on and off

●LED driver tracks can change impedance when switched on and off

●LED load current can affect the power rail

Both sides of the LEDs must always follow the low impedance path to ground (or power).

Otherwise, the LEDs should be bypassed by a capacitor to suppress the high impedance

(typically 10 nF).

The examples of bypass capacitors for the LEDs using a driver (Figure8) can also be

applied to transistors.

16/47Doc ID 15298 Rev 5

3.4 Power

supply

In order to reduce system costs, a regulator, which is fully dedicated to touch sensing, is

already embedded in the devices of the STM8T family. For other devices without a touch

sensing dedicated regulator, it is strongly recommended to use an external voltage regulator

to power the device only.

The voltage regulator must be chosen to provide a stable voltage without any ripple. The

actual precision of the voltage is not important, but the noise rejection feature is critical. This

voltage is used to drive C X and is also used as a reference when measuring the sampling

capacitor (C S). Any variation of this voltage may induce measurement variations which

could generate a false touch or a missed touch. For instance, a ±10 mV peak to peak

variation on V DD, limits the resolution of linear sensor or rotary sensor to 4 or 5 bits.

The voltage regulator should be placed as far as possible from the sensors and their tracks.

The voltage regulator also acts as a filter against noise coming from the power supply. So, it

is recommended to power any switching components, such as LEDs, directly from V DD and

not from the regulated voltage (see Figure9).

1.Typical voltage regulator LD2980 can be used.

Doc ID 15298 Rev 517/47

Surface electrode design AN286918/47Doc ID 15298 Rev 5

4 Surface electrode design

4.1 Touchkey sensor

A touchkey can be either touched or untouched by the user. So the information that is

managed by the microcontroller is a binary one (e.g. ‘0’ for untouched and ‘1’ for touched).

The sensor can be any shape, however it is recommended to use round or oval as these

shapes are the simplest. The libraries and hardware cells automatically compensate for

capacitance differences, but the acquisition time and processing parameters can be

optimized if the electrodes have similar capacitance. For this reason, it is recommended to

use the same shape for all electrodes. The touchkeys can be customized by the drawing on

the panel.

When designing touchkey sensors, two parameters must be taken into account:

1.

The object size to be detected 2. The panel thickness

Regarding object size (see Figure 10), it is recommended to design a sensor in the same

range as the object to be detected. In most cases, it is a finger.

AN2869Surface electrode design

Doc ID 15298 Rev 519/47

Regarding panel thickness, the touchkey must be at least four times as wide as the panel is

thick. For example, a panel which is 1.5 mm thick and has no immediately adjacent ground

layer, must have a touchkey which is at least 6 mm in diameter if the key is round, or have a

6 mm side if the key is square (see Figure 11). There are sensitivity issues if dimensions

lower than these values are used.Figure 11.Recommended electrode size

As shown in Equation 3, a capacitor is used to detect the finger touch. The capacitor is

proportional to the size of the electrode. Increasing the electrode area allows the capacitor

to be maximized, but increasing the electrode size above the size of a finger touch only

increases the parasitic capacitance and not the finger touch capacitance, resulting in lower

relative sensitivity. Refer to Section 4.5.4: PCB and layout . There is also a problem of

relative sensitivity: when the electrode size is increased, C T stops increasing while C X keeps

growing. This is because the parasitic capacitance is directly proportional to the electrode

area.

Equation 3

where:

C T

is the finger touch A

is the area with regard to the electrode and the conductive object d is the distance between the electrode and the conductive object (usually the

panel thickness)

εR is the dielectric constant or relative permittivity

ε0

is the vaccuum 6 mm min 6 mm min

C T εR ε0A d

----------------=

Surface electrode design AN286920/47Doc ID 15298 Rev 5

4.2 Touchkey matrix sensor

To extend the number of touchkeys, it is possible to implement the touchkey using a matrix

arrangement.

For further information please refer to AN3326.

Hardware recommendations:

Touching one key may induce sufficient capacitance change on other channels ●Special care must be taken to avoid

Imbalanced electrodes –Columns and lines electrodes tracks too close in the user touchable area

相关文档
相关文档 最新文档