TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: JAMES HARRIS
from: BIG BAD BOB
date: 2018-03-03 12:13:00
subject: Re: A decent Pi UPS does

On 01/25/18 14:13, James Harris wrote:
> I was looking for a basic UPS which would allow a Pi to keep running for
> a few minutes if power were lost or while the Pi was being transferred
> from one mains socket to another. Ideally, it would tell the OS to shut
> down, if necessary, and would restart the machine when the mains came
> back online.
>
> Well, I came across the following one which looks excellent. It seems to
> do all I wanted and the battery can be upgraded to give longer life.
>
> https://www.modmypi.com/raspberry-pi/power-1051/ups-boards-1051/ups-pico
>
> Any opinions on it? And as it is out of stock at the moment, would you
> recommend any similar UPS?

I would think that any LiPo 5V power/charger system that allows you to
monitor that the "UPS" is "on the battery" would work.  A simple 5V LiPo
add-on board would do the trick, in fact.  There are probably quite a
few possible solutions here.

Example:

https://learn.sparkfun.com/tutorials/sparkfun-5v1a-lipo-chargerbooster-hookup-g
uide

(with 400maH battery, about US$20)

In effect, you'd use a LiPo battery charger (with a 5V boost regulator)
that you can have plugged into a 5V power source 'all of the time',
keeping the battery charged and powering the RPi.  When the incoming
power goes out, the LiPo battery kicks in, and keeps everything running.

You might need a way of detecting that the input power went out (and
that you're on the battery), but that shouldn't be too difficult.  Use
one of the IO pins to indicate "on the battery", simple enough.

Then you could estimate capacity or measure battery voltage (an extra
A:D converter or limit crossing detector of some kind) and you do a
shutdown on the RPi if bat voltage gets too low.  Typically you can
undervolt trip at <3.2v on the battery to give yourself enough time to
shut down safely and help to ensure long battery life (by not draining
it way too much).  An undervolt detect would then be a simple voltage
comparison circuit driving an IO pin.  Bat Volts < 3.2V (let's say)
_AND_ you have no input power, and GPIO pin goes to the "shut me down"
state.  Then a script running as a daemon does a 'sudo poweroff' when it
detects that this pin has been in the 'shut me down' state for long enough.

So this means rolling your own scripts, but with so many possible
solutions available, you might find the cost savings of "the cheapest
one" better than the UPS price of ~25 GBP

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.