User avatar
CynicOdys
Posts: 6
Joined: Thu Jun 02, 2016 8:40 am

Rpi 2 Ups DIY

Thu Jun 02, 2016 8:53 am

Heeeello ladies and gents,

After much soul-searching and crawling deep in the chinese internet, I have yet to find a solution to my UPS problem.

What I want is to power my Rpi 2 for a couple of hours (2-3),in the event of a power shortage, but also have a wifi dongle + turn a servo once for ~1sec . Thus I need a lot of juice(2-3A) from my battery. The problem is that I really don't want to make the batter management circuit on my own but rather buy a ready PCB from our good friends over at china .I have yet to find the proper PCB to couple with my Li-Po battery that not only can give me the juice I want, but more importantly has the power management capability to automaticaly switch between Main and Batter when our good lord decides to cut me off.

Cheers!

What i have found so far:
1)http://m.banggood.com/37V-Liion-Battery ... 28948.html (1A only-->X)
2) http://www.aliexpress.com/item/5pcs-1S- ... 351dc4e8e2

User avatar
flatmax
Posts: 343
Joined: Thu May 26, 2016 10:36 pm

Re: Rpi 2 Ups DIY

Thu Jun 02, 2016 11:15 am

Why don't you just plug the charger, battery and the pi in parallel ? That way you don't need anything else !

Something like this :

Code: Select all

charger  +++++++++++++ Battery +++++++++ Pi
charger  ----------- Battery ----------  Pi
If you need to change the battery voltage before powering the Pi, use a DC to DC converter like so :

Code: Select all

charger +++++++++ Battery ++++++ DC-DC +++++++ Pi
charger --------- Battery ------- DC-DC ------- Pi
Discuss hearing, acoustics, audio injector products, - https://lists.audioinjector.net/mailman/listinfo/people
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Rpi 2 Ups DIY

Thu Jun 02, 2016 12:22 pm

If size is not an issue the easiest solution is to get a mains UPS and plug ordinary PSUs into that..

User avatar
CynicOdys
Posts: 6
Joined: Thu Jun 02, 2016 8:40 am

Re: Rpi 2 Ups DIY

Thu Jun 02, 2016 1:32 pm

flatmax wrote:Why don't you just plug the charger, battery and the pi in parallel ? That way you don't need anything else !

Something like this :

Code: Select all

charger  +++++++++++++ Battery +++++++++ Pi
charger  ----------- Battery ----------  Pi
If you need to change the battery voltage before powering the Pi, use a DC to DC converter like so :

Code: Select all

charger +++++++++ Battery ++++++ DC-DC +++++++ Pi
charger --------- Battery ------- DC-DC ------- Pi
Are you sure that it would work that way? I am sceptical because no one has suggested it in the forums I have read thus far. Most people suggest a complex circuit that incorporates a charger and a battery management IC that automatically will change the power from main to battery when it detects power outage.

If we suppose that it works, when you mean charger you mean one of the pcb I suggested ? If yes, I don't care the amps of the charger because that applies only when charging the battery. So the amps that the battery will pass directly to my rpi is irrelevant?

As you can understand I am quite the noob :P

User avatar
CynicOdys
Posts: 6
Joined: Thu Jun 02, 2016 8:40 am

Re: Rpi 2 Ups DIY

Thu Jun 02, 2016 1:38 pm

Well I was really hoping to get around in making it myself, so that's my last resort

User avatar
flatmax
Posts: 343
Joined: Thu May 26, 2016 10:36 pm

Re: Rpi 2 Ups DIY

Mon Aug 22, 2016 10:39 am

I think you can get an off the shelf trickle charger - that will ensure that there is over voltage protection.
To allow for battery depletion (when the power goes out, the Pi will suck the battery) just use a deep cycle battery !
Make sure the battery is 6V, to reduce the power consumed by the Pi's 3.3V linear regulator : http://www.onsemi.com/pub_link/Collateral/NCP1117-D.PDF

Matt
Discuss hearing, acoustics, audio injector products, - https://lists.audioinjector.net/mailman/listinfo/people
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Rpi 2 Ups DIY

Mon Aug 22, 2016 11:12 am

flatmax wrote: Make sure the battery is 6V, to reduce the power consumed by the Pi's 3.3V linear regulator : http://www.onsemi.com/pub_link/Collateral/NCP1117-D.PDF

Matt
1. You cannot run a RPi directly from the battery. The 3.3 volt "regulator" is fed from 5 volts irrespective of the battery voltage. So "Make sure the battery is 6V to reduce the ......" is nonsense.

2. For quite some time RPis have been using switching, not linear ones, for the onboard regulators.

steveb4pi
Posts: 62
Joined: Sun Aug 11, 2013 6:12 pm

Re: Rpi 2 Ups DIY

Mon Aug 22, 2016 11:40 am

Google 'Power Bank Pi UPS' ..

How it worlks = you plug the output of the Power Bank into your Pi and the standard Pi mains power block plugs into the Power Bank recharge socket... job done :-)

Of couse nothing is quite that simple as some Power Banks just don't 'work' as a UPS = some refuse to deliver 'external' power whilst being recharged, some 'drop out' for a few seconds when 'switching over' from mains to battery (so cause your Pi to reboot)

You are likley to find a 'good' one if it actually claims it supports 'charging' and 'rechnarging' at the same time (this is known as 'pass-through charging' or 'Duo-Charge function')

Good luck !

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Rpi 2 Ups DIY

Mon Aug 22, 2016 5:54 pm

flatmax wrote:Why don't you just plug the charger, battery and the pi in parallel ? That way you don't need anything else !

Something like this :

Code: Select all

charger  +++++++++++++ Battery +++++++++ Pi
charger  ----------- Battery ----------  Pi
If you need to change the battery voltage before powering the Pi, use a DC to DC converter like so :

Code: Select all

charger +++++++++ Battery ++++++ DC-DC +++++++ Pi
charger --------- Battery ------- DC-DC ------- Pi
As we seem to have brought up a 2 month old thread I'd like to comment on the above.

With a LIPO (as indicated in the OP) that's a good setup of you want to achieve fire. It's not so good for powering devices or charging the battery. This type of setup is relatively safe with SLA batteries if you set the power supply to a suitable level. Some charging control would be useful though.

sora03
Posts: 263
Joined: Mon Dec 29, 2014 4:11 pm
Location: Philippines
Contact: Website YouTube

Re: Rpi 2 Ups DIY

Tue Aug 23, 2016 8:17 am

TS try the 12v UPS using Lead Acid Battery. They endure trickle charging also the NiMH but it may require building circuits.
Mastodon: https://mastodon.social/@ssora

User avatar
davidcoton
Posts: 5028
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Rpi 2 Ups DIY

Tue Aug 23, 2016 8:36 am

Just to be clear, for future viewers:
1) Any battery needs some form of circuit for safe charging. Constant voltage for lead acid is simplest, after that it gets harder.
With LiPo in particular overcharging is dangerous, DIY chargers are not recommended.
2) No battery provides the 5V needed to power a Pi directly (though in some circumstances 4.5V or 4.8V might work).
In most cases a switching regulator should be used.
3) Extra circuitry is needed to shut down the Pi when battery capacity is low (and mains off),
and to switch off and restore power to the Pi so that it reboots when power is restored.
4) The built-in code for shutdown must also be activated (or write your own).
Signature retired

Return to “Troubleshooting”