This guide assumes you have basic knowledge of capacitive sensing and you are familiar with the SENSE environment. If you feel that you are missing any of the necessary concepts or you are a new SENSE user, you may want to read the following articles that will help you get started:
- How to make a self-capacitive touch button that works
- System Analysis - Conducted Noise
- How conducted EMI influences touch sensors
Capacitive touch sensors are vulnerable to radio frequency interference (“RFI”), which is a type of electromagnetic interference (EMI) in the radio frequency spectrum, from a few KHz to some GHz. Designing a touch button that just works with a desired sensitivity level is not enough when it is also needed to operate in a noisy environment; in case that noise level is comparable to the signal level (low SNR), the danger of possible false touches by noise sources or touches that are not registered due to noise is quite high.
-Why tests are time and money consuming and why they are not enough
Most frequently capacitive sensing systems are affected by noise sources that oscillate at frequencies lower than 80 MHz, which belong to the range of radio frequency. In such frequencies the conducted noise is the prevailing noise mechanism. The IEC 61000-4-6 International Standard specifies the laboratory test that must be conducted to assess the noise immunity of any electrical and electronic equipment against RFI in the frequency range 150 kHz up to 80 MHz. The test setup includes a generator which is used to inject modulated voltage signals, which represent the noise, into the power supply lines of the device. By varying the frequency and the level of the injected voltage signal, and based on observations of the performance of the device, the latter can be classified into a specified noise immunity level.
Fig. 1. The test setup proposed by IEC 61000-4-6 as adopted by STMicroelectronics guide for touch sensing applications.
But, of course you need a lab to do this test. And what happens if the sensor does not pass the test? Then you have to create a new design, manufacture a new prototype and test again with the hope that the modifications you made will lead to successful test results. In any case you will have already spent respectful amounts of resources for these iterations.
But, there is one more “but” as well… According to IEC 61000-4-6, during this test the noise frequency must increase with a minimum step of 1% of the preceding value, so as to cover the range from 150 kHz up to 80 MHz. However, for the majority of the touch sensing systems such a step is too large for the detection of the critical frequencies, at which the strongest noise effect is located. Most often such noise spikes fall in the middle of two successive frequency steps, so you have to repeat the test with smaller steps focusing around the critical frequencies. However, as also reported in STMicroelectronics guide, the majority of the signal generators used for those tests are not able to produce such small frequency steps, for example of 100 Hz or even of 10 Hz where needed.
-How SENSE tackles the issues related to testing
SENSE gives a solution in both the above issues related to noise tests. SENSE can replicate through simulations the noise tests suggested by the IEC Standard, by covering the whole desired spectrum of frequencies with steps as small as needed, in order to detect those critical frequencies. In addition, in case that your initial design fails the test and you have to redesign it and test it again, you do not have to spend resources to create new prototypes; you just need to modify the design in SENSE and simulate again in a couple of minutes. How can you do this? By following these steps:
- Set up a Counts Analysis including Conducted Noise
- Evaluate the results and detect the critical frequencies and the corresponding noise spikes.
- Iterate if needed (go back to step I) by using a smaller frequency step within a limited frequency range.
For this example we will use the self-capacitive button that is also used in the article about how to make a self-capacitive touch button that works.
I. Set up a Counts Analysis including Conducted Noise
First we need to create a New Counts Analysis that includes Conducted Noise source. To do this we go to System -> Analysis -> Create New Analysis -> Controller Counts Analysis. Then we need to:
- Select System Configuration: Select the system configuration used in How to make a self-capacitive touch button that works and select only the Bank 2, since this is the only one used (G1_IO2).
- Setup Conducted Noise: Here we select “Enter your own values”. We are going to apply a voltage source of 1 Vrms, so in the voltage level textbox we need to type “1” and then click Enter. As a first step, we select 150 kHz for the Start frequency value, for the End 1000 kHz and for the step 10 kHz.
💡 The voltage level of 1 Vrms is the most important one for low voltage applications, among the three voltage levels (1, 3 and 10 Vrms) suggested by the IEC 61000-4-6. According to this standard, the frequency range that must be tested is 150 kHz - 80 MHz. However, you can start with a smaller range as proposed here (150 kHz - 1 MHz); the noise spikes are expected to be within this range at least for the selected controller parameters.
💡 This way we first work with a relatively big step, trying to just detect the frequency bands where count spikes occur. The next step will be to pinpoint around those bands with a smaller step, which will allow for a more accurate estimation of the spikes amplitude. We will repeat this process until the results of two successive steps finally converge to a specific value. So, at the end we run a more complete test than the one suggested by the IEC 61000-4-6, that allows us to detect with accuracy the Counts spikes which may stay hidden in the lab tests.
- Analysis Options: 8 cores and 16 GB of memory are enough for this type of analysis. With these settings the simulation will take about 6 hours, so we click Run Analysis (at the next step) and we will get the results within the day.
The final screen with the suggested settings looks like this:
Fig. 2. The settings used in a Counts Analysis that includes noise effects.
II. Evaluate the results
The results we get from SENSE are presented in a table with Counts values that do not include any noise effects, so these values are the same with those found in the previous article about how to make a self-capacitive touch button that works:
Fig. 3. Results of Counts without considering any noise effects.
Regarding the noise effects, we can check them through the plot that is just under this table. In case of touch sensors, the noise is injected by the pointer, so it makes sense to focus on the results that correspond to pointer positions. For this case, we must select the pointer placement (X:0, Y:5000, Z:0), the pin (G1_IO2-Source 1), the voltage level (1 Vrms), and the type of the results that makes sense regarding noise effects, which is “DeltaCounts”. The plot looks like this:
Fig. 4. The variation of DeltaCounts within the frequency range of 150 kHz to 1 MHz with a step of 10 kHz.
As we see from this plot, DeltaCounts fluctuate from 168 to 187 Counts, so their variation range is 19 Counts. The critical frequency of the fluctuation is detected within the range of 900-940 kHz. So, we must focus on this frequency range and prepare a new Counts Analysis including noise effects, with a smaller step, 1 kHz, as shown below.
III. Iterate with a smaller frequency step
The DeltaCounts variation within the range 900-940 kHz for a step of 1 kHz looks like this:
Fig. 5. The variation of DeltaCounts within the frequency range of 900 kHz to 940 kHz with a step of 1 kHz.
DeltaCounts fluctuate from 144 to 195 Counts, so their variation range is 51 Counts, detected in the frequency range of 918-928 kHz. So, this is the new frequency range that is needed to be investigated with a finer step of 100 Hz.
As shown in Figure 6, for these settings DeltaCounts varies from 143 to 212 Counts, so the new variation range is 69 Counts.
Fig. 6. The variation of DeltaCounts within the frequency range of 918 kHz to 928 kHz with a step of 100 Hz.
We repeat the simulations focusing on the frequencies between 923-924 kHz, with a step of 10 Hz and we get the following plot. It is important that at this point we are analysing with frequency step 100 times smaller than that suggested from the standard.:
Fig. 7. The variation of DeltaCounts within the frequency range of 923 kHz to 924 kHz with a step of 10 Hz.
For such a small step, DeltaCounts vary from 139 to 212, which corresponds to a variation range of 73 Counts; this variation is almost the same with that of the previous step, so there is no need for more iterations and we should stop here. Figure 8 shows how the results converge with decreasing frequency step.
Fig. 8. How DeltaCounts converge with decreasing frequency step.
In order for a touch sensor to be regarded as immune against noise, the DeltaCounts variation range under noise conditions must be kept below the threshold value of DeltaCounts that corresponds to touch detection. Actually, there are two different thresholds, one that detects the start of a touch event as the signal increases and another one that corresponds to the end of a touch event as the signal decreases. According to the STMicroelectronics guide, typical values for these thresholds can be set at the 2/3 and 1/3 respectively of the maximum value of the DeltaCounts that corresponds to finger touch without any noise effects. SNR (Signal-to-Noise Ratio) is also a useful metric to evaluate noise immunity, which can be calculated as the ratio between the maximum DeltaCounts without any noise and the maximum variation range of DeltaCounts under noise conditions.
In our example the maximum DeltaCounts was found to be 171 Counts, so we can set our high and low thresholds of touch detection equal to 114 and 57, respctively. Considering that the maximum variation range that we got under conducted noise conditions is 73, which is higher than the low threshold of 57 (Fig. 9), we easily understand that our touch sensor is not properly immune against conducted noise. This issue is also depicted through the SNR of this touch sensor which is quite low (171/73=2.34). In general we need to achieve a SNR > 4, so as to ensure that noise level will be kept lower than the thresholds of touch events; in our case this corresponds to a maximum variation range of DeltaCounts lower than 42 (Fig. 9).
Fig. 9. DeltaCounts threshold values corresponding to the detection of touch events and their comparison with the current and desired noise levels.
This high noise level clearly calls for a redesign, which can be done in three different levels:
- Modify the parameters of the selected controller. You can find more info about controller settings here.
- Change the mounted components, resistors and capacitors, that connect the controller pins with the touch sensor. In SENSE these settings are selected in System Configuration.
- Modify the Layout. For example, you can add a new shielding element around and/or below the touch buttons; an easy way to do this is through the templates of SENSE.
In any case you don’t need to spend time and money in building and testing prototypes, but you can just redesign your touch sensor and repeat simulations in SENSE with and without noise.