Recently I am trying to build a Ni-MH battery charger with ESP32, more specifically using an ESP32-DevKitC board with a Rev1 chip. I used the ADC1 to monitor the battery voltage and logged it on a computer. The code is derived from the adc example code included in esp-idf. To my surprise, I discovered some strange, occasional jumps of the output offset that are around 4 LSBs and last for quite a few seconds or even minutes. This is quite annoying -- even oversampling won't remove this kind of correlated noise.
Attached is a plot of ADC conversion results over the course of ~20 minutes. A battery (very quiet and stable) is connected to pin34 via a 10k/10k voltage divider + 220nf decoupling cap between pin34 and ground. I also did 4096x oversampling and decimated the result to 16 bits. WiFi or BT are not used.
What I have tried so far:
- Switch to different channels/pins --> does not help
- Use ADC2 instead of ADC1 --> does not help
- Use different attenuation --> does not help
- Use lower or higher ADC clock division--> does not help
- Force ADC power on (ADC_POWER_SW_ON) --> does not help
- Add delay between ADC conversions --> does not help
- Reduce CPU clock to 80MHz --> does not help
- Shield the board & battery --> does not help
Initially I have suspected that this could be due to the local non-monotonicity of the ADC. But later I realized that this occational fluctuation is actually additive -- It shifts everything up by 4 LSBs, no matter what the input voltage is.
I appreciate it if there are any solutions. Thanks!
ESP32 ADC strange offset drift
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: nguyennamdsn and 61 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.