ADC1 noise at low voltages
Posted: Fri Jan 27, 2023 7:40 pm
I'm using ADC1 on the ESP32-S3 in Continuous mode, 10kHZ sample rate, 11dB attenuation, and I'm getting some weird noise or "ringing" in the troughs of the trace below:
Here's an analog logic probe capture of the exact same signal (measured near the IO pin):
The signal is generated by a current transformer measuring a 60Hz mains supply to a halogen lamp.
Has anyone seen this sort of thing before, and have any tips? I know averaging is possible but I'd like to clean up the raw input a bit more before I go there.
Here's another pair of traces (from when the lamp is first turned on):
My code is using ESP-IDF. I'm pretty sure the problem is a configuration or code issue, because when I reverted to an earlier version that uses CircuitPython and a series of one-shot samples (also at ~10kHz) I get a cleaner result:
I'm guessing the CircuitPython libraries are doing some tricks my rudimentary ESP-IDF code (which was copied from the ADC continuous_read example) is not.
Here's an analog logic probe capture of the exact same signal (measured near the IO pin):
The signal is generated by a current transformer measuring a 60Hz mains supply to a halogen lamp.
Has anyone seen this sort of thing before, and have any tips? I know averaging is possible but I'd like to clean up the raw input a bit more before I go there.
Here's another pair of traces (from when the lamp is first turned on):
My code is using ESP-IDF. I'm pretty sure the problem is a configuration or code issue, because when I reverted to an earlier version that uses CircuitPython and a series of one-shot samples (also at ~10kHz) I get a cleaner result:
I'm guessing the CircuitPython libraries are doing some tricks my rudimentary ESP-IDF code (which was copied from the ADC continuous_read example) is not.