Choosing resistor values for a voltage divider ESP32-C3 analogue input

Experimentalist
Posts: 2
Joined: Fri Oct 27, 2023 2:55 am

Choosing resistor values for a voltage divider ESP32-C3 analogue input

Postby Experimentalist » Fri Oct 27, 2023 3:47 am

Hi

Can anyone tell me what the ideal output impedance is for a circuit that is to feed its analogue signal into an analogue input on the ESP32-C3?

I can't find that information in the data sheet. I am planning a voltage divider to read the voltage from a single cell Lipo and was going to use 220K Ohm resistors but this maybe too high an input impedance to get accurate readings from the ADC.

Anyone?

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: Choosing resistor values for a voltage divider ESP32-C3 analogue input

Postby ESP_Sprite » Fri Oct 27, 2023 9:10 am

Datasheet says input pins have 50nA leakage max. Combined with a 220K resistor, that means a voltage drop of 11mV. Given that on the 1.1V range, one ADC count is (1.1V/4096=)0.27mV, I'd say 220K is a fair bit if you want a non-skewed reading. Going by those numbers, something in the order size of 4.7K would be something that doesn't have that skew. However, it depends on what you're gonna use that ADC reading for: if being off by 11mV is no issue to you, you can happily use that 220K resistor.

digitalstables
Posts: 6
Joined: Wed Oct 05, 2022 8:56 pm

Re: Choosing resistor values for a voltage divider ESP32-C3 analogue input

Postby digitalstables » Sun Jul 28, 2024 9:58 am

Hello,
i have a very similar problem. i have an rtc which uses a 1220 battery 3v as backup power.
i want to read the voltage of the battery using an analog pin and to avoid draining the battery when the power is off i thought of connecting the output lf the battery to the pin on the esp32 with a voltage divider or a simple resistor. i was thinking of using the divider of 2M and 1M or to simply just use one 2M resistor between the battery and the analog pin.

would love to hear feedback as go what approach to follow and if the resistors are too high. i am just trying to minimise current leakage.

thanks

vvb333007
Posts: 3
Joined: Wed Jul 31, 2024 5:53 am

Re: Choosing resistor values for a voltage divider ESP32-C3 analogue input

Postby vvb333007 » Thu Aug 01, 2024 6:51 am

imply just use one 2M resistor between the battery and the analog pin.
Yes many people do like this.

However the discharge curve of cell batteries are very flat until they are almost discharged.
So unlikely you can get something like 90%, 75%, 52%.. It will be sort of 100%, 100%, 100%, and then suddenly 30%. May be choosing a rechargeable cell battery (LIR1220) will be better choice (provided you have a charging circuit).

Who is online

Users browsing this forum: No registered users and 143 guests