Post links and attach files for documentation here, also chat about these docs freely

User avatar
By sibianul
#70662 For me it was confusing to see the reported value for A0 pin of 1024 (fully saturated) at a voltage of 3.9v, I would expect the divider to be good for measuring the battery voltage, wouldn't you too? I mean, this is a module with a battery socket, where it helps to have a voltage divider to measure up to 3.3v when the battery maximum is 4.2v?

On other forums some guys asked me if I can measure the resistors but it seems they recommand to not measure them on the pcb, as the other circuitry is influencing the result, with the link you provided (I google but couldn't find to many result for ESP wroom with 18650 battery, thank you for finding out that link!!!) some things are clearer now.

What are your suggestions to be able to measure up to 4.2v?

I only have one idea, to swap the R2 resistors with a lower voltage, I have to look over to see what I can find around 68k . Is there a simpler way to be able to measure up to 4.2v ?

Thank you.
User avatar
By schufti
#70670 yes, just connect the battery via 180k resistor to the A0 pin. This will extend the range to 5V.
With 130k it will expant to 4.5V

Instead of decreasing the lower (position) resistor you just increase the upper one, spares you the solder job.

Don't forget that the unit is 1/1024 volts! 1V <> 1000 !
User avatar
By sibianul
#70690 Thank you for the advice :D I finally have a good reading. I connected an 100k resistor (so now the total is 320k) and I adjusted the formular in ESPEasy to match my multimeter reading

Formula:
%value%*4.4/1024

And now I have a matched reading on my graphs too

Thank you.

dashboard battery reading.jpg
You do not have the required permissions to view the files attached to this post.