5V UPS

I have interfaced a simple alarm with a server/client wifi interface, everything is working correctly.
The only thing that is missing is a sorta UPS Usb power supply to arduino, as if a burglar were to cut down electricity, although the alarm/siren have a backup battery, arduino would not be able to sound the siren on/off- this would defeat the purpose.

For this part of my project I had in my mind to connect (in parallel) a mini 300mA battery and my arduino to the usb outlet: whenever the electricity were to be cut off, my arduino module would have some more time before powering down.

Am I overthing this? Maybe connecting arduino directly to a common powerbank would grant me overcharge/discharge protection

For this part of my project I had in my mind to connect (in parallel) a mini 300mA battery and my Arduino to the usb outlet: whenever the electricity were to be cut off, my Arduino module would have some more time before powering down.

I think you mean 300mAh.

There are no 5V batteries, no battery chemistry operates at 5V. If you can find a USB battery pack that can both connect to a USB charger and to the load at the same time then I guess that would do the job. I don’t know if such things exist.

If size and weight are not a problem then sealed lead acid batteries are a good choice; they are cheap, robust and easy to use. They are not prone to exploding or catching fire. The correct voltage for a lead acid battery is not the nominal voltage it is sold at; a 3 cell ‘6 volt’ battery is actually 6V6 and a 6 cell ‘12 volt’ battery is 13V2. All you need is a power supply adjusted to the correct voltage across the battery then a buck or boost converter as appropriate to supply the load. For a 5V load I would use a 6 cell battery, a 13V2 PSU and a buck converter. That’s all you need, no fancy electronic battery management needed.

Do remember that any battery of any chemistry loses capacity during its life. For that reason I suggest you work out what capacity you need then at least double it.

PerryBebbington: If you can find a USB battery pack that can both connect to a USB charger and to the load at the same time then I guess that would do the job. I don't know if such things exist.

Most power banks, at least the ones that I have had, can do just that, so should work just fine as UPS.

Easiest, cheapest, and probably most reliable solution to the problem. Them being much higher capacity than 300 mAh is just a bonus at this point. Of course, like all batteries, they don't live forever but 5-10 years should be no problem for a decent quality battery.

joerack: I have interfaced a simple alarm with a server/client wifi interface, everything is working correctly. The only thing that is missing is a sorta UPS Usb power supply to arduino, as if a burglar were to cut down electricity, although the alarm/siren have a backup battery, arduino would not be able to sound the siren on/off- this would defeat the purpose.

For this part of my project I had in my mind to connect (in parallel) a mini 300mA battery and my arduino to the usb outlet: whenever the electricity were to be cut off, my arduino module would have some more time before powering down.

Am I overthing this? Maybe connecting arduino directly to a common powerbank would grant me overcharge/discharge protection

Check this out:

(click pic for link)

It's a single lithium ion cell (18650) to 5 volts UP converter, charger and regulator. I've used quite a few and they work great. Just connect to Vusb 5 volts to charge.