On Mon, 16 Oct 2017 21:31:06 -0400, rickman wrote:
> Allan Herriman wrote on 10/15/2017 3:42 AM:
>> On Sat, 14 Oct 2017 20:18:36 -0400, rickman wrote:
>>
>>> I was looking for a Li-ion power source adapter and found this in the
>>> process.
>>>
>>> http://www.ebay.com/itm/112419803835
>>>
>>> Looks like it would serve as a UPS for a rPi in many situations. The
>>> listing isn't big on specs, but they seem to show it will drive well
>>> over an amp in a pass through mode. They talk about a couple of amps
>>> on each of two ports in power bank mode.
>>>
>>> I know this has been kicked around a bit here, but I don't know if
>>> anyone found an economical solution. This unit is around $10 and a
>>> Lithium battery will cost around another $4 or $5. You can either use
>>> the standard 18650 type or one of the Lithium polymer flat cells.
>>> Both seem to be available cheaply with about 3000 mAHr capacity
>>> running a typical pi for around 2 hours.
>>
>> Looks ok to me, if all you want is a power bank controller that can
>> charge and discharge at the same time. You might find you can buy a
>> complete power bank (including the Li cells) for about the same price
>> if you shop around. My local computer store was selling Romoss Sailing
>> models on sale for ridiculously low prices recently.
>>
>> To be a useful, general purpose UPS though, it needs to be able to
>> output a signal to tell the load (Pi) that it's about to run out of
>> juice so that the Pi can shut down cleanly and go into a low(er) power
>> state, all without corrupting the SD card.
>>
>> Assuming you can figure out how to derive such a signal (e.g. by
>> monitoring cell voltage, or by starting a timer when the charging input
>> fails), I guess you could try to couple it to something like this:
>> https://shop.pimoroni.com/collections/raspberry-pi/products/onoff-shim
>>
>> "It watches the state of BCM pin 17 and, when pulled low (pressed), it
>> initiates a clean shutdown. Last thing, just before your Pi shuts down,
>> BCM pin 4 is pulled low to completely cut power to your Pi."
>
> If the Pi pulls BCM pin 4 low to cut power (I assume on the power
> source) how does the circuit get powered back up? Once power is cut,
> pin 4 won't be pulled low anymore. I guess it has to be a momentary
> input controlling a state on the power controller. Then something else
> has to change the state and turn power back on?
That board is an on/off controller, rather than a full UPS interface. It
only has two 3-pin SOT23s and one 5-pin SOT23 on it, so don't expect too
many smarts.
I only meant it as a source of ideas, not something that you would
actually use, particularly at that price.
The Python script that makes it work is probably more interesting than
the hardware. If you reuse those exact GPIO pins, you could use the
script without modification.
Any UPS solution you come up with will need to do something similar.
Allan
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|