@ejlane @eiten problem is that before any calculations sensorValue
from analogRead
is 127. So if I use 127 in any formula it's doesn't make and reasonable value.
1000000/(1000000+470000)*127 = 86,3945578231
I took the formula from https://www.mysensors.org/build/battery#external-measurement. R1 and R2 names (not values) are swapped in my schematic
Btw, board was meant to be power by 1,2,3 or 4 AA batteries. It's powered by TPS61025DRCR. But I am not sure I did the power management correctly.