[SOLVED] Choosing a GoPiGo3 Safety Shutdown Voltage for the ModRobotics Battery Pack

(Breaking this out from @Jimrh’s First Impressions thread)


Oops - now your comment about breaking it out makes sense.
I replied here:

Future replies will be here to maintain the proper thread.


I’m guilty also.


So it’s probably OK. But nothing wrong with belt-and-suspenders when it comes to a lipo battery.

1 Like

@Jimrh “promised” me the battery protection circuitry inside the battery is “mature” and can be trusted not to burn my house (or my marriage) down.

My concern is to protect the SD card actually. The actual value is to maximize runtime while not stressing the battery, but the “Safety Shutdown” refers to protecting any not-backed up logs, data, and in-progress programs on the SD card.

1 Like

Today was ROSbot’s first boot using the ModRobotics battery. The session was mostly sitting running the measureLife.py program, with some rare servo or motor usage. The safety shutdown was configured for a GoPiGo3 reading of 9.15 volts and indeed it safely shutdown at 9.11 volts after 9 hours and 49 minutes!

********* ROSbot Basic STATUS *****
2021-06-13  22:04:19 up  9:49,  2 users,  load average: 0.07, 0.05, 0.06
Battery Voltage: 9.13
5v Supply: 4.97
Processor Temp: 40.2'C
Clock Frequency: 1.10 GHz
Connection to X.0.0.x closed by remote host.

Wow - that’s pretty good, although the motors and lidar will shorten that by quite a bit.

Was the shutdown initiated by the board, the battery, or the software? Seems to be that lattermost.

1 Like

In software, by my measureLife.py program status loop.


More Facts:

  • With LIDAR (powered but not spinning 150mA), GoPiGo3 (not moving), RPi3B+ running measureLife
  • 5h 7m to 9.75v battery / 9.15v GoPiGo3 reading 2250mAh
  • 5h 32m to 8.15 battery / 7.5v GoPiGo3 reading battery protection circuit power cut 2480mAh

I’m contemplating changing my “Safety Shutdown” to 9.0v battery / 8.35v GoPiGo3 reading to harvest another 5% of the battery down to 5% capacity. Really weird that the battery protection circuit waited till 8.15v.

1 Like

That is lower than I’d want to go normally. Even 3V/cell makes me a little anxious.


Totally agree.

That extra 5% may end up costing you battery lifetime and I would hesitate scavenging that extra runtime until we have this more accurately characterized.

Once I get things cleaned back up, I may want to steal your battery monitor software and try it with the three batteries I have.

(Would you please post a “this is what I’m using now” link to the code you used for these measurements?  When I test, I want to make sure I’m doing what you did.)

Any idea why they let the battery go so low - or maybe it is component tolerance dependent?

Any possibility of my getting a copy of the schematic for the power monitor board?


I’m running tillShutdownLife.py again now.
To bring it down to your bot and run it:

wget https://raw.githubusercontent.com/slowrunner/rosbot-on-gopigo3/main/systests/battery/tillShutdownLife.py

chmod 777 tillShutdownLife.py


Sample output:
********* ROSbot tillShutdownLife.py STATUS *****
2021-06-18  11:06:09 up  3:04,  2 users,  load average: 0.04, 0.04, 0.00
Current Battery 10.14v EasyGoPiGo3 Reading 9.33v
5v Supply: 4.97
Processor Temp: 44.0'C
Clock Frequency: 1.10 GHz

I measured the REV_PROTECT_DIODE drop of ROSbot to be 0.81v. The prior run I was using 0.65v which was Carl’s measured drop. I cannot vouch for the accuracy of my voltmeter; It claims 0.2% voltage accuracy which would be +/- 0.02 at 9v, but it is not a certified instrument.

1 Like

Unless you’re using Schottky diodes, the “typical” drop is right at 0.70v.   And unless the diode’s manufacturing process was right down the dumper, that voltage is close enough that it’s a common trick to use the drop across a silicon diode as a precision voltage reference.

I’d assume that the diode drop is 0.70 v and any difference between that and your measured drop is very likely to be a calibration and/or low-end offset error in your measuring instrument.

Schottky diodes using germanium junctions weigh in at 0.40v per junction.

Again, it’s close enough to use as a reasonable precision standard assuming you don’t need parts-per-billion accuracy/precision.

Chip manufacturers typically used stacked diodes for precision voltage references of different voltages, (seven silicon junctions gives 4.90v for example), and it’s easy to trim the gain and offset on the voltage comparitor op-amp to get exactly what you want.

Manufacturers typically use relatively few junctions and make up the difference in the comparitor.

Bottom line:

Believe the junction voltage before you believe the meter.

1 Like

Actually I believe the extra drop between the meter and the GoPiGo3 reading is from the three barrel plug/jack junctions AND the tiny wires in the USB to Barrel wires, and the wire in three way power splitter.

The actual battery voltage is probably 0.1v or so higher than the meter due to the Barrel plug to USB adapter between the meter and the battery carrying 9-12v at 500mA.

1 Like

I’d measure that before I would believe it since I doubt you have a half-ohm-plus resistive drop across all of that wirng, unless something is REALLY strange and/or wiring has been added that is too thin.

If that’s the case, the diode drop is the least of your worries.

These contacts and leads should be able to carry the full load at full rated voltage/current with losses that are truly de minimus - and a couple of tenths of a volt, (or so), is not de minimus.

1 Like

Back when the Pi cam out, the voltage drop with many of the USB A to USB A micro wires I bought, used with the “5v 2A” adapters I bought was on the order of 0.1-0.2v.

The last adapter I bought says “5.3v at 2.5A” to make the voltage at the end of the wire meet the USB spec.

The wires in the cables I have are like soldering to hair.

1 Like

I forgot to mention to run it from an remote ssh shell so that you can still see the output when the Pi gets the power jerked away.

Today’s Run:

tillShutdownLIfe.py with LIDAR not spinning, GoPiGo3 just standing, RPi3B+ load 0.04
- Battery protection circuit shut off at 5:57:30 8.28v Battery 7.47v GoPiGo3 reading
- “Too Low” 9.12v Battery 8.31v GoPiGo3 reading 5:55:40 (~2 min reserve)
- “Nearing Shutdown” 9.72v battery 8.91v GoPiGo3 reading 5:43 (~14 min reserve)

1 Like

I’d still take a good, hard, look at that wiring.

A 0.3v drop is unacceptable.

Assuming a full-load edge case, that’s over one watt of power loss in the cable. The several tenths of an ohm in series with the varying load of a 'bot can cause voltage fluctuations I’d rather not see.

Before you do anything else that requires power, I would strongly suggest you beef up the wiring, get top-end cables that can handle the current draw, and get that voltage drop as deep into fractional milliamp territory as possible.

It is not unreasonable to expect a full-load voltage drop near the absolute minimum you can measure.

I do the same when installing automotive batteries. I get everything sparkling clean and shiny, clamp down tight, and measure the voltage drop while cranking:

  1. Between the center of the terminal and the terminal connector clamp.
  2. Between the center of the negative terminal and both chassis and the engine block.
  3. Between the center of the positive terminal and the center of the big fat lug where the battery connects to the starter.

Anything more than fractional millivolts gets investigated and corrected.

1 Like

That doesn’t sound like a “One SMOP problem” (Small Matter Of Programming).

Convenience wins this time.

1 Like

You might want to put a fractional-ohm dummy load on the system to pull max power.

If you can get the end-to-end drop into the fractional milliamp range at full rated power, (check the drop on both sides of the line), then maybe add a snubbing network from V+ to V- to improve S/N ratio, and things should be peachy.

Don’t forget to periodically re-test the static drop at full load.

Power source points typically have mega-gain from VCC/VSS to the signal leads where line noise is concerned.

Microvolts of noise across VSS/VDD can turn into significant fractions of a volt of noise in signal circuits causing all kinds of weird things to happen.


You might want to do a voltage drop and/or noise study on your own 'bot running balls to the wall at max current draw.