Hi all,
I wanted to ask about a way which I can use a battery as a backup if the main power goes down?
And Second question how large should the battery be to keep it lets say up to 24 hours for a Raspberry Pi 4
Thank You in Advance
-
- Posts: 3
- Joined: Thu Oct 17, 2019 9:23 am
Re: Use battery as a back-up when main power goes down
Edit: See below
This page lists power consumption of RPi's:
https://www.pidramble.com/wiki/benchmar ... onsumption
Example: RPi 3B+ at idle: 350 mA
24 h * 350 mA = 8400 mAh
/Mogens
Last edited by deepo on Fri Oct 18, 2019 9:13 pm, edited 1 time in total.
Re: Use battery as a back-up when main power goes down
A commercially available solution:
https://uk.pi-supply.com/products/pijuice-standard
The Raspberry Pi people have their own documentation regarding power requirements: https://www.raspberrypi.org/documentati ... /#pi-power
https://uk.pi-supply.com/products/pijuice-standard
The Raspberry Pi people have their own documentation regarding power requirements: https://www.raspberrypi.org/documentati ... /#pi-power
Re: Use battery as a back-up when main power goes down
Autonomous power supplies for computers are a headache. Of all that I saw, I liked the solution from http://www.mini-box.com/OpenUPS
But there are many such boards and you need to check how well they work.
Rpi4 does not consume a lot of current in the “normal” mode, but it should be borne in mind that after switching to stand-alone power, computers should “lose power”, for example, twice. Unfortunately, I do not yet know how to do this effectively with Rpi4, but several solutions were proposed for RPi 3B + that would greatly reduce consumption (turning off wi-fi, even usb, working at a lower processor frequency, etc.). I suspect that Rpi4 may also work with low current consumption.
I would categorically not buy Chinese uninterruptible power supplies. As a rule, in such devices there are no controllers monitoring the work, balancing for recharging and low quality of elements and simple circuitry.
Since it is planned to work with a capacious battery, you should carefully approach the choice of equipment - lithium power sources are by no means
But there are many such boards and you need to check how well they work.
Rpi4 does not consume a lot of current in the “normal” mode, but it should be borne in mind that after switching to stand-alone power, computers should “lose power”, for example, twice. Unfortunately, I do not yet know how to do this effectively with Rpi4, but several solutions were proposed for RPi 3B + that would greatly reduce consumption (turning off wi-fi, even usb, working at a lower processor frequency, etc.). I suspect that Rpi4 may also work with low current consumption.
I would categorically not buy Chinese uninterruptible power supplies. As a rule, in such devices there are no controllers monitoring the work, balancing for recharging and low quality of elements and simple circuitry.
Since it is planned to work with a capacious battery, you should carefully approach the choice of equipment - lithium power sources are by no means
Re: Use battery as a back-up when main power goes down
Er, no.
Many, possibly the majority of, USB powerbanks cannot be charged and supply power at the same time. (They have one chip which does both the charging function and the conversion of cell voltage to 5 volts output, but only one of those at a time.)
Many, possibly the majority of, such powerbanks' adverts and outer packaging make no mention of that. If stated at all it will almost always only be on the instruction slip inside the packaging and you don't see that until after you have made the purchase.
Quis custodiet ipsos custodes?
Re: Use battery as a back-up when main power goes down
The other drawback of powerbanks is that some of them drop power when they switch between live and battery...
Often that’s not mentioned in any document
and to be fair it’s not a requirement for a power bank.
Often that’s not mentioned in any document

Re: Use battery as a back-up when main power goes down
OK, sorry - bad idea.
/Mogens
/Mogens
-
- Posts: 7542
- Joined: Sat Jan 12, 2013 3:01 am
- Location: Grants Pass, OR, USA
- Contact: Website
Re: Use battery as a back-up when main power goes down
I don't think this is a good choice. The first 2 Q&A says the unit cannot charge itself and run a device at the same time and there is a 2 second outage when AC power is removed.jcyr wrote: ↑Fri Oct 18, 2019 9:28 pmActually, not such a bad idea.
This one will do what you need, if 2.1 amp 5 volt output is enough:
https://www.amazon.com/dp/B01K702S66
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.
Re: Use battery as a back-up when main power goes down
Go either with a real UPS solution or the PiJuice solution.
If the task is so vital you need it running with no power then why scrimp in the core requirement?
Power banks are really designed for charging phones - there are many many posts here about not using mains based chargers for day to day power why should this be any different?
If the task is so vital you need it running with no power then why scrimp in the core requirement?
Power banks are really designed for charging phones - there are many many posts here about not using mains based chargers for day to day power why should this be any different?
Re: Use battery as a back-up when main power goes down
Allow me to point out the obvious that has eluded everybody; the Pi isn't the only thing that requires power. Unless your monitor works on magic blue smoke or equivalent alternative, you're going to need to power it as well.
Do you want internet? Your modem will need magic blue smoke also.
Speak to your local computer store about a UPS and forget about using it for 24hours...
Do you want internet? Your modem will need magic blue smoke also.
Speak to your local computer store about a UPS and forget about using it for 24hours...
55:55:44:44:4C
52:4C:52:42:41
Rose tinted glasses are difficult to see through.
52:4C:52:42:41
Rose tinted glasses are difficult to see through.
Re: Use battery as a back-up when main power goes down
I an using a UPS to power a pi3 and a modem/router for my pi running 24/7.
It is a "Back-UPS 700" from APC by Schneider Electric. It has 4 mains outlets that are battery backed.
However, when power goes out it only runs my gear for about an hour, so you may need a bigger one.
It is a "Back-UPS 700" from APC by Schneider Electric. It has 4 mains outlets that are battery backed.
However, when power goes out it only runs my gear for about an hour, so you may need a bigger one.
Re: Use battery as a back-up when main power goes down
A battery backup has to:
1 Switch from mains to battery power with no downtime.
2 Switch from battery power to mains with no downtime.
3 Tell the Pi to shutdown when battery is low.
4 If the battery is exhausted, reboot the Pi when mains comes back.
5 Provide stable 5V output.
Some power packs can do 1 and 2
Cheap UPS solutions can't do 3 (?)
The PiJuice can do all 5.
1 Switch from mains to battery power with no downtime.
2 Switch from battery power to mains with no downtime.
3 Tell the Pi to shutdown when battery is low.
4 If the battery is exhausted, reboot the Pi when mains comes back.
5 Provide stable 5V output.
Some power packs can do 1 and 2
Cheap UPS solutions can't do 3 (?)
The PiJuice can do all 5.
Re: Use battery as a back-up when main power goes down
Yes for (3) my cheapish UPS has a USB output for the status, remaining battery charge, power consumption, etc. but that is Windows only. One day I will write a script on the pi to check it and shutdown pi gracefully if needed.
And that PiJuice with a 12000mAh extra battery looks good for powering just the pi.
And that PiJuice with a 12000mAh extra battery looks good for powering just the pi.
-
- Posts: 634
- Joined: Sat Feb 24, 2018 4:09 am
- Location: Buffalo, NY, USA
Re: Use battery as a back-up when main power goes down
Your modem/router is almost certainly drawing more power than your Pi, but I think that a bigger problem may well be that the circuitry of these UPSes is designed for maximum efficiency at 25-75% of their rated load. I suspect that a lot of battery power is wasted in the inverter circuitry when they are powering a load which is only drawing a small fraction of their rating. I don't have a better solution - my 'workhorse' Pi is on a similar UPS, which also supports my main Windows system. The latter gets shut down reasonably quickly if it is on and the power fails, and we don't (fortunately) tend to have frequent, long, outages here, so I have never had to find out how long the Pi will be supported.neilgl wrote: ↑Mon Oct 21, 2019 11:15 amI an using a UPS to power a pi3 and a modem/router for my pi running 24/7.
It is a "Back-UPS 700" from APC by Schneider Electric. It has 4 mains outlets that are battery backed.
However, when power goes out it only runs my gear for about an hour, so you may need a bigger one.
-
- Posts: 14384
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: Use battery as a back-up when main power goes down
I pretty much default to 1.5KVA UPSes, though for a couple of cases dedicated to Pis, I use much smaller ones, 350VA.neilgl wrote: ↑Mon Oct 21, 2019 11:15 amI an using a UPS to power a pi3 and a modem/router for my pi running 24/7.
It is a "Back-UPS 700" from APC by Schneider Electric. It has 4 mains outlets that are battery backed.
However, when power goes out it only runs my gear for about an hour, so you may need a bigger one.
On the general topic of UPS ratings. The manufacturers are--implicitly--lying to you. The ratings are in "volt-amperes". For AC power, that is not the same as Watts. You have multiply by about 0.7 to get the equivalent wattage figure (it's a Root Mean Square--RMS--thing). So a 1KVA UPS should handle about 700W. If you check the ratings carefully, it will be somewhat less than that.
The biggest capacity issue I see is that once you get past 1.5KVA, the prices skyrocket. However, a Pi, monitor, router and possibly a switch doesn't draw a lot of power. At lest, not compared to, say, a gaming PC.
-
- Posts: 14384
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: Use battery as a back-up when main power goes down
I have a 1KVA UPS that I bought in the mid-1980s, back when they were comparatively rare and comparatively expensive. It uses 2 30AH sealed lead-acid batteries in series. During a power outage I was running it with just a desk lamp attached. At the time, it was using a CFL bulb of about 20W. After 5 hours of this, my wife and I decided to just shut it off and turn in. The UPS was still going strong. That's probably about the same power a PI plus PSU would draw.pfletch101 wrote: ↑Tue Oct 22, 2019 12:48 amYour modem/router is almost certainly drawing more power than your Pi, but I think that a bigger problem may well be that the circuitry of these UPSes is designed for maximum efficiency at 25-75% of their rated load. I suspect that a lot of battery power is wasted in the inverter circuitry when they are powering a load which is only drawing a small fraction of their rating. I don't have a better solution - my 'workhorse' Pi is on a similar UPS, which also supports my main Windows system. The latter gets shut down reasonably quickly if it is on and the power fails, and we don't (fortunately) tend to have frequent, long, outages here, so I have never had to find out how long the Pi will be supported.neilgl wrote: ↑Mon Oct 21, 2019 11:15 amI an using a UPS to power a pi3 and a modem/router for my pi running 24/7.
It is a "Back-UPS 700" from APC by Schneider Electric. It has 4 mains outlets that are battery backed.
However, when power goes out it only runs my gear for about an hour, so you may need a bigger one.