Any reason not to use a USB power bank as an UPS?

It just occurred to me today, worrying about SD card corruption if my new Pi 3 has it's power cut (and there was a power cut just a couple days before the Pi was delivered, so it's on my mind).

But is there any reason not to use a USB power bank as an UPS, with the power bank plugged in to be kept charged 24/7?

I suppose I'd need a power bank that used smart enough circuitry so as not to turn off charging (once fully charged) until unplugged and replugged in (as my Nintendo 3DS does, for example).

Thoughts? :-)

--
If you're not part of the solution, you're part of the precipitate.
Reply to
Jamie Kahn Genet
Loading thread data ...

I've been running a Pi via a power bank for some time now. Works fine in the event of losing mains power. Usually caused by someone pulling the wrong plug out!

--
nev 
getting the wrong stick end since 1953
Reply to
nev young

Yes, I've done that, but you need to select a power bank which allows simultaneous charging and providing output power. Not all do, I understand.

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

Works like a charm. You need to find one that is rated for continuos use.

[mrr@trim ~]$ uptime 18:45:57 up 347 days, 22:43, 2 users, load average: 3.00, 3.01, 3.05 [mrr@trim ~]$

There has been at least 8 small and two large power cuts in this period. This is a pi-b with just such a power bank; 8Ah, should hold for around 10 hours. It has held for 8, the max power outage we've had.

-- mrr

Reply to
Morten Reistad

Cheers all for the promising replies. So I don't need to go this far (found after some more googling) ?

--
If you're not part of the solution, you're part of the precipitate.
Reply to
Jamie Kahn Genet

Curiosity: How would the cost of such a UPS (i.e including UPS hard/ software and/or mains charger + 5v output regulator as well as the Li-ion battery) compare with an equivalent rig based round, say, a 7.2Ah SLA (sealed lead-acid accumulator)?

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

No reason to not use one - providing it supports charging at the same time as use - the Anker units I have support it, but charging is very very slow - 2 days to fully charge a 15,000mAh unit from fully dead while powering a Pi...

However.. SD card coruption is very rare these days. There were some kernel issues waaaaaayyy back, but as far as I know these have all been resolved, so it should be no worse then power cycling some spinning rust - yes, you may need an fsck, but actual media coruption? I can say that I've never experienced it and I've been using Pi's since the first day there were posted out.. Are you spending more money & time now than what a simple backup & recovery would cost you should you ever get a failure?

(and today, I've power cycled my Kodi/TV Pi 3 or 4 times as it's the best way to turn on the TV right now)

Gordon

Reply to
Gordon Henderson

This was just a plain plugin between the USB power supply for the pi and the pi itself. Not an iota of fuzz. It starts to blink slowly

10 diodes when on battery power, and reduce down to zero as the battery gets drained. Ditto, fast blink when charging, and just a little light when running and fully charged. Otherwise, it is just a battery with regulated output power.

Cost $40 for their largest model.

A SLA would need a charger, the battery itself, output regulator and a cable to the pi, possibly with another fuse.

The cheapest nonstop charger for 6V or 12V I could find was $28, and then there was the battery ($25) and the regulator ($8) plus half a usb cable and some solder. Plus a fuse.

This pays off when making a bigger UPS setup, which I have also done, but then I went for 4x 80Ah 12V batteries in two banks, 2 separate chargers, diode bridges and a live rail fed from mains via a 14V regulator plus the two diode bridges via power diodes with 0.7V drops. This feeds the emergency lights, wifi, fiber modem, two small odroid servers and the VOIP phone. It feeds them for around 4 days.

The rpi is just at my desk, and I wanted a simpler solution.

-- mrr

Reply to
Morten Reistad

I don't think I've ever lost a card due specifically to power cycling, but SD cards will wear out if used as a general purpose FS every day. If the filing system suffers major corruption, it might stay running, but fail to reboot.

Frequent backups are essential, and moving to a more reliable storage medium is advisable if the Pi is running important services. A good quality USB stick (not the small 'fit' ones) being the next level up, and an SSD being the most reliable option. Low capacity ones (32GB+) can be obtained quite cheaply along with a USB to SATA adaptor.

---druck

Reply to
druck

Thanks: a most useful answer: I didn't realise that such capable Li-ion power packs were available. Only one thing is missing: a name and/or URL for that power pack.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

On 20/11/2016 23:34, Martin Gregorie wrote: []

I've used:

formatting link

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

I've never lost an SD card. I don't deliberately power-off when I suspect the SD card is busy, but I do power-off without shutting down the OS sometimes.

The risk with a SD card is a bit different than with a hard drive. The most significant vulnerability is when the SD card is updating it's physical to logical block map - if that gets lost, you have effectively shuffled all the blocks on the card, and no amount of fsck will be able to recover that.

Better quality SSD's will go to some lengths to protect this operation, but I doubt any microSD cards do.

--
Andrew Gabriel 
[email address is not usable -- followup in the newsgroup]
Reply to
Andrew Gabriel

Thanks. Looks like a useful bit of kit.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

I've had a problem with an Energizer one - if the power drain out is greater than the charge current in, when the battery goes flat it goes into an oscillatory state where it charges for 50ms or so, then turns on the output, then discharges for 50ms, then shuts off, then charges again, etc. The drain in this case was substantially more than a Pi, but some things don't take too kindly to a 10Hz 100% duty cycle square wave on the power supply.

This, and some others, also decide to run the internal DC/DC converter based on whether the output connector has a plug inserted. This is problematic when there is a switch further downstream - the output may be taking 0 amps but the battery goes flat after a few days from running the DC/DC.

Theo

Reply to
Theo

The Anker ones I have sense the output current and are designed to turn off when the remote device has charged (and therefore is drawing much less current). I've found that when you halt a Pi, although the Pi still draws some current it's enough for the Anker unit to power down. I like that feature.

Mine are a few years old now though - I've no idea what the current generation are like.

Gordon

Reply to
Gordon Henderson

How do you turn them back on again? You presumably can't ramp up the load because the output is turned off. Do you have to physically press a button? That might be problematic for a UPS where you might (eg) want to restart when mains power returns, or on some external stimulus.

Theo

Reply to
Theo

Yes, big button on the front. (Double click on it and you get a nice LED torch too)

As a UPS - yes, possibly somewhat sub-optimal when everything goes flat, but it was never desiged as a UPS. It's also missing lot of stuff you might want - like sensing power loss, recovery, capacity, etc. to the device its powering, but a cheap power backup it works fine. Mine can power a Pi v2 for 24 hours - much longer for a Zero. (Not tried to measure it)

Gordon

Reply to
Gordon Henderson

This is funny. 30 years ago I saw a UPS doing exactly this, but in

outages on the mains, as that could damage it. We were really surprised the minicomputer (particularly its 8" disks) had not been wrecked by what must have been 5 mins of this before someone saw what was happening and hit the big red button.

--
Andrew Gabriel 
[email address is not usable -- followup in the newsgroup]
Reply to
Andrew Gabriel

I know I'm a bit late into this discussion but one minor word of caution: Li-ions tend not to like being held at full charge for prolonged periods of time. I've heard of this becoming an issue when people use laptops 24/7, constantly one the mains, with the argument that they're good for several hours if the power goes. Until they find 18 months later run times on the batteries are down to minutes.

It's not a terrible idea, but you need to be aware of potential pitfalls and monitor and manage them appropriately. I am not an expert but the advice I have seen in the past is to let them run down to perhaps 10% every month or so, during which time you are of course vulnerable if there is a power failure.

--
Andrew Smallshaw 
andrews@sdf.org
Reply to
Andrew Smallshaw

The actual advice is to leave Li-ion at half charge for long terms storage.

Easily achieved by derating a battery pack to half its nominal capacity and limiting charge voltage to 4V/cell instead of 4.2V

--
Future generations will wonder in bemused amazement that the early  
twenty-first century?s developed world went into hysterical panic over a  
globally average temperature increase of a few tenths of a degree, and,  
on the basis of gross exaggerations of highly uncertain computer  
projections combined into implausible chains of inference, proceeded to  
contemplate a rollback of the industrial age. 

Richard Lindzen
Reply to
The Natural Philosopher

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.