"UPS" for the Raspberry Pi


42 posts   Page 1 of 2   1, 2
by LudviG » Fri Mar 22, 2013 3:33 pm
Hi all, this is my first post on this forum, but i have been using RPi for a while.

Half the year i live at work on a barrage out at sea (Fish Farm)
Image
The barrage is powered by generators, one we use during daytime when we feed the fish cause of the high power consumption. But at evenings and night we run a smaller generator. This means the power get interrupted on the whole barrage 2 times a day.

I have now bought another RPi to use at work, since I am here half the year, but the powerlosses makes the RPi turn off, then it turns the tv on when power comes back. I have also had some troubles with RPi, and the only reaason i can find is the power losses. Therefor i want to have a UPS on the RPi, but i really dont want to buy one. I just bought one to put on the NAS, wich i set up out here. So then i startet to look for solutions for the RPi. A normal UPS is a bit too expensive for what i want, since i have to cost all this equipment myself.

I have been trying to find a cheap, small UPS. I cam over the MUPS, but that is even more expensive than a normal small UPS with power sockets.

http://avtech.com/Products/Sensors/MUPS.htm

Then i started thinking. At work we have several brand new UPS batteries, that we bought for UPS that broke. These are 12v.

Image

And we also have several Exide 12v smartchargers, wich used to be used as powersupply for cameras on the fish cages.
Image

If i then use the charger, to charge the UPS battery and then connect that to the RPi via this:

http://www.ebay.com/itm/3M-power-cable-micro-usb-output-Converter-Buck-Module-8-22V-to-5V-12V-to-5V-/251247262119?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item3a7f80f9a7

Would this be a ok solution. Will the converter deliver stable power to Rpi?

I am running Openelec on the RPi and streaming from a Thecus N4100 NAS via a 100mbit cable network.
Last edited by LudviG on Fri Mar 22, 2013 9:47 pm, edited 1 time in total.
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by patolin » Fri Mar 22, 2013 9:11 pm
I think it would work. Its the same way that "online ups" works. You always get power from your batteries, but the batteries are always charging up. That batt alone can give you a couple of hours of pi-power (without screen)
Patricio Reinoso - www.patolin.com
User avatar
Posts: 120
Joined: Mon Jan 09, 2012 3:25 pm
Location: Cuenca, Ecuador
by Lob0426 » Sat Mar 23, 2013 7:41 am
That will work just fine to power the Raspberry pi.

It is the power cuts that are causing your problems. You are probably having issues with corrupted SD cards.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by LudviG » Sat Mar 23, 2013 8:17 am
Lob0426 wrote:That will work just fine to power the Raspberry pi.

It is the power cuts that are causing your problems. You are probably having issues with corrupted SD cards.


I think it is the powercuts yes. It don't seem to corrupt the SD-cards themself, but rather the OS. Been a while since i had trouble now, but powercuts this often cant be good either way :)
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by drgeoff » Sun Mar 24, 2013 7:43 pm
When a battery is used in that 'float' mode with the charger permanently connected, the charger should be designed for that purpose. If it's voltage is too high the battery will be damaged through continuous charging. There is a small but significant difference between the voltage recommended for conventional lead acid cells and gel cells. The battery in your photo looks like a gel type.
Posts: 2042
Joined: Wed Jan 25, 2012 6:39 pm
by LudviG » Sun Mar 24, 2013 7:48 pm
drgeoff wrote:When a battery is used in that 'float' mode with the charger permanently connected, the charger should be designed for that purpose. If it's voltage is too high the battery will be damaged through continuous charging. There is a small but significant difference between the voltage recommended for conventional lead acid cells and gel cells. The battery in your photo looks like a gel type.


Yeah, but i think this charger can do it. We call it a trinkle charger, not sure wat the correct english term is though.
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by drgeoff » Sun Mar 24, 2013 8:14 pm
LudviG wrote:
drgeoff wrote:When a battery is used in that 'float' mode with the charger permanently connected, the charger should be designed for that purpose. If it's voltage is too high the battery will be damaged through continuous charging. There is a small but significant difference between the voltage recommended for conventional lead acid cells and gel cells. The battery in your photo looks like a gel type.


Yeah, but i think this charger can do it. We call it a trinkle charger, not sure wat the correct english term is though.

I'm 95% sure that charger is for 'wet' (='flooded cells') not 'gel' batteries.

From http://www.advrider.com/forums/showpost ... ostcount=4

"Continuous-preservation (float) charging: 13.4 V for gelled electrolyte; 13.5 V for AGM (absorbed glass mat) and 13.9 V for flooded cells
All voltages are at 20 °C (68 °F), and must be adjusted −0.0235V/°C for temperature changes.
Float voltage recommendations vary, according to the manufacturer's recommendation.
Precise float voltage (±0.05 V) is critical to longevity; insufficient voltage (causes sulfation) is almost as detrimental as excessive voltage (causing corrosion and electrolyte loss)".

I'm not an expert on this stuff so perhaps I'm being overly alarmist :) .
Posts: 2042
Joined: Wed Jan 25, 2012 6:39 pm
by M33P » Sun Mar 24, 2013 8:58 pm
drgeoff wrote: :arrow:
I'm not an expert on this stuff so perhaps I'm being overly alarmist :) .

Allow me

(Disclaimer - I work with industrial batteries for a living)

Ludvig that is an AGM lead-acid battery. It is suitable for standby use (i.e as a UPS battery for a Pi) but must be carefully float charged at the proper voltage for a long and fruitful life. Typical for low-capacity AGM cells is 2.26Vpc +-0.02V = 13.56V with a recharge current limit of 0.2C amps - for that size bloc will be 1.2A.

That Exide doohickey would probably fit the bill - but the charger will have to know that there is a load attached - what is its model number?
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by drgeoff » Sun Mar 24, 2013 11:11 pm
M33P wrote:That Exide doohickey would probably fit the bill - but the charger will have to know that there is a load attached - what is its model number?

I didn't have a lot of luck searching on Google. http://www.frankana.de/Electric-%7C-Mul ... 021-EN-FRA. But I think the '322/104' code is a Frankana one, not Exide. (Other non-Exide products on that web site have 322/xyz numbers.)
Posts: 2042
Joined: Wed Jan 25, 2012 6:39 pm
by M33P » Mon Mar 25, 2013 11:20 am
I found a (german) datasheet for it:

http://www.leab.eu/fileadmin/data/files ... _DE_00.pdf

The charger is a smart type that has a temperature-compensated float charge when in standby mode - as long as the Pi doesn't draw too much current (which it won't - less than 0.5A at 12V with a dc-dc converter) then the charger will maintain the battery OK.

The only thing missing is a low-voltage shutoff for the dc-dc adapter to prevent overdischarge of the battery - which could be as simple as unplugging it if the generator breaks or if you leave the barrage.

LudviG - it looks like it will work - try it and see.
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by technion » Tue Mar 26, 2013 10:25 am
I can't recommend highly enough, the PicoUPS for the Pi.

http://www.mini-box.com/picoUPS-100-12V-DC-micro-UPS-system-battery-backup-system

I'm using it in my setup with a 16V power brick and an SLA battery. I can get over an hour's runtime.

Image
Posts: 230
Joined: Sun Dec 02, 2012 9:49 am
by LudviG » Thu Mar 28, 2013 3:06 pm
A lot of nice info here, thanks!! Some of it I dont understand eeverything of, but i think i understand the basics. I can provide modelnumber of the charger when i am back at work over the weekend, so i can get more info on it before i try. Thansk for all the good info, and please follow this thread for more questions from me :) I am a bit of a noob at this, but love to learn and try.
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by Joe Schmoe » Thu Mar 28, 2013 3:10 pm
technion wrote:I can't recommend highly enough, the PicoUPS for the Pi.

http://www.mini-box.com/picoUPS-100-12V-DC-micro-UPS-system-battery-backup-system

I'm using it in my setup with a 16V power brick and an SLA battery. I can get over an hour's runtime.

Image



What do you use to knock the 12V down to 5?
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2255
Joined: Sun Jan 15, 2012 1:11 pm
by LudviG » Thu Mar 28, 2013 3:12 pm
The project has taken a bit of a twist.I have ordered a voltage converter to use between the battery and RPi. It is called LM7805, and i was told it was a better converter for the RPI,rather the one i linked to before. This had to do something about it being linear,

Link to wiki: http://en.m.wikipedia.org/wiki/78xx
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by drgeoff » Thu Mar 28, 2013 7:52 pm
LudviG wrote:The project has taken a bit of a twist.I have ordered a voltage converter to use between the battery and RPi. It is called LM7805, and i was told it was a better converter for the RPI,rather the one i linked to before. This had to do something about it being linear,

Link to wiki: http://en.m.wikipedia.org/wiki/78xx

You were told wrong. The RPi is quite happy with a decent switching regulator. Virtually all the mains AC to 5 volt DC power supplies sold for use with the RPi are switching types.

The 7805 will work but you will be using twice as much total power as you would with a switching regulator. All of that extra power will be dissipated as heat in the 7805 and it will require a heatsink.
Posts: 2042
Joined: Wed Jan 25, 2012 6:39 pm
by LudviG » Fri Mar 29, 2013 3:11 pm
drgeoff wrote:
LudviG wrote:The project has taken a bit of a twist.I have ordered a voltage converter to use between the battery and RPi. It is called LM7805, and i was told it was a better converter for the RPI,rather the one i linked to before. This had to do something about it being linear,

Link to wiki: http://en.m.wikipedia.org/wiki/78xx

You were told wrong. The RPi is quite happy with a decent switching regulator. Virtually all the mains AC to 5 volt DC power supplies sold for use with the RPi are switching types.

The 7805 will work but you will be using twice as much total power as you would with a switching regulator. All of that extra power will be dissipated as heat in the 7805 and it will require a heatsink.


I've been told about that it will need a heatsink. I ordered both, so u suggest i'll use the switching regulator then?
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by technion » Sat Mar 30, 2013 7:22 am
Joe Schmoe wrote:What do you use to knock the 12V down to 5?


A circuit I built based on an LM2596.

Image
Posts: 230
Joined: Sun Dec 02, 2012 9:49 am
by drgeoff » Sat Mar 30, 2013 10:48 am
LudviG wrote:I've been told about that it will need a heatsink. I ordered both, so u suggest i'll use the switching regulator then?
The switching regulator will give you nearly 3 times as long on the battery. If you don't want to build your own there are many on ebay eg item 220810055661. (NB if you get an adjustable one, make sure you adjust it to 5 volts out before connecting to the RPi/)

If you use the linear one it will be dissipating in the region of 6 to 10 watts. It will need to be much larger than something like http://www.maplin.co.uk/clip-on-to220-heatsink-2583. Even http://www.maplin.co.uk/heatsink-for-to ... o220-30396 is probably too small.
Posts: 2042
Joined: Wed Jan 25, 2012 6:39 pm
by LudviG » Sat Mar 30, 2013 5:56 pm
drgeoff wrote:
LudviG wrote:I've been told about that it will need a heatsink. I ordered both, so u suggest i'll use the switching regulator then?
The switching regulator will give you nearly 3 times as long on the battery. If you don't want to build your own there are many on ebay eg item 220810055661. (NB if you get an adjustable one, make sure you adjust it to 5 volts out before connecting to the RPi/)

If you use the linear one it will be dissipating in the region of 6 to 10 watts. It will need to be much larger than something like http://www.maplin.co.uk/clip-on-to220-heatsink-2583. Even http://www.maplin.co.uk/heatsink-for-to ... o220-30396 is probably too small.


I did order this one a while ago: http://www.ebay.co.uk/itm/251247262119?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Will it be good enough?
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm
by drgeoff » Sat Mar 30, 2013 7:29 pm
LudviG wrote:I did order this one a while ago: http://www.ebay.co.uk/itm/251247262119?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Will it be good enough?

Yes, that looks suitable.
Posts: 2042
Joined: Wed Jan 25, 2012 6:39 pm
by 1pi2much » Sat Mar 30, 2013 8:09 pm
Why not a rechargeable portable battery?
I think these can be connected to the mains and the device at the
same time, so for the few seconds the power switches it will take over.
I have a Duracell one which is a 500 mA which wont work for the pi, but
I am sure the new ones go up to 1A. Mine is at
http://www.amazon.com/Duracell-Instant- ... im_sbs_e_1

--
Posts: 67
Joined: Sun Feb 24, 2013 6:58 pm
by Joe Schmoe » Sat Mar 30, 2013 8:25 pm
It sounds like you're in the same situation I am in - where you might have momentary (up to a second) gaps in power and you want the Pi to stay up during that gap.

So, how about my pet idea - get a farad (or two) supecap - that ought to do it.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2255
Joined: Sun Jan 15, 2012 1:11 pm
by M33P » Sat Mar 30, 2013 9:35 pm
Joe Schmoe wrote:It sounds like you're in the same situation I am in - where you might have momentary (up to a second) gaps in power and you want the Pi to stay up during that gap.

So, how about my pet idea - get a farad (or two) supecap - that ought to do it.


It takes more than a few seconds to start a generator. And ensure that it doesn't trip because you left the fuel valve shut, or because microbes have decided to make the fuel filter their home.

I did some calculations and you will not get much more than 30 seconds out of any of the currently available supercaps - even with a boost converter to use all of the energy.

An ideal compromise is either a small lead-acid brick (cheaply available for desktop "pluggable" UPS systems) or a pack of NiMH AA batteries.
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by Joe Schmoe » Sat Mar 30, 2013 11:43 pm
OK - point taken. As I said, in my situation, that'd be fine, since I only have "blips", not real outages.

What about 1pi2much's idea - that looks reasonable. At $20, maybe a little pricey, but no big deal.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2255
Joined: Sun Jan 15, 2012 1:11 pm
by LudviG » Sun Mar 31, 2013 9:07 am
A lot of good ideas here, and i'd bet many of them are real good. For now i will stick with the stuff igot and have ordered and see if that will work :)

To clear what kind of powercut i am talking about. When we change the generators,wich we do 2 times a day, we first start the generator that is not running. Then we switch between them with a switch, this gives us a 3 second powercut to the whole barrage. When it has switched we stop the generator that dont deliver powert now.
Never argue with idiots, First they bring you down to their level. Then they beat you with experience.
User avatar
Posts: 11
Joined: Fri Mar 22, 2013 3:12 pm