Guidelines To Improve Conducted Noise Robustness On STM32F0 Series, STM32F3 Series, STM32L0 Series and STM32L4 Series Touch Sensing Applications
Guidelines To Improve Conducted Noise Robustness On STM32F0 Series, STM32F3 Series, STM32L0 Series and STM32L4 Series Touch Sensing Applications
Application note
Introduction
Different levels of immunity to conducted RF voltage are required by touch-sensing systems, depending on the application
(home appliances, automotive, health care, and so on). Moreover, touch sensing systems are often designed to meet the
requirements of industry standards, especially in the EMC compliance domain.
It is important to understand the environment in which the touch application is used, and to apply suitably adapted techniques to
address the effects of unwanted noise disturbances.
This application note provides a basic overview of conducted immunity testing, and some guidelines to keep the system reliable
when it is exposed to conducted noise.
Note that STMicroelectronics provides free STMTouch touch sensing firmware libraries, which are available either as standalone
packages (STM8L-TOUCH-LIB), or directly integrated into the corresponding STM32Cube package (STM32CubeL0,
STM32CubeF0, …).
1 General information
VDD EUT
DC (equipment under
power VSS test)
supply
0.1m
Earth
Generator
(noise source)
100R 50R
Touch sensing systems are based on capacitor variation measurements. The system must be able to detect
capacitive variations as low as few picofarads on the sensor electrodes. Therefore such systems may be sensitive
to conducted noise.
In a real touch sensing system, the main source of perturbation is introduced by the finger of the user. This is
because the user is in the electric path between the system and the earth. In the test setup shown in Figure
1. Standard IEC61000-4-6 test setup, the injected signal simulates the noise perturbations to which a system may
be exposed. By varying the frequency and the level of the injected signal, the test setup allows to characterize the
situations where the touch system becomes unreliable.
√2
80%
80%
Vrms
Vpp
1 ms
The modulated noise signal amplitude may be expressed either in Vrms or Vpp. Here is the formula to convert
values from Vrms to Vpp:
The STM32F0 Series, STM32F3 Series and STM32L0 Series use a surface charge transfer acquisition principle.
This principle is briefly described below.
The surface charge transfer acquisition principle consists in charging a sensor 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 sensor is touched, the sensor capacitance to the earth is increased so the Cs voltage reaches the
threshold with less count and the measurement value decreases. When the measurement value falls below a
defined threshold, a detection is reported.
The noise injection disturbs the measurement proportionally to its amplitude and depending on its frequency. The
worst case is generally found at a noise frequency close to the charge transfer frequency (assuming no
techniques are used to spread this frequency).
VDD
User finger
Sensor capacitor
STM32 Cx
MCU
touchkey
sensor
Parasitic
eletrode
capacitor
Cp
Human
body
coupling
Sampling to earth
VSS capacitor
Cs Conducted noise path
Injected
noise
Most of the IEC61000-4-6 compliant generators do not offer the ability to generate a step smaller than 1 kHz. As
previously indicated, to determine the most critical noise frequency, it is generally required to use 100 Hz steps or
even 10 Hz steps. The following setup is an alternative to find out the most critical noise frequencies and to
evaluate the robustness of the EUT at these frequencies.
Note: The noise frequencies impacting the equipment are generally around the charge transfer frequency and up to
40MHz. Higher noise frequency does not have an impact on the equipment operation.
Sine
generator
50R
500R
100R
Coin
CDN Sensor
Data processing
A graphical tool is recommended for analysis of the results. For example with Microsoft® Excel® 2D the user can
obtain the chart shown in Figure 5. Data processing.
In this example the frequency sweep starts at 500 kHz and ends at 550 kHz. Noise level is set on the generator to
4.6 Vpp (no modulation). The detect out threshold is set to 50, the sensor is touched and the detection is valid if
the measured delta is upper 50 else the touch detection is lost (error is reported). It means that 4.6 Vpp is the limit
to avoid detection loss (4.5 Vpp pass)
As a comparison, IEC61000-4-6 standard recommendation to use 1 % frequency steps would have lead to
explore only ten frequencies in this range, so the chances to detect worst case would have been very low!
Delta
450
400
350
300
250
200
Worst case
150
100
50
0
Rskey
IO1
Touchkey IO2
group X
IO3
IO4
Cskey Rsshield
IO1
IO2
Shield
group Y
IO3
IO4
Csshield
End acquisition Cs
shield level
End acquisition Cs
keysensor level
It is important to check the shied electrode waveform. Cs shield capacitance value and Rs shield serial resistor
value must be adjusted in order to obtain the same signal shape as sensor electrode waveform (same amplitude,
same response time).
The figure above shows the electrode sensor waveform in green and shield electrode waveform in yellow. Cs
shield is adjusted to obtain approximately the same charge level at the end of the acquisition.
The figure above is a zoom of Figure 7. Electrode and active shield waveforms at the beginning of acquisition: Rs
and Cs shields are adjusted to obtain approximately the same rise and fall time on the shield electrode as sensor
electrode waveform.
When the active shield is properly implemented the count value is about twice as much as the count value without
active shield. Since the noise level is not increased, the SNR is improved by a factor of 2 and noise immunity as
well.
The negative impact of this feature is the requirement to dedicate two more IOs and one more touch sensing
group.
Transfer cycle duration = (1/ (PGCLK) x ((CTPH + 1) + (CTPL + 1))) + (dead time = 2 x 1/ (HCLK)
By enabling the spread spectrum feature (TSLPRM_TSC_USE_SS to 1), the noise susceptibility is distributed on
multiple frequencies.
This is done by adding HCLK timing units (period) to CTPH.
TSLPRM_TSC_SSD allows to set the number of distributed frequencies:
It is recommended to set TSLPRM_TSC_SSD to 127. In this case the number of distributed frequencies is 27 =
128. The results is a noise immunity improved by approximately a factor of 7.
The negative impact of this feature is the degradation of the acquisition speed and thus the response time.
TSLPRM_TSC_SSD set to 127 adds an average of 64 x (1/ 48 MHz) = 1.33 µs to each count. For a 2000 counts
acquisition duration, 2.6 ms is added due to spread spectrum activation.
Usually end users need a response time in less than 60 ms. Assuming the application uses 3 banks, that means
individual acquisition must be reported in less than 20 ms. If moreover a debounce filter is used (set to 2), this
time constraint must be divided further by a factor of 3. This leads to a maximum target time for one acquisition
equal to 6.6 ms.
One acquisition time = count number x transfer cycle duration (see “transfer cycle duration” formula above)
6.1 Firmware
The firmware used with the STM32303C-EVAL is the STM32F303_Ex01_2TKeys_EVAL and it belongs to the
STM32F3xx STMTouch Library. The results provided in this section are obtained with the configuration values
presented in the table below:
HCLK 48 MHz
TSLPRM_TKEY_DETECT_IN_TH 100
TSLPRM_TKEY_DETECT_OUT_TH 50
TSLPRM_DEBOUNCE_DETECT 2
TSLPRM_TSC_CTPH 1
TSLPRM_TSC_CTPL 1
TSLPRM_TSC_PGPSC 5
TSLPRM_TSC_USE_SS 1
TSLPRM_TSC_SSD 127
6.2 Performance
Here are the performances of an STM32303C-EVAL board, with the configuration described above:
• Acquisition is performed in 1200 counts
• Acquisition duration: 4.7 ms (target < 6.6 ms)
7 Conclusion
On the STM32F0 Series, STM32F3 Series and STM32L0 Series microcontrollers, the touch sensing controller
peripheral shows a high noise immunity level in compliance with IEC61000-4-6 standard (above 3 Vrms class A).
These results can easily be reached by putting in practice the following recommendations:
• Implement an active shield electrode and enable the active shield feature in the firmware.
• Enable the spread spectrum feature in the firmware.
• Optimize the detection thresholds.
• Use the debounce filter.
Revision history
Contents
1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Conducted noise immunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1 Signal to noise ratio (SNR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 IEC61000-4-6 standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.1 Standard IEC61000-4-6 test setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
List of tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
List of figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
List of tables
Table 1. Test levels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Table 2. User configuration settings related to immunity improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 3. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
List of figures
Figure 1. Standard IEC61000-4-6 test setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Figure 2. Injected signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 3. Charge transfer equivalent capacitance model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 4. Test condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 5. Data processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 6. Active shield. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 7. Electrode and active shield waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 8. Waveform detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11