Many UPS units are optimized for 50%-80% load. If you put a very light load on an office UPS, like a lamp, a modem or a Raspberry Pi, some UPS's inverter will drain itself quicker before the load even drains battery. Some UPS have a light-load powersave feature, they don't even activate themselves when there's little load. Also, most office UPS is designed for short loss of power, not as a longterm battery-backup, so it will keep beeping until it's dead. Depending on what the OP is trying to do, this may be unacceptable.
Due to the above problems. If I chose to use a 110/220 V UPS, I would at least try finding one designed to supply backup power to routers and modems to ensure that they don't have this problem.
I guess the 5-volt power board is the best? But browsing through the Aliexpress results, I could not find anything that comes already wrapped up in a box and ready for use, as you would with a normal UPS. I suppose most people prefer that.
But in general, there are three practical solutions. You need to choose one from your intended applications.
1. Use an office/server UPS, 110/220 VAC. This is not recommended, many UPS are optimized for 50%-80% load, the conversion loss of the inverter is significant. If you put a very light load on an office UPS, like a lamp, a modem of a Raspberry Pi, some UPS's inverter will drain itself first before the load even drains battery. However, if you intended to use the Raspberry Pi as a desktop or server in your home or office, or you only need to protect brief loss of power, you SHOULD USE this option, since your LCD monitors, external drives, etc, probably also needs a UPS. You can also try finding one designed to supply backup power to routers and modems to avoid the light-load problem. Other advantages include strong safety guarantee, and a good UPS has a data port. But it seems that UPS units designed for modems, and UPS units that have a data port is mutually-exclusive...
2. Use a 5-volt power board. There are plenty of low-cost little boards available on AliExpress (https://www.aliexpress.com/af/Raspberry-Pi-UPS.html). They are basically a 18650 Lithium-ion battery charging board with a boost converter and a USB output. The size and efficiency made them an ideal choice if you only need to power a single Raspberry Pi with some accessories (e.g. sensors, screens). But there is no way to tell how much power is left in the battery without hardware modification.
3. Use a 12-volt backup power, with a 5-volt DC-DC converter board. Sometimes, powering a Raspberry Pi is not enough, the modem and router also needs backup power. In this case, using a 12-volt backup power intended for routers and IP cameras is preferable, e.g. https://www.amazon.com/Monerator-Uninterruptable-Independent.... The 5-volt power can be obtained by using a 12-volt to 5-volt buck converter board, e.g. https://www.amazon.com/Converter-DROK-Regulator-Inverter-Tra.... Also, there is no way to tell how much power is left in the battery without hardware modification.
4. Use an open-source UPS specifically designed for Raspberry Pi, some have battery data output, but I don't personally know any. There's an overlap between (2) and (4).
WARNING: If you decide to choose (2), (3), or (4), remember: boards with poorly-designed circuits, defective Lithium-ion batteries, or exposure to outdoor environment can be very dangerous. Linked products are examples, I do not endorse any of the products. Caveat Emptor.
- run debian with exwm
- some programming in various languages
- browse web (run wifi)
- occasionally play some non-resource heavy games
I would be happy if I could use the system powered by the battery for four hours at a time. I have a ups for the pi 3B, but it often reboots when I plug the sytem in while running. I definitely want to avoid a UPS that has a defect that results in a system shutdown when transitioning between battery and power from an outlet.
Thank you so much for your time writing this comprehensive answer. I think that options two or four are the correct ones for my use case.
Thank you also for the links. I will do some more research to avoid buying an unreliable UPS.
cheers!