Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I'm doing CapSense proximity sensing. Since I need information about the distance, I work with the sensor raw data. This works well. The only disadvantage is that the the raw data has some noise on it (if necessary, I can provide data). To get rid off the noise, I use the DFT block to process the CapSense raw data values. However, it seems that it's hard to setup the DFB the right way.
On a first thought, I think I need something like a FFT on the data, with only the DC bin as returned value. Is a FFT possible with the DFB? If not, how can I figure out how to setup the DFB to clean the noise out of the signal?
Ralf, using FFT for noise reduction is quite unusual. I don't believe that much success can be achieved this way. My guess that issue you having with Filter block is that it does not configures well for very low frequencies (<50Hz), so you still have a lot of AC noise. It is possible to cheat the Filter and get into ~1 Hz low-frequency cut-off. Try to set Filter to low-pass with cut-off 100 Hz, and input frequency 1 kHz, but feed Filter input with 10 Hz (using DMA or direct write), you should get effective filter cut-off at about 1 Hz. Using FIR setting, I was able to get about 1-2 Hz cut-off, but not 0.1 Hz.
Other thing is that for low frequency measurements the Filter is overkill, you can make simple IIR filter in code with very long decrement time. See also KBA
Other issue can be type of noise from cap sense. Inspect the output for possible spikes (non-random noise). This kind of noise will not be removed by the Filter. I would try to use a median filter before the Filter block (see link below)