Testing power bank capacity with Librem 5

Voltage measurements in almost all test equipment are taken accross a very high resistance (typically across 20M ohms or more), to avoid significant current consumption when sampling voltage. This is inside of the meter.

Current measurements in almost all test equipment are taken through a shunt, to minimize current losses by sampling only a small percentage of the total current and then by extrapolating to derive the total current flow amount.

If the phone employs both of these methods in its internal measurement taking, or if external equipment employs both of these methods (as is typical of any test equipment), then the voltage and current sampling should not consume enough current to affect the results. But oversampling in this application is still not a good thing to do for several reasons.

2 Likes

I did that in April for an e-reader that runs linux (I don’t yet have a Librem 5) using a USB charger rather than a battery power bank. The topic after all is the amount of power bank capacity used to charge, so measuring during charging is relevant (but possibly not required).

The reader’s device tree has the directory /sys/class/power_supply/max77796-battery/ which, among other things, cotains

capacity (state of charge in integer %)
current_now (signed integer ma)
current_avg (signed integer ma)

A 1 minute sample rate was used because some years ago I determined that ensured at least one update of the device tree between samples (using a different and older model e-reader from the same manufacturer).

I also used a newly purchased FNB48S between the charger an reader. The FNB48S was powered by the data logging computer, not the charger.

Attached is a plot of the collected data. Note that when the reader stopped charging, the battery current dropped to 0 but the reader continued to draw 100 ma, which I assume is the reader’s idle draw.

Attached is another plot with 100 ma subtracted from the measured current supplied by the charger, which isn’t quite consistant with the 100 ma idle current draw hypothesis, but this isn’t due to some gross FNB48S inaccurracy.


As to the utility of “high” sample rates, note during the charge taper phase.

Of course, this proves nothing at all regarding the details of a Librem 5 charge cycle, I think it shows some of the considerations involved, but I thinks it shows that power bank capacity divided by L5 battery capacity is unlikely to give a good estimate of the number of full charges that can be delivered by a single charge of the power bank.

2 Likes