An5105 Getting Started With Touch Sensing Control On stm32 Microcontrollers Stmicroelectronics
An5105 Getting Started With Touch Sensing Control On stm32 Microcontrollers Stmicroelectronics
Application note
Introduction
This document helps customers to quickly locate information regarding touch sensing on STM32 microcontrollers.
This application note lists all the existing application notes and user manuals covering touch sensing. It indicates where the key
aspects of touch sensing are documented.
It also explains how to build touch sensing applications on STM32L0538‑DISCO and STM32F072B‑DISCO discovery boards
using the STM32CubeMX graphical interface.
STM32F0 series
STM32F3 series
STM32L0 series
STM32L1 series
STM32L4 series
STM32 microcontrollers
STM32L4+ series
STM32L5 series
STM32U5 series
STM32WB series
STM32WBA series
1 General information
2.1 Terminology
The touch sensing most relevant acronyms are described below:
• Acquisition mode
– CT: Charge-Transfer acquisition principle. This mode is used on STM32 microcontrollers.
• Touch sensing STM32 peripheral
– TSC: touch sensing controller peripheral.
– Bank: set of channels acquired simultaneously.
– Channel: elementary acquisition item.
– Group: set of 1..3 channels plus one sampling capacitor (Cs).
• Sensors
– Touchkey or TKey: single channel sensor.
– Linear sensor: multi-channels sensor with the electrodes positioned in a linear way.
– Rotary sensor: multi-channels sensor with the electrodes positioned in a circular way.
– Active shield: track running along or copper plane surrounding the sensor track and/or sensor itself.
Active shield is driven similarly to the sensor. Improve noise robustness without decreasing the
sensitivity.
• STM32 software
– TSL: touch sensing library.
– Delta: difference between the measure and the reference.
– Measure or meas: current signal measured on a channel.
– Reference or ref: reference signal based on the average of a sample of measures.
– DTO: detection time out. Time out is defined by TSLPRM_DTO. See TSLPRM_DTO in tsl_conf.h file.
– DXS: detection exclusion system. Exclusion system is defined by TSLPRM_USE_DXS. See
TSLPRM_USE_DXS in tsl_conf.h file.
– ECS: environment change system. See TSLPRM_ECS_DELAY in tsl_conf.h file.
• Hardware involved
– Cx: sensor capacitance (typical value is few pF).
– Cp: parasitic capacitance (typical value few pF).
– Ct: equivalent touch capacitance.
– Cs/Cskey/Csshield: sampling capacitor (typical value from 2.2 to 100nF).
– Rs/Rskey/Rsshield: serial resistor, ESD protection (typical value from 100Ohms to 10K).
2.2 Principle
The STM32 touch sensing feature is based on charge transfer.
The surface charge transfer acquisition principle consists in charging a sensor capacitance (Cx) and in
transferring the accumulated charge into a sampling capacitor (Cs).
This sequence is repeated until the voltage across Cs reaches VIH.
The number of charge transfers required to reach the threshold is a direct representation of the size of the
electrode capacitance. When the sensor is touched, the sensor capacitance to the earth is increased. This means
that the C voltage reaches VIH with less count and the measurement value decreases. When this measurement
goes below a threshold, a detection is reported by the TSL. The schematic below does not take into account the
parasitic capacitor.
VDD
User finger
Sensor capacitor
STM32 Cx
MCU
touchkey
sensor
eletrode
Human
body
coupling
Sampling to earth
VSS capacitor
Cs
Table 2 gives a list of documents containing information about the change transfer principle.
Id Title Chapters
3 Document reference
Figure 2 shows the main documentation tree related to TSC and TSL.
Application Note
overview
(AN5105)
Getting Started
STM32 On-line Tuning
with TSL
Training (AN4316)
(UM1913)
Sampling
Sensors ESD Conducted Noise
TSC Capacitor
(AN4312) (AN3960) (AN4299)
(AN4310)
5.1 Description
The following Figure 5 shows all touch sensing controller (TSC) characteristics and their correlation.
The TSC main characteristics are described in the following pages.
TSC
Signal Charge
threshold transfer
Sensitivity Sensor PCB Noise
Note: ProxInTh and ProxOutTh are defined for the proximity detection feature only, when TSLPRM_USE_PROX = 1.
• On software side:
– Relevant information is available in tsl_conf.h and tscl_user.c files.
– Threshold (xx_TH) can be adjusted in tsl_conf_tsc.h file.
See below an example:
#define TSLPRM_TKEY_DETECT_IN_TH (64)
#define TSLPRM_TKEY_DETECT_OUT_TH (60)
#define TSLPRM_TKEY_CALIB_TH (56)
#define TSLPRM_LINROT_DETECT_IN_TH (50)
#define TSLPRM_LINROT_DETECT_OUT_TH (40)
• The TSL api, tsl_user_SetThresholds, located in tsl_user.c allows the adjustment of each channel
independently. See below an example:
void tsl_user_SetThresholds(void)
{
/* USER CODE BEGIN Tsl_user_SetThresholds */
/* Example: Decrease the Detect thresholds for the TKEY 0*/
MyTKeys_Param[0].DetectInTh -= 10;
MyTKeys_Param[0].DetectOutTh -= 10;
/* USER CODE END Tsl_user_SetThresholds */
}
Table 4 gives a list of documents containing information about the signal threshold usage.
Id Title Chapters
In this example, to complete the charge transfer cycles, the following parameter must be modified as below:
• INCREASE:
– htsc.Init.PulseGeneratorPrescaler
– htsc.Init.CTPulseHighLength
– htsc.Init.CTPulseLowLength
• DECREASE:
– Sysclk
Table 5 gives a list of documents containing information about the charge transfer.
Id Title Chapters
5.4 Sensitivity
Sensitivity is a key point in touch sensing applications. The sensitivity can be improved by:
• reducing the air gap,
• reducing the panel thickness,
• choosing the dielectric with higher εR ,
• a GND plane that is not too close to the shield and sensors,
• avoiding metallic paint near shield and sensors.
Table 6 gives a list of documents containing information about the sensitivity.
Id Title Chapter
Dielectric example
Material εR
Air 1.00059
Glass 4 to 10
Sapphire glass 9 to 11
Mica 4 to 8
Nylon 3
Plexiglass 3.4
Polyethylene 2.2
Polystyrene 2.56
Polyethylene terephthalate (PET) 3.7
FR4 (fiberglass + epoxy 4.2
PMMA (Poly methyl methacrylate) 2.6 to 4
Typical PSA 2.0 - 3.0 (approximately)
5.5 Sensors
• It is recommended to use the same shape for all electrodes.
• The touchkeys can be customized by the drawing on the panel. TSL compensates capacitance differences.
• Acquisition time and processing parameters can be optimized when electrodes have similar capacitance.
Sensor size example
5.5.1 Key
• Key sensors are used in common application
• You can get deeper key information in the following documents:
Table 8 gives a list of documents containing information about the key.
Id Title Chapters
Figure 9. Interlaced linear touch sensor with three channels / four electrodes (half-ended electrodes
design)
Up to 60 mm
Squared end
0.2 ~ 0.3 mm
Electrode/ground gap
2 mm
Note: The teeth of the interlaced linear touch sensor must be perfectly regular.
Table 9 gives a list of documents containing information about the linear touch sensor.
Id Title Chapters
Figure 10. Interlaced patterned rotary sensor with three channels / three electrodes
Tooth pitch
2.0 - 4.0 mm
0.2 - 0.3 mm
2 mm
LEGEND:
0.2 - 0.3 mm
Table 10 gives a list of documents containing information about the rotary sensor.
Id Title Chapters
Rskey
IO1
IO2
Touchkey
group X
IO3
IO4
Cskey Rsshield
IO1
Shield IO2
group Y
IO3
IO4
Csshield
Table 11 gives a list of documents containing information about the active shield.
Id Title Chapters
Id Title Chapters
Design with surface sensors for touch sensing • LEDs and sensors
AN4312
applications on MCUs • Placing of LEDs close to sensor
Controller
PCB
Flex
PCB pad connector
Id Title Chapters
Id Title Chapters
Must be avoided
Track is OK
Rx CS
Tkey3 Tkey4 Rx
At least 2 mm (4 - 5 mm is recommended)
As thin as
At least twice the
PCB
panel thickness
technology
allows
~ 0.21 3xW
3-4 mm
Active shield
Sense plate
5.6.4 FAQ
System keys points:
• Direct connection between earth and board ground is required to avoid conducted noise issues.
• Conductive painting on the front panel must be avoided.
• Robust mechanical assembly is required.
Layout keys points:
• GND plane is mandatory under MCU, sampling capacitors and up to serial resistors
• Hatched GND plane recommended for sensor traces from both sides of the PCB:
– minimize parasitic capacitance
– mesh plane possible with 25% to 40% copper
• Route the sensors and ground on the same layer while the components and other tracks are routed on the
other layers
Driven shield, or Active shield, is recommended.
• If there are LEDs close to the sensors, to indicate a touch event, they must be bypassed by a capacitor
whose typical value is 10 nF.
• External LDO regulator should be used to power the MCU only to provide a stable power supply voltage
without any ripple, especially all the switching components like transistors, LEDs, in the application must
not be powered from the same voltage. This regulator should not be placed close to the sensors and their
tracks, but close to the MCU.
• It is strongly recommended to dedicate pins to be used as touch sensors and do not share them with other
features
RS and CS keys points:
• PPS or NPO sampling capacitors are recommended. Possible X5R or X7R.
• Never use tantalium sampling capacitors.
• Serial ESD 10 K (down to 1 K) resistors are recommended to be placed as close as possible to the MCU.
• No track crossing or via between these resistors and the MCU.
• The value of the sampling capacitor of the active shield should be different than the value of the sampling
capacitors used for acquisition.
• The capacitance of active shield is higher (larger area) than CX of a single touch sensing channel. In order
to achieve the same waveform on active shield and active touch sensing channel, the ratios CS/CX of active
shield and active touch sensing channel (touchkey). therefore, the CS of the active shield should also have
higher value (k x CS of touch sensing channel).
Sensor key points:
• Other traces must not cross the touch sensing traces or the whole touch sensing area
• The touch sensing traces should be as thin as technology allows and as short as possible.
– No longer than 10 cm
• The space between traces and GND plane should be ideally 5 mm
• TC pins are more robust against external interference than FT:
• Consider modification of PCB layout to allow connection of external VDD clamping diode to touch sensing
electrode traces.
– Use low‐capacitance diode like BAR18, BAS70 with Cmax = 2 pF.
– In case it is later needed, add pads and connection to the PCB without assembling components.
• Floating panes must never be placed close to the sensors.
5.7 Noise
Noise is a key point for touch sensing applications. Noise can come from power supply.
VDD LEDs
VDD
VIN VOUT
LED
VDD
LDO Touch sensing
regulator(1) device (MCU)
Supply
input 1 μF 100 μF 100 μF 1 μF
GPIO
10 nF
VSS VSS
Table 15 gives a list of documents containing information about the power supply.
Id Title Chapters
Id Title Chapters
Id Title Chapters
Id Title Chapters
6 Tuning
Id Title Chapters
ESD
Table 20 gives a list of documents containing information about the ESD.
Id Title Chapters
CN
Table 21 gives a list of documents containing information about the conducted noise.
Id Title Chapters
CS
Table 22 gives a list of documents containing information about the sampling capacitor.
Id Title Chapters
To start Linear Touch Sensor channel acquisition at the same time, three groups are used. (See Figure 23).
The system is functional and ready to be used. The led blinks according to finger position on the slider.
To start linear touch sensor channel acquisition at the same time, three groups are used.
status = tsl_user_Exec();
if(TSL_USER_STATUS_BUSY == status)
{
// Nothing to do
if(cnt++%50==0){
}
HAL_Delay(1);
}
else
{
HAL_GPIO_WritePin(LD_R_GPIO_Port, LD_R_Pin, GPIO_PIN_RESET); //00
HAL_GPIO_WritePin(LD_G_GPIO_Port, LD_G_Pin, GPIO_PIN_RESET);
if(MyTKeys[0].p_Data->StateId == TSL_STATEID_DETECT)
{
HAL_GPIO_WritePin(LD_R_GPIO_Port, LD_R_Pin, GPIO_PIN_SET); //11
HAL_GPIO_WritePin(LD_G_GPIO_Port, LD_G_Pin, GPIO_PIN_SET);
}
if(MyTKeys[1].p_Data->StateId == TSL_STATEID_DETECT)
{
HAL_GPIO_WritePin(LD_R_GPIO_Port, LD_R_Pin, GPIO_PIN_SET); //01
HAL_GPIO_WritePin(LD_G_GPIO_Port, LD_G_Pin, GPIO_PIN_RESET);
}
if(MyTKeys[2].p_Data->StateId == TSL_STATEID_DETECT)
{
HAL_GPIO_WritePin(LD_R_GPIO_Port, LD_R_Pin, GPIO_PIN_RESET);//01
HAL_GPIO_WritePin(LD_G_GPIO_Port, LD_G_Pin, GPIO_PIN_SET);
}
}
}
/* USER CODE BEGIN 3 */
Revision history
Table 23. Document revision history
Contents
1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Terminology and principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Document reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
4 STM32L4 touch sensing controller online presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Main TSC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.2 Signal threshold. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.3 Charge transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.4 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.5 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.5.1 Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.5.2 Linear or slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.5.3 Rotary sensor or wheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.5.4 Active shield or driven shield. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.6 Layout and PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.6.1 Led rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.6.2 Electrode not located on PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.6.3 Ground, shield and sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.6.4 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.7 Noise. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7.1 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7.2 False detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7.3 Noise immunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.7.4 Conducted noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6 Tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
7 Getting started TSC with STM32CubeMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
7.1 Uses cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2 Discovery board: STM32F072B-DISCO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.2.1 STM32F072B-DISCO board selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.2.2 STM32F072B-DISCO TSC group and sensor activation . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2.3 STM32F072B-DISCO clock tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.2.4 STM32F072B-DISCO touchsensing library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2.5 STM32F072B-DISCO software project generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
List of tables
Table 1. Applicable products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Table 2. Change transfer principle documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Table 3. Reference documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 4. Signal threshold use documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 5. Charge transfer documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 6. Sensitivity documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 7. Dielectric constants of common materials used in a panel construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 8. Key documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 9. Linear touch sensor documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 10. Rotary sensor documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 11. Active shield documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 12. Led rules documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 13. Electrode documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 14. Layout documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 15. Power supply documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 16. False detection documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 17. Noise immunity documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 18. Conducted noise documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 19. Sensors documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 20. ESD documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 21. Conducted noise documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 22. Sampling capacitor documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 23. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
List of figures
Figure 1. Change transfer principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 2. Main documentation tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 3. STM32L4 online training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 4. STM32L4 Touch Sensing Controller online training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 5. TSC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 6. STMStudio outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 7. Incomplete and complete charge transfer cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 8. Sensor size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 9. Interlaced linear touch sensor with three channels / four electrodes (half-ended electrodes design) . . . . . . . . . 12
Figure 10. Interlaced patterned rotary sensor with three channels / three electrodes . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 11. Active shield principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 12. Led layout example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 13. Example of cases requiring a LED bypass capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 14. Electrode not located on PCB example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 15. Hatched ground and signal tracks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 16. Ground plane example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 17. Track routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 18. Track routing recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 19. Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 20. Typical power supply schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 21. Main project panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 22. STM32F072B-DISCO board selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 23. STM32F072B-DISCO board schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 24. STM32F072B-DISCO pinout SWD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 25. STM32F072B-DISCO pinout TSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 26. STM32F072B-DISCO pinout overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 27. STM32F072B-DISCO clock configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 28. TOUCHSENSING box configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 29. STM32F072B-DISCO sensor selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 30. STM32F072B-DISCO sensor selection step2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 31. STM32F072B-DISCO sensor selection step3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 32. STM32F072B-DISCO sensor selection step4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 33. STM32F072B-DISCO sensor selection step5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 34. STM32F072B-DISCO software generation step1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 35. STM32F072B-DISCO software generation step2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 36. STM32F072B-DISCO software generation step3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 37. STM32F072B-DISCO IDE workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 38. STM32F072B-DISCO setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 39. STM32L0538-DISCO board selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 40. STM32L0538-DISCO board schematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 41. Pinout SWD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 42. Pinout TSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 43. Pinout overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 44. Clock configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 45. TOUCHSENSING box configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 46. STM32L0538-DISCO sensor selection step1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 47. STM32L0538-DISCO sensor selection step2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 48. STM32L0538-DISCO sensor selection step3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 49. STM32L0538-DISCO sensor selection step4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 50. STM32L0538-DISCO sensor selection step5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 51. STM32L0538-DISCO software generation step1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 52. STM32L0538-DISCO software generation step2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 53. STM32L0538-DISCO complete project overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44