Due to Carl’s recent lack of stamina (four weak AA cells), I am running two different battery voltage monitoring programs (one logs, the other will shutdown just before the bottom falls out).
The program using gpg.get_voltage_battery() is consistently reading 0.08 to 0.12 volt lower than the program using egpg.volt().
(My early testing reported 0.6v less than the actual battery voltage that @Matt explained was due to a reverse polarity protection diode. )
I probably should not be worried about a silly 0.1v but I want to choose a shutdown voltage to juice every running minute I can safely get from Carl while attempting to maximize the cell recharge cycles.
Any idea why these two battery voltage methods are different?
I changed to having both programs use egpg.volt() and still see a difference, but close inspection shows that one is using str(round(battV,2)) while the other prints using %0.2f.
Not exactly sure how this results in a difference like 8.63 vs 8.52 since Matt had indicated the bit resolution was 8.5mv or 0.0085v. Something weird is going on, but it seems beyond my investigative abilities to understand why one program (which does more than just call volt() method) would consistently read lower.