Open CarlosGS opened 2 years ago
I found a bit unintuitive that touch_pad_read_raw_data()
reads the already "denoised" data.
But in order to avoid a breaking change, my request is: can you provide TOUCH_PAD_DENOISE_BIT0
?
In advanced capacitive sensing applications, having a better noise removal procedure improves SNR dramatically. And the only way to do this is to have a separate raw signal without any prior filtering. I'm available to test. Thanks!
The new capacitive sensor module in ESP32-S2 has an integrated denoise option, which uses an internal pad to measure noise simultaneously with any other pad, and then subtract it to reduce overall noise.
However, the current implementation seems to only allow the removal of some of the bits (https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/touch_pad.html#_CPPv425touch_pad_denoise_grade_t). For example, setting
TOUCH_PAD_DENOISE_BIT4
takes the original pad measurement and substacts(noise & 0xF)
. Which can be limiting in applications that need more accuracy than touch sensors, such as other metrology tasks.I needed to have the raw signals together with the noise measurements. Currently doing this:
Would it be possible to provide
TOUCH_PAD_DENOISE_BIT0
? This way we could also have the real raw signals without having to "undo" any operations.Thanks for the great work! :smiley: