10 ms·
Potential Issues of Using a USB Powerbank as a UPS (2021)
- dtx1 4y agoIf you are going to use lithium batteries for UPS purposes, you should look into lifepo batteries. Much safer for that purpose
- gambiting 4y agoWhat makes them safer? Can you explain please?
- AzN1337c0d3r 4y agoBasically, they are much less likely to vent violently. https://en.wikipedia.org/wiki/Lithium_iron_phosphate_battery#Safety https://en.wikipedia.org/wiki/Lithium_iron_phosphate_battery...
- dtx1 4y agoThey are in no particular order more resistant to under and overvolting, much more cycle resistant, much more resistant to storage under high charge level, much harder to get to explode etc. For UPS purposes they are the correct choice all around-
- neilv 4y agoFor some non-UPS but related use cases... I don't think it's uninterrupted, but I use this Anker PowerCore Fusion III as my main wallwart USB-C fast-charger, with the bonus that it also keeps its own internal 5 Ah battery charged: https://www.amazon.com/gp/product/B085CFD3Z9/ https://www.amazon.com/gp/product/B085CFD3Z9/ Current model might be: https://www.amazon.com/dp/B01K702S66/ https://www.amazon.com/dp/B01K702S66/
- walterbell 4y agoZMI no20 claims to support uninterrupted UPS mode, but doesn't seem to be available for purchase, https://www.macworld.com/article/539605/zmi-powerpack-no-20-review-compact-external-battery-can-charge-a-macbook.html https://www.macworld.com/article/539605/zmi-powerpack-no-20-...
- Snuupy 4y agoZMI Ambi (10k mAh/18W) does as well. Likely discontinued and replaced by a newer model now though. Perfect for a rpi UPS.
- rektide 4y agoMy ZMI PowerPack 20k & 20k Pro's are still my daily drivers (good for 45W/65W only, but fine for my use), but I did snag one of these off the indiegogo (for the high-speed dual port capability). I hadn't realized it has this uninterrupted capability- awesome. I use USB-C to dc-barrel jack adapters, and this it an makes an affordable, reasonable capacity UPS. It seems to still be available on alibaba and ebay. https://www.aliexpress.com/i/3256802290206038.html?gatewayAdapt=4itemAdapt https://www.aliexpress.com/i/3256802290206038.html?gatewayAd... It is truly excellent seeing battery packs with >1 input-output USB-C port (100W and 45W combined).
- roboben 4y agoMarket gap! Someone should produce USB UPS for the raspberryPi server setups of this world. I’d buy one!
- swores 4y agoAlready exists, e.g. using the PiJuice HAT as explained here: https://howchoo.com/pi/raspberry-pi-ups-uninterruptible-power-supply https://howchoo.com/pi/raspberry-pi-ups-uninterruptible-powe... (Disclaimer: no experience myself, just remembered seeing multiple HATs in this area in the past so did a quick search)
- roboben 4y agoA HAT seems to by way to complex and less flexible then a small black box you can plug your USB charger in and a USB cabel comes out
- rwmj 4y agoReally? I'd far rather have a UPS hat than another external brick, assuming the hat provided passthru so it didn't block the addition of further hats.
- swores 4y agoAnd indeed that one does: "PiJuice will use up to just five of your GPIO pins (just power and I2C), the rest are free to diversify your project. The stacking header allows you to continue to use your existing HATs and add-ons with PiJuice." from https://uk.pi-supply.com/products/pijuice-standard https://uk.pi-supply.com/products/pijuice-standard But sure, some people/projects might prefer to shift the hardware to not be attached to the Pi. I wouldn't be surprised if you could find a product that does that too, or at worst I presume a basic plastic box (there's probably pre-made ones for the size of various Pi HATs? and of course 3D printing) and some fairly simple DYI wiring to connect the 5 pins through a cable wouldn't be too tricky.
- dicknuckle 4y ago
- sys42590 4y agoI really love the fact that the presented circuitry avoids fully charging the battery cells to extend their lifespan. SO many consumer electronics intentionally charge lithium cells to their limits to boast long battery run times and high capacities in the specs while severely shortening the products lifespan.
- _yb2s 4y agoLithium batteries are awesome, but I think lead acid just makes a lot more sense for a UPS- they like to be fully charged, last virtually forever when maintained that way, and don't require any complex charge management circuitry.
- Merad 4y ago> they like to be fully charged, last virtually forever when maintained that way If that's the case why do the lead acid batteries in consumer UPS's never last more than 3-5 years?
- _yb2s 4y agoI think cheap batteries, poorly designed starter circuits, and occasional full discharge in use, which all coordinate to damage the batteries early. Also if your power is low quality, it causes the device to switch to battery often, and can put a lot of cycles without actually having a power outage. High quality lead acid batteries in solar systems, car starting, and commercial UPSs often last a decade or longer.
- 1-6 4y agoVRLA batteries are commonplace for commercial UPS units. For lithium, I’d explore LiFePO4 batteries. Not all lithium chemistries are alike and LiFePO4 are considered safe. It doesn’t have great capacity to weight ratio but it wasn’t meant for consumer electronics anyway.
- 4y ago
- axiolite 4y agoGet a 12V SLA battery, solar charge controller, 14-20V AC adapter, and a USB car charger if you need 5V output in addition to 12V. DONE! The "DC UPS" units you can find for sale (as well as USB power banks) don't have any monitoring/data connection. Real UPSes have them to tell your systems to perform a clean shutdown when the battery gets low. Since they're all just simple dumb batteries anyhow, you might as well roll your own for less cost and much more runtime... To make it a proper smart UPS, you would just need to add a low-voltage trigger that talks over USB, RS-232 or Ethernet. Something like a 12V relay could act as a "contact closure" signal, though you'd have to test the cut-off voltage and perhaps try a few different values of resistors to fine-tune the low-battery signal.
- jacknews 4y agoSure but you'd need bigger pockets, probably even a bigger backpack.
- dicknuckle 4y agoAlso a much bigger timeframe for testing and development. This isn't something you slap together in a weekend and call good. More like building an experimental drone than putting together a 3d printer kit or building a PC
- axiolite 4y agoNo idea what you're talking about here. Solar charge controllers are quite mature and do exactly what is needed. You're literally putting a few wires on the right terminals, and a few connectors. Only the low-battery signal would require a bit of work, but that is option and isn't found on ANY devices available off-the-shelf so it's not possible to buy your way around that.
- rwmj 4y agoI got a large power bank (Bluetti EB55) to get me through the expected power cuts this winter. Supports charging from mains or solar while supplying power. Of course at £900 it's hardly a cheap option ...
- planede 4y agoWhat's the typical circuit found in a laptop or phone? They all have to deal with this stuff internally. IMO a cheapo x64 laptop is better than a raspberry PI + some jerry-rigged UPS setup for a low-power home server setup, YMMV.
- selfhoster11 4y agoThat depends on the amount of stuff you're running, and how much you care about the UPS working. If the answer to both is "very little" or "not much", I'd take the Pi setup any day.
- mbreese 4y agoIt also depends on how often you expect to lose power. If that answer is “somewhat often” or worse, then even a minor annoyance can be worth avoiding. There’s a reason laptops used as a server were known as “California servers”. (aka a server with a built in UPS)
- mschuster91 4y ago> What's the typical circuit found in a laptop or phone? They all have to deal with this stuff internally. Most phones and laptops operate at the "micro-cycling" mode that the author describes, it's part of why portable devices regularly end up in the news for swelling batteries. There's no brand that didn't have complaints by people. Additionally, the power quality of shoddy chargers [1] makes life even worse for circuit designers - voltage ripple or, worse, spikes that rise fast enough to hit the battery... the list of problems is quite endless. [1] https://www.righto.com/2012/10/a-dozen-usb-chargers-in-lab-apple-is.html https://www.righto.com/2012/10/a-dozen-usb-chargers-in-lab-a...
- deckard1 4y agoI always see recommendations on /r/HomeServer for using a laptop and I always shudder a bit. I had a battery swell on a Macbook. The thought of leaving a laptop running unattended for months at a time, possibly stuffed in a garage or closet where you won't be watching it for awhile just sounds like a disaster waiting to happen. The other thing is that if you have a laptop worth using as a server then you have a laptop probably worth selling. Use that money to buy a proper UPS and cheap server and you may even have money left over. You also can't plug routers or cable modems into a laptop, so it's rather pointless anyway. I have a UPS because I'm hit with short brownouts every summer (yay, California). But if my grid was better and I only saw outages every few years then screw it. Let the server crash. This isn't the 1980s. Nearly all filesystems and databases (ACID, anyway) recover just fine today. Use ZFS if you're truly paranoid.
- eternityforest 4y agoHard to believe USB-PD upses aren't a common products. There's no reason anymore that a power bank should ever even have an off mode unless it's so cheap there's no passthrough, which shouldn't be a thing either because it's annoying and probably saves 50 cents. It's microamps with a good eco mode switcher. Inline USB ultracapacitor banks seem like a reasonable product too though. Hopefully USB will give us standards for power banks someday so you can get certified ones with a defined form factor and behavior.
- Dalewyn 4y ago>USB will give us standards for power banks USB Energy Provisioning Aggregate Network 4.3 Revision 11 Gen3x4 48gbps SuperCharge-C.
- dividedbyzero 4y agoSorry, can't do better than 5W with that pricey Revision 12 Gen4x4 cable of yours.
- Dalewyn 4y agoElectricity is measured in gbps as ordained[1] by the USB-IF. We must be universal. [1]: https://cdn.arstechnica.net/wp-content/uploads/2022/09/USB-performance-logos.jpg https://cdn.arstechnica.net/wp-content/uploads/2022/09/USB-p...
- dividedbyzero 4y agoYes, but between Revision 11 and 12, all manufacturers on the consortium unanimously voted to up all voltages by 0.4V to increase incompatibility. Still the same gbps though.
- RHSeeger 4y agoThere's something sort of horrifying in the fact that I can't tell if the posts in this thread are real ... or fake in pretending to be a bureaucratic, ridiculous joke.
- permo-w 4y ago>Herein lies the problem – just because you have pass-through charging does not mean that your output is uninterrupted the author says this as if the two are easily confused, when its him that makes the association in the first place. why would you assume this at all?
- dividedbyzero 4y agoKnowing very very little about battery technology I wouldn't expect an interruption when starting to charge a pass-through power bank either. I'd expect charge controllers to handle this seamlessly, like the ones I get on those microcontrollers that support batteries out of the box (which are dirt cheap too), or the one in my laptop, or the one in pretty much all other battery-powered devices; those don't switch off when connecting/disconnecting to/from mains power. If that's so well-understood, why would a decent power bank not do this as well? Actually, my big Anker 521 (256Wh) does provide pretty much uninterrupted power when connecting/disconnecting to/from mains, though it did switch off randomly once after a few days.
- ryan-c 4y agoThis exists, and has monitoring, but won't do USB-PD: https://www.mini-box.com/OpenUPS https://www.mini-box.com/OpenUPS There are, however, USB-PD sources that can run from a fixed voltage DC supply. I would actually really like something like this that can fit in my backpack with just shy of 100Wh (airline limit) of energy storage, a retractable cable to plug into an outlet, and monitoring via USB. In theory, I could build this myself around OpenUPS, but sourcing a pack, retractable cable and suitable enclosure is really annoying.
- walterbell 4y ago> something like this that can fit in my backpack with just shy of 100Wh This appears to fit the bill, if you can find it for sale, https://www.macworld.com/article/539605/zmi-powerpack-no-20-review-compact-external-battery-can-charge-a-macbook.html https://www.macworld.com/article/539605/zmi-powerpack-no-20-... & https://www.zmi.com/products/powerpack-no-20-qb826g-25000-mah-backup-battery-210w-max-output https://www.zmi.com/products/powerpack-no-20-qb826g-25000-ma... > 90 watt-hour (Wh) / 25,000 milliampere-hour (mAh) battery. USB-PD + UPS: 5V/3A, 9V/3A, 12V/3A, 15V/3A, 20V/5A 100W MAX
- dividedbyzero 4y agoI'd also expect airport security to be quite a hassle with (partially) homemade electronics containing large batteries.
- brk 4y agoIt is surprisingly not. I travel frequently with random ESP32 projects in various stages of looking highly suspicious and never get hassled about them. 4oz of an unfinished bottle of water though is absolutely not getting through security.
- dividedbyzero 4y agoDo those have large li-ion batteries? Lets say you'd diy your own charge controller, I could see that get treated differently since you could cause a nasty fire that way.
- exikyut 4y agoTangentially related question I'm actually trying to answer in earnest at the moment: I want to put together an EDC portable Linux box using something like a Radxa Zero or OrangePi Zero, with the idea that it'll run for some nominal amount of time away from a wall outlet. A power bank is obviously the answer, but I don't want "push the status button and guess at what the 5 LEDs are saying" to be my answer to "how much power is available?". I want something I can ideally turn into an ETA, so that I can then monitor that ETA and send myself alerts when the battery is critically low. I've found RPi hat "UPSes" that seem to provide exactly this data over I2C... but none of these seem to also provide an all-important enclosure that would ensure I don't accidentally short anything out and literally burn a hole in my pocket. Not viable. I've not yet explored the world of 3D printing, but I do understand enough to be know that my first 3 or 5 or 28 prints will be slightly janky. :) So, I'm trying to find a premade solution to this problem - either a power bank that provides Actual Data™ over the USB connection (!), or some kind of devkit-style solution that'll viably/safely fit into a standard enclosure of some kind.
- nine_k 4y agoSomething like OpenUPS2 [1] seems to provide data over USB, and even has Linux software to support that. It does not seem to have an enclosure though; it's apparently intended to be put into an enclosure of the device it supports. Also, pricey. [1]: https://www.mini-box.com/OpenUPS2 https://www.mini-box.com/OpenUPS2
- dicknuckle 4y agoFind someone locally who has a 3d printer. If you don't already know how to model 3d objects, they will likely charge you for that time and then 3d print a test. Then when you have it right, there are plenty of pro shops that can produce a more permanent 3d object through Laserjet Fusion or other methods.
- rektide 4y agoOne of those plagues of shitty consumerism & no market pressure: there's a standard that works great but no one implements it, cause they suck & are no good & there's no consumer pressure to do basic shit. USB HID has all kinds of sensors & telemetry it can do. USB HID includes a whole sub-spec on Power Devices, with all kinds of information that chargers & batteries can report. To take one example, the Battery System Page (x85) can report Current, Voltage, Temperature, Absolute/RelativeStateOfCharge, RemainingCapacity/FullCapacity, RunTimeToEmpty, ChargerConnection, OutputConnection, ChargingIndicator, and CycleCount (among many other factors) to tell you what is happening. You can set RemainingCapacityLimit or RemainingTimeLimit to trigger a USB alarm condition when capacity falls under threshold. You can monitor individual inputs & outputs separately. (The one ask I have that's not supported by the spec: a StopChargeAtCapacity setting for batteries, so I can stop my UPS's 5000mah battery at 4200mah to extend it's life drastically) It's a stupid senseless world where the obvious never happens. Consumers aren't educated enough to have sensible asks. What is possible is ignored. I'll try to break out 'lsusb' more in the future when charging, but my impression is that basically no one- not batteries nor chargers- implements the ancient, obvious, sensible, & easy spec for power devices to report the basics about what they are doing. For shame!
- INTPenis 4y agoThe title makes me remember my raspberry pi camera I made for my apartment in 2011. I hooked it up to a simple USB powerbank at the time, and then the powerbank to the power outlet. Thinking if anyone cut the power to my apartment it would still record for 15 minutes. Of course had anyone cut the power to my apartment it would have no way to upload the recordings because I didn't add a 3G failover.
- xani_ 4y agoI remember some article of someone trying it, only to discover their power bank cut power for few milliseconds when you disconnected the external power supply, resetting the device...
- rldjbpin 4y agoi can attest to that. all of my cheap power banks demonstrate this behaviour. more importantly, as the article suggests, it can be hard to know if the battery itself is powering the device while plugged in (while getting charged) or if there is a passthrough, a la laptop charger.
- DarthNebo 4y agoThis is something one of my side projects aims to fix. Basically make a programmable battery source out of 18650 cells, USB Type-C, with automated charge & discharge control to keep it between 30-80% for UPS or Solar augmented use cases
- heythere22 4y agoDave from EEVBlog had the same issue. His mains power battery does not do 0ms switching: https://www.youtube.com/watch?v=5JT8M8v_zNg https://www.youtube.com/watch?v=5JT8M8v_zNg Semms like, if you want the features of an UPS, you should get a UPS.
- riobard 4y ago> To treat the cells well requires sacrificing some capacity to reduce the voltage stress on the cells. Battery-power devices like smartphones should have a mandatory control of what percentage of battery it should be charged up to. For Mac there's this nice utility AlDente https://apphousekitchen.com https://apphousekitchen.com
- pitaj 4y agoI think this is a standard feature on Samsung phones, but I really wish it was standard in Android.
- yjftsjthsd-h 4y agohttps://github.com/sriharshaarangi/BatteryChargeLimit https://github.com/sriharshaarangi/BatteryChargeLimit seems to work anywhere there's root access (though yes I absolutely agree that it should be a standard part of the OS)
- mmastrac 4y agoAbout 10 years ago I tried using an Anker power bank for a UPS. It had some issues w/shutting itself down when switching power modes. I reached out to their support line and they completely misunderstood my questions, sending me a brand new battery instead despite my protest. I was hoping to just send some feedback on what I thought were firmware issues. In the end I got two beefy Anker power banks that didn't work as a UPS, and eventually migrated myself over to using PoE power for the Pis (AliExpress gigabit -> 5V/3A PoE extractor), with a Unifi Dream Machine Pro SE powering them. My UPS is now a used, enterprise Dell 1300W monster that pretty much runs the entire local networking stack + servers for nearly an hour without power.
- StuGoss 4y agoWouldn't stringing two USB power banks together effectively be a UPS for a Raspberry Pi?
- avidiax 4y agoNo, if they both have the cutout problem, they'll just cutout in sequence. You'd probably do better to have a supercapacitor or float charge a battery with an amenable chemistry between the power bank and the load.
- cat_plus_plus 4y agoIf you have corruption or super long reboots on brief power loss, you have a bigger and unnecessary problem, because UPS can also fail and for many applications a brief service loss is otherwise acceptable. For example, I often handle California power outages by running an inverter off my car and powering up my home network through a cord run through kitchen window. If my NAS got borked in between, that would be very unfortunate. Your point stands in regards to equipment like security cameras where continuous availability is the point. But would a Raspberry Pi usually be the best choice vs special design equipment with built in backup batteries and low idle drain or say a cheap Android phone running an appropriate app?
- yencabulator 4y ago> Herein lies the problem – just because you have pass-through charging does not mean that your output is uninterrupted. Okay, so this Framework laptop I'm typing on can power from any of its 4 USB-C ports. Ignoring that it already has a battery (you can buy just the motherboard and a non-laptop case), doesn't that work around this neatly? Plug one USB-C directly to wall, plug second USB-C to powerbank. For absurdity, repeat until you have a highly available array of 3 powerbanks. You can even put them on timers so you don't need pass-through charging!
- Melatonic 4y agoI have made a standard USB-PD powerbank into an ACTUAL UPS by connecting a small board that allows you to manually select the voltage of the output. By selecting 12V you can then wire up any 12V device of reasonable power (say a wireless router) to the USB powerbank. There is no loss converting to and from AC and the power bank internals still handle all the complicated charging and whatnot. All the little IO board does is request a specific voltage (in the same way that any device with PD will negotiate) and keep it there. I also found a small fanless inverter that I wired to this setup which gave me a tiny and completely silent AC power device. Super small, super portable. Easily powers a few LED bulbs or strings.
- metadat 4y agoIs there a proper name for the "small board" you mention?
- simplyaccont 4y agothere are keywords like "usb pd decoy" https://smile.amazon.com/gp/product/B07T6LPP9W https://smile.amazon.com/gp/product/B07T6LPP9W
- joshspankit 4y agoAndreas Spiess (and community) have put a lot of work in to this space as well. Feels like a good teamup.
- aristus 4y agoLiving in Mexico City around a lot of construction, I've had my heart (and kit) broken by dirty, inconstant power. For small things like a Wifi repeater a 10Ah battery inline works ok. But for anything beefier or without its own internal battery, eg a NAS / printer / modem, you still need a proper UPS. The end result is we have a 750-100VA box under every desk and one in the comms closet. Unsurprisingly even small office supply stores around here have a wide selection of UPS and power kit.
- seltzered_ 4y agoAside from what one thinks personally of him, it's worth noting esr's attempt to start an open source ups project (upside): https://gitlab.com/esr/upside https://gitlab.com/esr/upside