[SOLVED] Gpg.get_voltage_battery() vs egpg.volt()

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?

Further investigation:

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.

1 Like

EasyGoPiGo3.volt() is a simple wrapper for GoPiGo3.get_voltage_battery(), so it should return the exact same value.

Due to slight fluctuations in the battery voltage (could be due it part to varying load), as well as the tolerances discussed in the previous thread on this topic, the read battery voltage could be subject to minor differences, even within a short time.

If one program seems to be showing values consistently higher or lower than the other, I would recommend that you standardize how you are printing the values.

You’re running a GPG3 on just four AA batteries? We recommend that you use eight AA batteries to power the GPG3 (six AA batteries at minimum).

2 Likes

No. Running on eight, but four weathered a bout of inactivity poorer than the other four. The combination only recovered to 60 or 65 percent of prior capacity.

This experience has shown how important it is for Carl to be enabled to manage his own power system, for his own good. I need to resume that project immediately.

2 Likes