Any way to get a ball park estimate how long a wireless keyboard will last under these circumstances? < 12 hours?
I got an old Apple wireless keyboard, model A1016, which needs 4 AA batteries. It needs about 0.8 mA and with spikes of 2 mA when you type. So would last for about 2 months. When you search in Google, it says 1 month with 7 hours per day. I guess it needs more current when the voltage is lower, so expect at least a week. Newer keyboards might need less power.
Regarding an earlier post about this keyboard type: It showed 39% without Batteroo and 87% with Batteroo. I checked the voltages, some values for the Mighty Monitor (or the context menu in the bluetooth symbol; it has a really slow update, fastest is to turn off the power supply, wait until connection lost, change the voltage, then turn it on again) :
3.9 V: 5 % (it doesn't turn on reliable below this level)
4 V: 11%
4.1 V: 15 %
4.2 V: 18 %
4.5 V: 30 %
4.7 V: 36 %
4.8 V: 40 %
4.9 V: 44 %
5.7 V: 71 %
5.9 V: 78 %
6.1 V: 85 %
6.14 V: 89 %
6.2 V: 91 %
6.4 V: 97 %
6.5 V: 100 %
So the Batteroo sleeves boosted from 4.8 V to 6.14 V, which means from 1.2 V per cell to 1.54 V per cell. And the keyboard still works with 0.98 V per cell. This means there is only less than 10 % power left for Batteroo, not 80 %. In combination with the boost converter losses, which might be even higher for such low currents, I would expect no advantage, compared to running it without the sleeves. But you might need some months patience to do all the tests.
If you want to get the battery level from a script, you can do this:
ioreg -l | grep BatteryPercent
This searches the whole registry, could be optimized, but Apple changed the path between different MacOSX versions, so this should work always. You could paste the output of "ioreg -l" to a file and search for it, then use "-n" to get the attributes for the specified object, only, which is a lot faster. On Mac OSX Sierra this works:
ioreg -n "IOAppleBluetoothHIDDriver"|grep BatteryPercent
Output looks like this:
| | | | "ExtendedFeatures" = {"FactoryDefault"={"id"=69,"type"=2},"RecantConnection"={"id"=65,"type"=2},"DeviceNameChange"={"id"=80,"type"=2},"DeviceName1"={"id"=81,"size"=8,"type"=2},"DeviceName2"={"id"=82,"size"=8,"type"=2},"DeviceName3"={"id"=83,"size"=8,"type"=2},"DeviceName4"={"id"=84,"size"=8,"type"=2},"BatteryState"={"size"=1,"id"=48,"min"=0,"max"=2,"type"=0},"BatteryPercent"={"size"=1,"id"=71,"min"=0,"max"=100,"type"=2},"WillShutdown"={"id"=64,"type"=2},"FullFactoryDefault"={"id"=68,"type"=2},"UserMode"={"size"=1,"id"=67,"min"=1,"max"=3,"type"=2}}
| | | | "BatteryPercent" = 86
Should be easy to parse in Python, to log the battery percentages, to make it a bit more professional. Battery percentages can be directly mapped to voltages, no need for an external logger (except if you want to log the real battery output, too, before the sleeve, and the current, but this could be derived as well from the out output voltage, if there is no special behaviour in the regulator chip).
I don't have the Batteroo sleeves anymore, and not the time to do the month long test (I have a Mac Book and need it sometimes), but if someone wants the keyboard for a test, I can send it to you. Was cheap, used, and is an old model, I bought it just to measure the voltages
![Smiley :)](https://www.eevblog.com/forum/Smileys/default/smiley.gif)