esp32-c6 adc1 ch1 vs ch2

liebman
Posts: 18
Joined: Wed Dec 09, 2020 7:03 pm

esp32-c6 adc1 ch1 vs ch2

Postby liebman » Fri Aug 25, 2023 8:28 pm

Hi, Using an esp32c6 and esp-idf version 5.1.1 I've set up a voltage divider with two 100k resistors to measure battery voltage. When I use adc1ch1 (gpio1) it pulls the voltage of the divider down throwing the measurement off. If I use adc1ch2 (gpio2) it does not. Is this something that can be disabled or is this intrinsic to that pin?

liebman
Posts: 18
Joined: Wed Dec 09, 2020 7:03 pm

Re: esp32-c6 adc1 ch1 vs ch2

Postby liebman » Sat Aug 26, 2023 5:23 pm

For instance, with 3v at the top of the voltage divider the center measures 1.5v when not connected to gpio1, it measures 1.2v when connected to gpio1 and 1.5v when connected to gpio2. With 4v at the top of the divider, I measure 2v when unconnected and 1.5v when connected to gpio1. Is seems that the pulldown is enabled tho esp-idf logs this when I configure the channel:

Code: Select all

I (678) gpio: GPIO[1]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
Update: the LP_IO_GPIO1_REG also agrees that the pullup and pulldown should be disabled.

Who is online

Users browsing this forum: Google [Bot] and 108 guests