Raspberry Pi 3, battery backup, and GSM

First if this isn’t the right place or doesn’t even belong on this thread please move or remove it.

So let’s start. I am new to home automation and Raspberry Pi. I was Googling around and saw people have created battery backup hats for the raspberry pi. As well as cellular network hats for it. Has anyone done this or thought about it doing anything like this?

1 Like

I have definitely thought about doing this multiple times. Currently, my main security system (separate hub and sensors outside of HASS unfortunately for now) has both and the only reason I keep it is because of it’s battery backup and GSM capabilities. If HASS had that, I may consider gifting that security system to my parents house.

Should be easy enough. You can use a battery backup ups unit for the router and the pi. Then use a router that has cellular interface as a wan. I use peplink routers and they make this trivial. Then your only question is if you want to pay for the monthly cellular modem bill for something you may never use.

What I was thinking is an all in one setup. Pay a company like ting $6 a month for cell service and only pay them when you use it.

This is one of the raspberry pi hat I was looking at.

There is a how to 9n connecting it to a pi and even a how to on configuring it for fail over should you lose internet.

The only thing I am having a hard time find is a battery backup. They are out there but with little documentation. Atleast for one in a US store.

The topic has been discussed here a few times but I’ve not seen anyone post a project that they have completed.

I bought a cheap UPS on Amazon and have several devices including my RPi on it

There’s a guide here if you have an APC UPS for setting it up with the Pi:

1 Like

I am considering this power/ battery hat,

Depending on the battery, it will give you 13 hours of battery run time.

I started to think something like this would be a perfect solution.

I don’t have 3G backup (yet) although shouldn’t be a hassle to setup. I do however have a battery backup. A few hints:

  1. No need to buy a UPS. Go to the nearest phone accessories store and look for phone power bank with the following 2 properties. Ability for simultaneos recharge. This means that it is able to charge itself from a wall charge while giving power to the Raspberry Pi 3 (acting like UPS). You will be surprised that most phone power banks dont support it, but chances are you will find at least 1 model in the store that has it. The second thing you need to look out for “fast charge” for most powerbank this means the oldest fast charge which is regular USB with 2A output. It is recommended to have at least 2A power supply to the Pi, some people might say even more. I have personally tested it with 1A charger and it works, but I guess it really depends on the Pi load and if gets higher or if you have any devices connected to it, you might be in trouble.

  2. I have a 6 000 mAh power bank and it is enough to power the Pi for roughly 12 hours with Z-wave controller attached, around 10 z-wave devices and relatively heavy automation with lots of rules having time triggers every 2-3 seconds. I think you can go up to 10 000 mAh powerbank without being too bulky, but I guess it depends where do you plan to put it and how much space you are willing to spare.

  3. As for your monthly 3G bill. It really depends on the company you use. I have the ability to issue a second SIM card linked to my existing contract and uses the same 3G traffic quota and costs something like a dollar or 2 per month. This saves you from all the hassle of having a second contract and you can stop it at any time. This is useful if you have big data plan. Personally I have 20 GB per month and barely use half of it, so I have plenty to spare for my Rpi Emergency.

So at the end just plug a charger in the mains, connect it to the power bank. Connect the power bank to the Pi and there you have it. I believe this should be the cheapest and easiest solution which is available off the shelf.
I have used mine for around a year and the battery seems to be holding charge just fine. Of course this kind of usage of the powerbank is outside its specs so there is no guarantee. If you want something which is 100% rock solid you should go for UPS with lead based batteries. Lithium batteries in general do not perform well if remain charged at 100% for long periods of time so it is something to keep in mind.

A few links I found:

https://www.amazon.co.uk/Energizer-XP4001-Portable-Emergency-Battery/dp/B0029U2WUA/ref=pd_sim_ce_10 - not sure about this. It is not stated in the product listed, but a guy in Rpi forums says he uses it just for the same purpose.


I wouldnt want a powerbank to be connected 24/7. That is not what they are made for!
especialy a cheap one, they can catch on fire.

An UPS is build to be connected all the time and should be used for that purpose.

A cheap one can be bought for less than 60 euro.

I like this unit, but it is only rating 5V at 1Amp. I was under the belief, for stability, the Raspberry Pi required a 2.5A power supply.

I have seen a few UPS hats that allow a clean shutdown of the Pi in the case of power failure, to avoid corruption, but they all seem to have cheapish batteries that only last 2 years, but at least they are replaceable.

Check out this Hat

I believe you can use standard battery packages, or make your own 18650-battery packages.