"UPS" for the RPi

Here you can discuss things that are not directly related to running or using XBMC4XBOX.
Post Reply
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

"UPS" for the RPi

Post by LudviG »

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 came 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- ... 3a7f80f9a7

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.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: "UPS" for the RPi

Post by xbs »

I would turn off turn on the RPI when needed. 40 secs boot isn't much.
Or if possible only change generator when the other one is already running.
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
whufclee
Posts: 922
Joined: Tue Jul 17, 2012 5:42 pm
Location: Essex, UK
Has thanked: 18 times
Been thanked: 109 times
Contact:

Re: "UPS" for the RPi

Post by whufclee »

Taken from the official r-pi FAQ's:
Can I run power Raspberry Pi from batteries as well as from a wall socket?
Yes. The device should run off 4 x AA rechargeable cells, but there may be stability issues as the batteries lose their charge. Using 4 x AA Alkaline cells will result in 6v and it is therefore recommended to use a voltage regulator.

Doesn't give much info there but you may find your answers in this thread

By the way if you're using unstable power voltages I'd make sure you have xbmc installed on a USB 3.0 stick. Not only will it be much faster but the unstable voltage won't corrupt the USB like it can do with the SD card.
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: "UPS" for the RPi

Post by LudviG »

xbs wrote:I would turn off turn on the RPI when needed. 40 secs boot isn't much.
Or if possible only change generator when the other one is already running.
The thing is that i am on work only every second week, and the other shift also uses the RPi. I don't trust them to turn it off before changing generators. The RPi also starts automaticly when the power returns, so when we change generators in the morning, wit will turn on. Then i will have to back up and stop it before i change generator in the evening.

The generators can we changes all the time, we start the one going to run, then flick a switch wich changes wich generator power is taken from. That is what cause the powercut for about 5 seconds. Then we turn off the generator we dont wanna run.
Last edited by LudviG on Sat Mar 23, 2013 11:53 am, edited 1 time in total.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: "UPS" for the RPi

Post by LudviG »

whufclee wrote:Taken from the official r-pi FAQ's:
Can I run power Raspberry Pi from batteries as well as from a wall socket?
Yes. The device should run off 4 x AA rechargeable cells, but there may be stability issues as the batteries lose their charge. Using 4 x AA Alkaline cells will result in 6v and it is therefore recommended to use a voltage regulator.

Doesn't give much info there but you may find your answers in this thread

By the way if you're using unstable power voltages I'd make sure you have xbmc installed on a USB 3.0 stick. Not only will it be much faster but the unstable voltage won't corrupt the USB like it can do with the SD card.
Thanks, i'll read that thread. I have it installed on a SD card atm, i'll start looking for a USB stick :)

I dont think thie setup i posted will give unstable powersupply, and it is fun to make stuff urself :D It just not much info on the converter i linked to. I will ask the seller some questions about it.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: "UPS" for the RPi

Post by xbs »

How about a car battery with a lighter phone charger?
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: "UPS" for the RPi

Post by LudviG »

xbs wrote:How about a car battery with a lighter phone charger?
This is not far from it. But the size of the UPS batteries are easier to hide in the tv-bench than a car battery.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
professor_jonny
Posts: 1298
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 66 times
Been thanked: 196 times

Re: "UPS" for the RPi

Post by professor_jonny »

Im guessing the generator puts out 240v ?

If so get two 240v charges one on each generator and put them across the battery to charge it and put a diode in series with each charger then use use a phone charger as suggested above to power the rpi you could also ues 2 relays on the 240v circuit to close the connections to the battery from the output of the charger.
User avatar
xman
Posts: 1289
Joined: Wed Jul 04, 2012 2:30 pm
Location: Sydney, Australia
Has thanked: 55 times
Been thanked: 168 times

Re: "UPS" for the RPi

Post by xman »

Nothing real technical required. Grab one of those 12vDc drycell batteries you have pictures of and put an LM7805 linear voltage regulator in line to supply 5vDc for the Rpi. Without a heatsink on the regulator, it will power your Rpi perfectly. Put a heatsink on the reg if you want to take the output up to 1 amp but for just the Rpi motherboard, this is overkill. Now you have the Rpi running as a standalone, you can hook up any mains powered 12vDc trickle battery charger up to the batteries terminals so the mains will maintain the battery fully charged and when the mains drops off, the battery will continue to supply the reg with power and the reg will drop the voltage down to the required 5vDC for your Rpi. I think you'll find this battery/ reg setup will actually power your Rpi for a couple of days without the charger just don't allow the drycell battery voltage to drop below 10.5vDc or you'll kill the drycell and you won't be able to recharge it again. I've just had this occur on one of my quad bikes that had a faulty regulator. :x
This may help you in your quest........http://www.youtube.com/watch?v=WTylbNtZW3A

Also, this is the only type of 5vDC supply I would be using on an Rpi because it is linear and they react a lot quicker to voltage upsets than a switchmode power supply.
Enjoy. :D
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: "UPS" for the RPi

Post by LudviG »

professor_jonny wrote:Im guessing the generator puts out 240v ?

If so get two 240v charges one on each generator and put them across the battery to charge it and put a diode in series with each charger then use use a phone charger as suggested above to power the rpi you could also ues 2 relays on the 240v circuit to close the connections to the battery from the output of the charger.
This would be way too much tinkling with the generators, and they supply power to the same lines. You just switch between them to save diesel when we dont need that much power. They deliver 400v, but ofc it is 240v in the living unit and all the sockets. But some of the power hungry systems use 400v.
xman wrote:Nothing real technical required. Grab one of those 12vDc drycell batteries you have pictures of and put an LM7805 linear voltage regulator in line to supply 5vDc for the Rpi. Without a heatsink on the regulator, it will power your Rpi perfectly. Put a heatsink on the reg if you want to take the output up to 1 amp but for just the Rpi motherboard, this is overkill. Now you have the Rpi running as a standalone, you can hook up any mains powered 12vDc trickle battery charger up to the batteries terminals so the mains will maintain the battery fully charged and when the mains drops off, the battery will continue to supply the reg with power and the reg will drop the voltage down to the required 5vDC for your Rpi. I think you'll find this battery/ reg setup will actually power your Rpi for a couple of days without the charger just don't allow the drycell battery voltage to drop below 10.5vDc or you'll kill the drycell and you won't be able to recharge it again. I've just had this occur on one of my quad bikes that had a faulty regulator. :x
This may help you in your quest........http://www.youtube.com/watch?v=WTylbNtZW3A

Also, this is the only type of 5vDC supply I would be using on an Rpi because it is linear and they react a lot quicker to voltage upsets than a switchmode power supply.
Enjoy. :D
I did look at the video, and these looked eaier than the converter i linked too. Guess the ground is the same for both input and output?

Image

I will order one right away and try this next work week, even though i ordered the other converter.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xman
Posts: 1289
Joined: Wed Jul 04, 2012 2:30 pm
Location: Sydney, Australia
Has thanked: 55 times
Been thanked: 168 times

Re: "UPS" for the RPi

Post by xman »

Yep ground is common the the input DC and the output DC and you can get the regs as a TO3 package as well if that would suit your needs better. If you look up LM78H05 you will see what I mean. Hook up is the same. The LM76H05 is also a 5 AMP device but your not going to need such high current but there is a TO3 package that is only 1 amp, just can't remember the number of hand.
trogggy
Posts: 106
Joined: Fri Jul 06, 2012 1:24 pm
Has thanked: 4 times
Been thanked: 12 times

Re: "UPS" for the RPi

Post by trogggy »

The only problem you get from powering down is possible sd card corruption. If it were me I'd run from a usb stick and just have half a dozen spare sd boot cards (they only need to be tiny, I've got a 256MB in one of mine) on a shelf somewhere. If it doesn't re-boot change cards.
I've powered down by unplugging plenty of times since switching to usb, and I've yet to corrupt an sd card.
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: "UPS" for the RPi

Post by LudviG »

Thats a good idea, but i still sant it to stay on. There is at least 2 powercuts each day, and i am only there every second week. The other shift will use it to. Thats why i want it maintance free. It it also a fun project for me, i love trying new stuff like this :grin::grin:
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
Post Reply