Hi
I'm using witty pi 4 mini with firmware 0x07, and raspberry pi zero 2 W (with a camera attached fwiw, but I haven't been using it yet)
I've been using some fairly cheap "50Ah" USB powerbanks; they power the pi 2 zero fine for a few days; I'm trying to extend that with the Witty.
Unfortunately I can't get them to stay awake with the keepalive / dummy load on the mini. They seem to power down even when I bump up the dummy load and white LED to 255ms each, and reduce the period to 1 second. It will work for a few reboots (I've been using something like ON M1, OFF M3; it will work for a handful of cycles but then it will turn off). The powerbanks have only one button, which wakes them up, or turns on a torch / light if held for a couple of seconds. There doesn't seem to be any low power mode etc.
I find that when the powerbank is off, if I unplug the USB-C from the witty pi 4 mini and then plug it back in again, the powerbank comes on and the pi zero boots up (I have set the mini to default power on), in the same way it comes on if you plug in a phone to charge. (Note I'm unplugging + plugging the witty end of the cable, in case there's some magic at the powerbank end to spot a cable being plugged in)
This raises the hardware question: if the RTC had power, could the powerbank be woken up by sufficient load? Is an option like this available in one of your other witty pi 4 variants?
Meanwhile if I press the button on the mini, it does NOT wake up the powerbank. (If I press the button on the powerbank, of course, it does.) So can you speculate what is different in the two cases? Have you witnessed it yourselves?
Of course I don't expect you to "support" the powerbank; but since their behaviour is similar across many consumer products, it would be great if there were a way to work with the power off function... And I guess with the ones I have, the high dummy load required means I won't get much life extension.
Another hardware question - do you sell or recommend a powerbank, or a kit for 18650 batteries with a board and enclosure, which we could use with the Wittys? Something where you know the battery management board so you can interact with it with more certainty?
FWIW, only partly related, I've had a bit of other odd behaviour:
- I've changed the dummy load frequency from 4 seconds to 1 second. After powering off the witty (eg powerbank powers off, or I unplug the witty), this setting is preserved. But the 255ms on the dummy load pulse resets to zero / nothing, and the LED pulse resets to 100ms. Is there some way to either make these persistent, or to set them in a file, which will set it in the registers at boot? (I guess I can work out a way to do this myself; just raising the question). I haven't tried the other settings.
Incidentally, it's been a few decades since I worked much with shell programs; do you have any plans to release a python version? I see the pure-python smbus2 library can replace forking i2cget. (However I can imagine that many of your audience will be happier with shell)
Thanks!
could the powerbank be woken up by sufficient load?
Many power bank has the ability to detect the newly connected load. According to your description, your power bank has such ability. However detecting the newly connected load (and turn itself on) does not always meaning the load is big enough to keep the powerbank alive. This really depends on the implementation of the powerbank. Some powerbanks can not be tricked by just drawing small current periodly, even the interval is short enough. You may have to increase the current for real. Connecting a resistor between 5V and GND in GPIO header may help.
If you search "power bank" or "dummy load" in this forum, similar topic has been discussed more than once. I did recommend some power banks with "always on" mode, please search in this forum to find that post.
All settings are saved to I2C registers that backed by EEPROM, they should be persisted even after power loss. However in some extreme cases they might get (partially) loss, for example the input votage is too low.
We currently do not have a plan for Python version.
Please try to ask only one question a time, as written in the forum rules.