ESP32-C3-DevKitC-02 ADC bias drifts a lot over time

koshin
Posts: 10
Joined: Sat Apr 15, 2023 11:30 pm

ESP32-C3-DevKitC-02 ADC bias drifts a lot over time

Postby koshin » Sun Apr 16, 2023 6:07 pm

I am using the ADC continuous mode driver with ESP-IDF v5.1 on an ESP32-C3-DevKitC-02. I am reading from an adafruit MEMS analog microphone SPW2430 (https://www.adafruit.com/product/2716). During 10 seconds of data recording, I see significant drift in the "zero point" of the microphone. Here is 10 seconds of data sampled at 4 KHz, with no other processing performed:
biasdrift.png
biasdrift.png (30.76 KiB) Viewed 1967 times
You can see that after each spike (I am hitting a drum for testing), the bias shifts down a bit.

Do you have any idea whether this is more likely to be bias drift in the mic, or in the ADC? If the latter, is there anything I can do to elimintate this drift?

xien551
Posts: 69
Joined: Wed Feb 02, 2022 4:04 am

Re: ESP32-C3-DevKitC-02 ADC bias drifts a lot over time

Postby xien551 » Mon Apr 17, 2023 9:03 am

Usually, the accuracy of a ADC depends on the voltage reference, for c3 the VCC 3.3V. You may measure your c3's VCC for 10 seconds for sure.

I have not used the adc of C3. But for ESP32, I can not see the drift of adc for half an hour.

For your microphone, is it a capacitive type. If it is, it may drift.

But another quesion is that the microphone did not care about the DC drift, only ac 20-20KHz signal is needed.

The step drift after each spike may not affact your microphone application.

hope this helps!

koshin
Posts: 10
Joined: Sat Apr 15, 2023 11:30 pm

Re: ESP32-C3-DevKitC-02 ADC bias drifts a lot over time

Postby koshin » Wed May 03, 2023 10:27 am

Very helpful -- thank you! I am now eliminating the bias drift in software and it seems to be working great.

Who is online

Users browsing this forum: No registered users and 397 guests