Page 1 of 1

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

Posted: Fri Oct 27, 2023 3:47 am
by Experimentalist
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?

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

Posted: Fri Oct 27, 2023 9:10 am
by ESP_Sprite
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.

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

Posted: Sun Jul 28, 2024 9:58 am
by digitalstables
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

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

Posted: Thu Aug 01, 2024 6:51 am
by vvb333007
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).