Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By btidey
#80480 Because the NodeMCU already has a divider it is best not to use an external divider if you want to increase the division ratio above the supplied 3.2 This just makes the calculation more complicated and increases the battery drain.

Instead just include an extra series resistance between the battery voltage and the analog input. This is simpler and minimises battery drain.

You start with
Board Input ----220K ---- ADC ---- 100K ----0V

So include an extra 100 or 120K in series between the battery and the input

Battery --- 100K --- Board Input ---- 220K ---- ADC --- 100K ---0V

Now the divider is 4.2:1 which should be OK for most LIPOs

If you used 120K extra

Battery --- 120K --- Board Input ---- 220K ---- ADC --- 100K ---0V

the divider would be 4.4:1 which would give a bit more headroom.
User avatar
By Bonzo
#80486 This is all quite interesting and as I say I did not have the correct resistors at home so took the board and battery into work.

Using an old 500K pot I found that 130K resistor in series gave a value of 992-996 which I am currently using.

Out of interest I checked using the pot with the 75K in the potential divider and I needed 425K for a 988/989 reading.

The potential divider gave a more stable result floating 1 bit? and the in series resistor was 4 bits?

I did consider leaving the pot in but I think the resistor will be better and I have the pot to use again if I have a similar problem. I will add a bit of code to average the result anyway.

I think the board is quite robust as I must have gone over the 3.3V a couple of times. Although I suppose by the time it has gone through the internal potential diveder it is about a third of what I put in.

Thank you again everyone for the input.
User avatar
By Bonzo
#80569 This image may be of interest; the result of a 4 cell Lipo battery pack over the last few days. It will be more interesting when starting from a full charge. The charge appears to be dropping off faster now which is what I expected. I will connect the battery up to my new ADC when it comes and it should hopefully give a smoother curve.
Image updated - the battery died quicker than I thought it would

Image