32Hz noise when touch pad is enabled

Emil123
Posts: 3
Joined: Sat Dec 02, 2017 7:15 pm

32Hz noise when touch pad is enabled

Postby Emil123 » Sat Dec 02, 2017 7:37 pm

Hi,

I have a board with an ESP-WROOM-32 module and an MAX4194 Instrumentation Amplifier. The amp has a gain of 1515 to amplify the 0 to 660µV output from a load cell to 0-1V to sample with the ESP32's ADC.

The ESP32 and the analog parts are powered by seperate linear regulators from the same battery. There are no switching regulators on the board.

When the ESP32 is running and the touch pad is enabled I get a 32Hz waveform as seen in the attached image (scope.png). (BTW, that should be 20mV per division, not 2mV as the screenshot shows.)
scope.png
Noise on ADC input as seen on scope.
scope.png (6.39 KiB) Viewed 5911 times
ADC.png
Noise as sampled by ADC.
ADC.png (44.91 KiB) Viewed 5911 times
I do not see this noise before enabeling the touch pad, but as soon as I run touch_pad_init() the noise starts.

Is this normal? It seems strange that the capacitive touch pad peripheral should be making noise, particuarly at such a low frequency.

Is there anything I can do in software to fix this?

Is there anything I can do in hardware to fix this? (Other than low pass filters on the MAX4194 and ADC inputs.)

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: 32Hz noise when touch pad is enabled

Postby ESP_Angus » Thu Dec 07, 2017 2:18 am

Hi Emil,

I've asked the hardware team if they have any feedback about this issue. In the meantime, I have a few notes/questions:
Noise as sampled by ADC.
This image doesn't seem to be rendering for me, can you please check it?
It seems strange that the capacitive touch pad peripheral should be making noise, particuarly at such a low frequency.
To confirm this, you can change the touch pad sleep & measure durations via the function touch_pad_set_meas_time().

The default values are sleep time 4096 cycles (150kHz RTC ticks), and measurement time 65535 cycles (8MHz ticks). This means something like 27ms sleep time and 8ms measurement time, which seems to line up pretty well with the waveform you posted.

Can you confirm no pins are muxed to TOUCH_PAD functions at the time you captured this? If they are, it's possible touch pad signals are being coupled from the capacitive touch pads and their traces.

If no pins are muxed to TOUCH_PAD, where any other pins muxed to other ESP32 analog functions (like the ADC) at the time you captured the trace?

Are you able to show any photos or renders of the PCB layout?

BTW, do I understand correctly that those spikes of approximately 80mV are on the output of the MAX4194? Which implies the voltage at the amplifier input is changing by approximately 50uV?

Emil123
Posts: 3
Joined: Sat Dec 02, 2017 7:15 pm

Re: 32Hz noise when touch pad is enabled

Postby Emil123 » Fri Dec 08, 2017 9:13 am

ESP_Angus wrote: I've asked the hardware team if they have any feedback about this issue. In the meantime, I have a few notes/questions:.
Thank you.
Noise as sampled by ADC
This image doesn't seem to be rendering for me, can you please check it?.
Sorry about that. It didn't render on my computer either after uploading. But when I checked on another computer it was ok, so thought it was a browser issue on my end. New image:
ADC.jpg
ADC.jpg (106.86 KiB) Viewed 5817 times
It seems strange that the capacitive touch pad peripheral should be making noise, particuarly at such a low frequency.
To confirm this, you can change the touch pad sleep & measure durations via the function touch_pad_set_meas_time()
The default values are sleep time 4096 cycles (150kHz RTC ticks), and measurement time 65535 cycles (8MHz ticks). This means something like 27ms sleep time and 8ms measurement time, which seems to line up pretty well with the waveform you posted.
I will check that later today and post an update.
Can you confirm no pins are muxed to TOUCH_PAD functions at the time you captured this? If they are, it's possible touch pad signals are being coupled from the capacitive touch pads and their traces.
If I understand correctly, a pin will be muxed to TOUCH_PAD when I run touch_pad_config() on the pin? If this is correct, then no pins where muxed to TOUCH_PAD at the time I caputured it.
If no pins are muxed to TOUCH_PAD, where any other pins muxed to other ESP32 analog functions (like the ADC) at the time you captured the trace?
ADC1 channels 0,4,5,6,7 where in use. With the signal in question on 4.
Are you able to show any photos or renders of the PCB layout?
I will upload that later today.
BTW, do I understand correctly that those spikes of approximately 80mV are on the output of the MAX4194? Which implies the voltage at the amplifier input is changing by approximately 50uV?
Yes, that is correct.

Emil123
Posts: 3
Joined: Sat Dec 02, 2017 7:15 pm

Re: 32Hz noise when touch pad is enabled

Postby Emil123 » Fri Dec 08, 2017 10:37 pm

ESP_Angus wrote: To confirm this, you can change the touch pad sleep & measure durations via the function touch_pad_set_meas_time().
I can confirm that the time between the spikes increases when touch_pad_set_meas_time() to increase sleep_cycle time.

Martavs
Posts: 1
Joined: Mon Aug 06, 2018 11:47 am

Re: 32Hz noise when touch pad is enabled

Postby Martavs » Wed Aug 08, 2018 1:10 pm

Hello,

Did you find any explanation or solution for this issue?

We are using GPIOs 0, 2, 25 and 33 for 2 I2C lines (100kHz), and GPIOs 4 and 32 for touch pad.
Both functionalities are working but when measuring with the oscilloscope we start seeing a periodic voltage dip in the pins 0, 2 and 33 as soon as we call touch_pad_init(). It does not occur in pin 25 and we see that that pin does not have touch function according to the ESP docs.
I tried calling rtc_gpio_deinit(gpio_num) for those pins later in the code but still the same behavior is present.

Screenshots of the I2C SDA in pin IO33.
PICO-D4_touch_enabled_period.png
Voltage dip period
PICO-D4_touch_enabled_period.png (97.43 KiB) Viewed 5293 times
PICO-D4_touch_enabled_pulse.png
Voltage dip pulse
PICO-D4_touch_enabled_pulse.png (107.63 KiB) Viewed 5293 times
PICO-D4_touch_enabled_SDA_I2C.png
I2C signals and voltage dip
PICO-D4_touch_enabled_SDA_I2C.png (90.67 KiB) Viewed 5293 times

Who is online

Users browsing this forum: Bing [Bot] and 88 guests