Hi, been using VF2 alot and left it once at night compiling stuff. Woke up at morning and it was at boot password prompt (my system is encrypted on it). Lost alot of work (I compiled into tmpfs that night). Last log entries suggested it was just reset, or power was gone.
I immediately thought that a conventional powerbank can serve as a battery backup for possibility of such event. But here lies the trouble: most powerbanks you buy today do NOT provide constant power when you start or stop charging them, they RESET their output to 0v for a short period of time once you connect them to wall socket. I’ve got three, one is xiaomi, another is of shady chinese origin, and third is very ancient with replaceable 18650 cells. All behave the same way.
I post this as a new topic because my attempts to find powerbanks with UPS/passthrough features on sale all failed - they’re a typical deficit item targeted by RPi customers. Maybe amongst us here people who faced same problem and know the right brand and model?
P.S. I need a safe solution hence why I think about powerbank. Li-ion batteries are known for their reactivity, so I dont want to set fire with diy UPS.
I have TOMO powerbank which charges each of 18650 battery separately, so it can charge and provide power at the same time. One drawback - it is louder that normal powerbanks.
The 5v gpio pin was regulated whether input was 12v or 5v, and the gpio pin also one of the VF2 power sources as documented, so I think putting a super capacitor there should help power the board during that 1 sec power down.
crazy idea
if you have another device that’s always on with a battery maybe you can power it off that
for instance, I have a celeron tablet that idles at around 3-4 watts, it has a type-c port …
DISCLAIMER if you’re going to repeat my steps, you’re going to put your boards in fire, UNLESS you KNOW what are you doing! Author is NOT responsible for any of YOUR actions. This is just an advice or, more like, report of field adventures with devices holding enough power to set your home in fire. BE WARNED!
So here is my current temporary plan (so, dudes, don’t put this into production! This can kill your boards! meh, usual DISCLAIMER) of using only single powerbank:
Connecting cheap powerbank (cheap ones never reach specs like “usb-c port for quick charging your equipment” to GPIO (how you would like to do this is up to you. I have USB-A to lots of P/N 2.54 connectors connected, for each domain: parallel each, to relatively thick wire tip)
Connect GPIO power headers, prepare to connect powerbank to USB-A
Connect your USB-C power as usual (btw does anyone know if USB-C here is only a “sink” type port?)
Connect main power source. Boot your board.
Connect USB-A end of GPIO to powerbank.
What I’ve got:
During normal operation, without powerbank, the main power source (say, 15W USB-C charger) supplies voltage, say, 4.93V
Connecting powerbank and measuring it with USB tester I see PB bumps voltage to 4.99V and starts to give partial energy (0.1A) but not so sufficient to actually make battery drain very quick and well above threshold if you worried that powerbank will self turnoff.
Now, interesting part. Cutting power from main supply (the charger) goes almost unnoticed: load is dumped on still active PB and it goes straight into GPIO. PB just hooks up additional power. System keeps running without any dips, although it is observable that fan drops cycles abit. But stuff inside OS still working. SSD working. Good.
Bringing main power back again causes two sources to “fight” for percentage to be served, main one wins and leaves secondary PB only these 100mA which are well enough to shut up his guts about even an idea of turning auto off.
No running rust build processes was harmed during testing (4 tests were carried, one within less than a second).
I know, sounds sketchy, dangerous (why shall you dual-power it?) and will not work for everyone. But it works for me right now with materials I’ve got at hand.
Now, limitations.
Device will NOT survive cuts of mains power if powerbank starts charging - these crafty things inside usually prefer to reset their output completely if such event raises. So that’s why I went with “low drain auxiliary battery”. Draining just half a watt out of it might not be efficient for internal circuitry of PB, but might save hours or days of compiling time (Imagine these big UPS and how they get disposed off after them idling 99.8% of their lifetime and only .2% surges draw from their Lead-Acid boxes, leading to their degradation). Once all lights off - go recharge it and run the second power input from your laptop for example.
I tried to solve this by stacking mains charged master powerbank charging slave powerbank LOL it worked (kinda). I still did not figured out what order and which one shall be on the second rail and which becomes a source of power and what timings of these process.
Some powerbanks even trashy - they crowbar the line in the event of reset and nobody cannot recover from this.
Hopefully this will be resolved by USB-C compilant powerbanks which will never disconnect their load as long as load commands them not to. But these are still high class items now.
I know, yeah, but perhaps for this application a full featured UPS is total energy disaster, as it will eat more idling and converting rather than a powerbank. And there are powerbanks which are capable of being as UPS, I just want to know exact models.
I think there shuld be “PoE UPS”. VF2 use this is needed a PoE Module.
UPS is not energy eater when it is on standby. Your solution is need keep the battery voltage higher than the changer.