AN4312 STMICROELECTRONICS | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 36

Technical content

Datasheet sections

  • 1 Capacitive sensing technology in ST
  • 1.1 Charge transfer acquisition principle
  • 1.2 Surface capacitance
  • 2 Main capacitive sensing guidelines
  • 2.1 Overview
  • 2.2 Construction
  • 2.2.1 Substrates
  • 2.2.2 Electrode and interconnection materials
  • 2.2.3 Panel materials
  • 2.2.4 Mechanical construction and PCB to panel bonding
  • 2.2.5 Metal chassis
  • 2.2.6 Air gap
  • 2.2.7 Transfer of an electrode from PCB to t he front panel
  • 2.3 Placing of LEDs close to sensors
  • 2.4 Power supply
  • 3 Surface sensor design
  • 3.1 Touchkey sensor
  • 3.2 Touchkey matrix sensor
  • 3.3 Linear sensor
  • 3.3.1 Normal patterned linear sensor
  • 3.3.2 Interlaced patterned linear sensor
  • 3.4 Rotary sensor
  • 3.4.1 Normal patterned rotary sensor
  • 3.4.2 Interlaced patterned rotary sensors
  • 3.4.3 Rotary sensor with central touchkey
  • 3.5 Specific recommendations
  • 3.5.1 LEDs and sensors
  • 3.5.2 Driven shield
  • 3.5.3 Using electrodes separated from the PCB
  • 3.5.4 PCB and layout
  • 3.5.5 Component placement

sensing applications with surface sensors.

  • 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 interface is based on surface sensors that are made of small copper foils. The sensor acts as a capacitor that is alternatively charged and discharged. The capacitor value depends on the presence of the user finger as well as the sensor design. This application note introduces various sensor designs and recommendations to achieve optimum performances, keeping in mind that none of the sensor elements should 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 Table 1 lists the microcontrollers concerned by this application note.

Table 1. Applicable products Microcontrollers STM32F0 series, STM32F3 series, STM32L1 series, STM8L series.

Capacitive sensing technology in ST AN4312

1 Capacitive sensing technology in ST

STMicroelectronics offers different capacitive sensing technologies for STM8 and STM32 families of products. The technology covered by this application note is based on the charge transfer acquisition principle and is supported by all the microcontroller lines listed in Table 1.

1.1 Charge transfer acquisition principle

The surface charge transfer acquisition is a proven, robust and efficient way to measure a capacitance. It uses a minimum number of external components to operate with a single ended electrode type. This acquisition is designed around an analog I/O group which is composed of four GPIOs. Several analog I/O groups are available to allow the acquisition of several capacitive sensing channels simultaneously and to support a larger number of capacitive sensing channels. Within a same analog I/O group, the acquisition of the capacitive sensing channels is sequential. One of the GPIOs is dedicated to the sampling capacitor (C S). Only one sampling capacitor I/O per analog I/O group must be enabled at a time. The remaining GPIOs are dedicated to the electrodes and are commonly called channels. For some specific needs (such as proximity detection), it is possible to simultaneously enable more than one channel per analog I/O group. The surface charge transfer acquisition principle consists of charging an electrode capacitance (CX) and transferring a part of the accumulated charge into a sampling capacitor (CS). This sequence is repeated until the voltage across CS reaches a given threshold (VIH in our case). The number of charge transfers required to reach the threshold is a direct representation of the size of the electrode 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.

1.2 Surface capacitance

A capacitance is modified when a finger gets close to a sensing electrode. The return path goes either through:

  • a capacitor through the user’s feet
  • a capacitor between the user’s hand and the device
  • a capacitor between the user’s body and the application board through the air (like an antenna)

Figure 1. Equivalent touch sensing capacitances CX is the parasitic capacitance of the electrode. ground. The PCB and board layout must be designed to minimize this parasitic capacitance. feature a direct connection to earth. reference is earth and not the application ground.

2 Main capacitive sensing guidelines

2.1 Overview

  • A fiberglass PCB
  • A set of electrodes made of a copper pad
  • A panel made of glass, Plexiglas, or any non-conductive material
  • A silk screen printing

Figure 2. Example of capacitive sensor construction

2.2 Construction

2.2.1 Substrates

The substrate is the base material carrying the electrodes. used. Glass is also an excellent material for this purpose. contained in the atmosphere (e.g. hygroscopic material such as paper based). Unfortunately, this would modify εR (relative permittivity) with environmental conditions.

or with a suitable bonding material.

2.2.2 Electrode and interconnection materials

Orgacon™ or Indium Tin Oxyde (ITO). and deduce which material is well suited for the connections. Figure 3. Clear ITO on PET with silver connections manufacturer) and how many squares are put in series, you can deduce the overall resistance of the line.

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

2.2.3 Panel materials

particularly the sensitivity. The panel is the main item of the capacitor dielectric between the finger and the electrode. dielectric constant, the better the propagation. A plastic panel up to 10 mm thick is quite usable, depending on touchkey spacing and size. thickness, dielectric constant and electrode size. constants are also preferable for front panels as they help to increase SNR. Table 3. Dielectric constants of common materials used in a panel construction

equivalent vacuum thickness TV. where t is the thickness of the dielectric. be used to evaluate the touch sensitivity from the back side of the application. and εR of the substrate will be also factors of the global sensitivity.

2.2.4 Mechanical constructi on and PCB to panel bonding

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

Figure 7. Typical panel stack-up (PSA). 3M467 or 468 PSAs work very well.

Main capacitive sensing guidelines AN4312

2.2.5 Metal chassis

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 Section 3.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.

2.2.6 Air gap

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 non-touch 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.5 mm to 1 mm 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.

2.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 further information.

2.3 Placing of LEDs close to sensors

  • 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 (Figure 8) can also be applied to transistors.

Figure 8. Examples of cases where a LED bypass capacitor is required

2.4 Power supply

an external voltage regulator to power the device only. variation on VDD 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. not from the regulated voltage (see Figure 9). Figure 9. Typical power supply schematic

  1. Typical voltage regulator LD2980 can be used.

3 Surface sensor design

3.1 Touchkey sensor

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

  1. The object size to be detected

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

sensor is round, or have a 6 mm side if the touchkey sensor is square (see Figure 11). There are sensitivity issues if dimensions lower than these values are used. Figure 11. Recommended electrode size

3.2 Touchkey matrix sensor

For further information, please refer to AN3236. Figure 12. Simple matrix implementation

  • Touching one touchkey 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 MS18975V2 CH1 CH2 CH3 K1 K2 K3CH4 K4 K5 K6CH5 K7 K8 K9CH6 K10 K11 K12CH7 = touchkeys pressed

3.3 Linear sensor

  • Mono electrodes design: each channel is associated to only one electrode (see Figure 13).

Figure 13. Mono electrodes design

  • Half-ended electrodes design: the first and the last electrodes are connected to the same channel (usually the first one) and their width is half the width of the other electrodes. This is to ensure that all the electrodes capacitance are identical (see Figure 14).

Figure 14. Half-Ended electrodes design

  • Dual electrodes design: all the electrodes are duplicated and interlaced together (see Figure 15).

Figure 15. Dual electrodes design

  • Normal pattern (see Figure 16).
  • Interlaced pattern (see Figure 17.). These 2 patterns are described in more details below.

3.3.1 Normal patterned linear sensor

interlaced patterned electrodes design with crisscross teeth as shown in Figure 17.

Figure 16. Normal patterned linear sensor with 5 channels / 6 electrodes

  1. Legend: e is the gap between two sensor electrodes, h is the height of the sensor electrode, and w is the

width of the sensor electrode. To get larger linear sensors, the number of electrodes can be increased to eight.

3.3.2 Interlaced patterned linear sensor

channels thanks to the higher resolution achieved. Figure 17. Interlaced linear touch sensor with 3 channels / 4 electrodes

  1. The teeth of the interlaced linear touch sensor must be perfectly regular.

3.4 Rotary sensor

  • mono electrode design (same as the half-ended electrode design)
  • dual electrode design. Like for the linear sensor, there are two options for designing the electrode pattern on the PCB:
  • normal pattern
  • interlaced pattern. These two patterns are described in more details below. A rotary sensor can also have a touchkey placed in the center.

3.4.1 Normal patterned rotary sensor

Figure 18. Normal patterned rotary sensor with 3 channels / 3 electrodes

  1. Legend: d is the diameter of the center, e is the gap between two sensor electrodes, w is the width of the

sensor electrode, L is the length of the external perimeter of the sensor electrode. five and eight electrodes, thus giving a bigger rotor.

3.4.2 Interlaced patterned rotary sensors

Figure 19. Interlaced patterned rotary sensor with 3 channels / 3 electrodes

3.4.3 Rotary sensor wi th central touchkey

3.5 Specific recommendations

3.5.1 LEDs and sensors

Figure 20. Back-lighting touchkey Figure 21. PCB 3D top view

Figure 22. PCB bottom view

3.5.2 Driven shield

  • The parasitic capacitance between the electrode and the shield no longer needs to be charged. This cancels the effect on the sensitivity.
  • A driven shield is useful for certain applications where shielding may be required to: – Protect the touch electrodes from a noise source – Remove touch sensitivity from the cable or track between the electrode and the sensing MCU. – Increase system stability and performance when a moving metal part is close to the electrode.
  • The Cs/Cx of the shield should be in the same range as the Cs/Cx of the touchkeys.
  • Using Csshield = k.Cskey (c) usually gives good results.
  • The Cs of the shield does not need to be a high grade capacitor. Any type should work.
  • The noise/ESD protection resistor may be mandatory on the shield because it may be exposed to ESD. In order not to modify the pulse timings, the Rsshield should be in the range of Rskey/k.

Figure 23. STM8L1xx driven shield example using the charge-transfer acquisition

Figure 24. STM32L driven shield example using the charge-transfer acquisition

3.5.3 Using electrodes separated from the PCB

of the panel and are not close to the PCB. conductive foam or rubber, or a flex tail attached using ACF/ACP (d)(see Figure 25). Figure 25. Printed electrode method showing several connection methods d. ACF/ACP = Anisotropic Conductive Film/Anisotropic Conductive Paste.

Figure 26. Spring and foam picture (both are not compressed)

3.5.4 PCB and layout

mind is that the shorter and thinner the track is, the smaller the parasitic capacitance. 10 cm for standard or flexible PCBs. elements or, if they cannot be minimized, to make them uniform for all capacitive elements. is good practice to keep things as balanced as possible.

Figure 27. Track routing recommendation This set of electrodes and tracks interact less with each other and can be routed closer. Typically, a spacing of twice the track width is sufficient. least 2 mm is required and 4 to 5 mm is recommended (see Figure 27). twice the panel thickness between electrodes (see Figure 27). communication lines, where it is forbidden to route them in parallel with the sensor tracks. drivers and communication lines). the sensor tracks, and impacts the sensitivity.

Surface sensor design AN4312

3.5.5 Component placement

To reduce the sensor track lengths, it is recommended to place the microcontroller very close to the sensor electrodes. It is also recommended to center the microcontroller among the sensors to balance the parasitic capacitance and to put a ground layer above it. The ESD protection resistors must also be placed as close as possible to the microcontroller to reduce the track length which could drive ESD disturbance directly to the microcontroller without protection. These ESD resistors must be selected according to the acquisition method recommendations.

3.5.6 Ground considerations

It is recommended to route the sensors and the ground on the same layer while the components and other tracks are routed on the other(s) layer(s). When a multilayer PCB is used, both sides of the PCB are commonly grounded to improve the immunity to noise. Nevertheless, the ground has an effect on the sensitivity of the sensor. The ground effect is to increase C X, which reduces the sensitivity as the ratio CT/CX decreases. So, to balance between noise immunity and sensitivity, it is recommended to use partial grounding on both sides of the PCB through a 15% mesh on the sensor layer and a 10% copper mesh for the opposite side with the electrodes and tracks. Ground around sensor When the ground plane is on the same layer as the sensor, it surrounds the sensors. To avoid increasing CX, it is recommended to keep a gap between the sensor and the ground. This gap size must be at least 2 mm (4-5 mm recommended) and must also be respected with any noisy application track or power supply voltage. There are two different cases:

  • distance to GND and power supply voltage, shorter distance is possible, but impacts significantly the touchkey sensitivity
  • distance to noisy signal, the detection may completely stop working in case the distance is not respected Special care must be taken to balance the ground around the sensors. This is particularly true for a rotary or linear sensor (see Section 3.5.2: Driven shield). Caution: Floating planes must never be placed close to the sensors. Ground plane example A full ground plane is mandatory below the MCU up to serial resistors (see Figure 28).
  • It must cover the tracks between the MCU and the serial resistors
  • It must cover the sampling capacitors

Figure 28. Ground plane example

  • The signal track should cross the ground lines as little as possible
  • The signal track should never follow the ground lines

Figure 29. Hatched ground and signal tracks

3.5.7 Rotary and linear sensor recommendations

4 Conclusion

The layout and design of capacitive sensing boards usually present conflicts between all signals present on the application. This document should be used as a general guideline for resolving all issues. When the guideline recommendations cannot be followed, tests should be performed to validate the implementation and verify the sensitivity and robustness of the impacted channel. To summarize, the layout of a touch sensing application should reduce the ground coupling to a minimum and use short clean wires as far as possible from other potential interference sources.

5 Revision history

Table 4. Document revision history 30-Sep-2013 1 Initial release.