I got a Lolin D32 preloaded with micropython & the battery voltage presented to gpio35 via a voltage divider with 1% 100k resitors. The battery is sitting @ 4138mv but the value I get from gpio35 can vary from 4080mv to 4196mv. I've struck this variation with the 12 bit adc on other esp32 based boards, so I thought I'd try to smooth the jitter.
If I do 100 sequential adc.read()s the count always increases between the first & last read, eg [2380, 2382, 2427, 2427, 2428, 2429, 2429, 2430, 2430, 2431, 2431, 2431, 2431, 2431, 2432, 2432, 2432, 2432, 2432, 2432, 2433, 2433, 2433, 2433, 2434, 2434, 2434, 2435, 2435, 2435, 2436, 2437, 2437, 2437, 2437, 2437, 2437, 2437, 2438, 2438, 2439, 2439, 2439, 2439, 2440, 2441, 2441, 2442, 2442, 2442, 2442, 2442, 2443, 2443, 2443, 2443, 2444, 2445, 2445, 2445, 2445, 2445, 2445, 2446, 2446, 2447, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2449, 2449, 2449, 2450, 2450, 2451, 2451, 2451, 2452, 2452, 2452, 2453, 2453, 2453, 2453, 2455, 2455, 2455, 2455]
I've tried using the mean, the median, varying the number of reads, reducing the adc width, but nothing seems to narrow the variation from one battery voltage call to the next. Just wondering if anyone has come up with a way of getting more consistent results from the ADC?
Lolin D32 battery voltage using microppython
Return to “General Discussion”
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- ESP32-S31
- 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 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- ESP32-S31 中文讨论版
- 喵伴 中文讨论版
- 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: No registered users and 2 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.
Information
Espressif ESP32 ... Available now!