RDPUser
Posts: 71
Joined: Tue Jan 30, 2018 12:18 pm

Re: Geekworm ups pi hat

Fri Mar 23, 2018 8:03 am

Code: Select all

- The one in the links above is: Power Pack Pro V1.1 
Thanks, I didn't noticed that they are different versions and was suprised that I dind't find it on http://www.raspberrypiwiki.com

You're an expert, which one can you recommend? I need:
Wall power goes of, Raspberry keeps running, wall power comes back, battery is charged again, without pressing any buttons or stuff like that. It must be completely unattended.

I don't need an automatic shutdown of PI when battery is low, I expect power outages of maximum 1 hour and if it should be longer, ok then Raspi is switched of without shutdown, I take the risk.

I'll use a 18650 protected cell (feeling much safer with that than LiPo), any idea where I can get this little plastic socket to plug the battery in? Perhaps you have just a name for this plug to search with.

Do you get under voltage warnings from the PI with Power Pack Pro V1.1?

Fermars
Posts: 21
Joined: Wed Sep 17, 2014 2:35 pm
Location: Madrid, Spain

Re: Geekworm ups pi hat

Fri Mar 23, 2018 1:12 pm

RDPUser wrote:
Fri Mar 23, 2018 8:03 am

Code: Select all

- The one in the links above is: Power Pack Pro V1.1 
I need:
Wall power goes of, Raspberry keeps running, wall power comes back, battery is charged again, without pressing any buttons or stuff like that. It must be completely unattended.

I don't need an automatic shutdown of PI when battery is low, I expect power outages of maximum 1 hour and if it should be longer, ok then Raspi is switched of without shutdown, I take the risk.
That's exactly what 99% people want when talking about UPS. And up to now, this Geekworm "solution" is not a real one.

LeisureSuitLadi
Posts: 1
Joined: Fri Apr 20, 2018 11:54 am

Re: Geekworm ups pi hat

Fri Apr 20, 2018 12:46 pm

Hi guys,

Inspired by Simon's wrap-up and collection of datasheets etc. I decided some time ago to dig out the UPS board again and give it another try. In summary, the board is not really useful, as it is, but it can be extended with a PIC18F... as described by Simon or, as in my case with a 5V Arduino Pro mini.

I'm running the board now for some weeks with good results, after I found some solutions for the following issues:

1) biggest drawback of this board is, that we can not sense reliably, when a power supply is connected or not. Even with an additional controller it is not possible without adding a rectifier diode between the supply and the board to decouple the circuits. The downside of adding a diode is that the input voltage at the board's side would drop by 0,4V to 0,7V, depending on the performane of the diode.

So we need to evaluate other, available information to find out, if the battery is charged or not.

2) the charging circuit and the I2C interface circuit are separated and therefore may or may not be in sync. An example for that are the 4 LEDs controlled by the charging circuit and the SOC value provided by the I2C interface. The learning capability of the latter makes it even worse to really calibrate both against each other by software.

So some additional 'intelligence' is required to use that board in a way which comes closer to what people expect from such board.

In brief, here is what I did:

Use an Arduino Pro mini to read SOC and ChargeRate from the board (yes, running both, Arduino and my Pi as I2C controllers with a potential timing conflict, but this should be ok, if you do not access the I2C interface too often) once in every 60 seconds.

Evaluate the status from SOC and ChargeRate data and provide the result via I2C to the Pi on request (this time the Arduino is acting as a slave).

The Pi then can send the time in seconds, after which the board is to be turned off. I used a Tristate Input on the Arduino, which is changed to Output/Low for a certain period of time to activate the existing push-button.

In order to know if the Pi is currently powered or not, I connected the output of the UPS board to the analog input of the Pro mini via a voltage divider. This turned out to be quite handy and reliable.

In order to save power, I set the Arduino to sleep. It is woken up by the second LED which is either flashing or off provided a minimum charge is available on the battery. Since the charging circuit is pulsing the relevant LED outputs, I set the Arduino to wake up on a change of the corresponding output.

In addition I'm checking SOC and ChargeRate after wakeup if there is really a minimum charge available. Should the conditions be met, the Pi is turned on.



I haven't compiled yet a pictured summary due to lack of time, but if there is some interest I may do so over the next weeks including the Arduino sketch. So let me know, what you think.


P.S.: I didn't have the problem yet, that battery is not being charged, when power supply is reconnected. This actually works quite reliable.

robidouxj
Posts: 4
Joined: Thu Mar 22, 2018 5:05 pm

Re: Geekworm ups pi hat

Fri Jun 01, 2018 4:55 pm

Has anyone considered tying the power button to a GPIO pin? I suspect pulsing a low to the power switch and returning to high should turn on the unit. You should be able to turn it off remotely as well with a longer pulse if so inclined.

robidouxj
Posts: 4
Joined: Thu Mar 22, 2018 5:05 pm

Re: Geekworm ups pi hat

Sat Jun 02, 2018 5:06 pm

I have the Raspi UPS Hat V1.0. I'm powering this and my pi via the GPIO pins (4 & 6). Its installed in a custom 3D printed project box. The power supply is controlled from a switch mounted externally on the project box.

Problem 1: The end user is unable to power off/reset the Pi from the external switch due to the UPS. The Pi will remain on until the battery is drained.

Problem 2: The unit needs to remain UPS protected after a power reset either from disconnecting the battery and power source or from loss of power source and the battery drains. Once power is returned the UPS does not automatically turn back on

Solution Part 1: Cut the positive lead on battery and splice 2 wires to connect to the 2nd pole of the external switch. When switch is on but power is lost, the battery remains connected allowing the UPS to function as desired. When the switch is turned off, the power supply is turned off and the battery is disconnected. This powers down the Pi for a hard reset. When powered back on the Pi turns back on and the battery is reconnected. The UPS at this point is disabled until the button on the hat is pressed (losing power again will not engage the battery and the Pi will lose power).

Solution Part 2: Solder a wire to the positive terminal of the push button switch on the UPS Hat. I recommend 24 gauge solid core as the contact point is small. Splice to a jumper wire for connecting to the GPIO. I recommend using some tape to secure the wire to the bottom of the UPS Hat, again the contact point is small and worrying this connection will cause a failure. (An alternative solution for the bold is to solder directly to a GPIO pin, I prefer the jumper wire so I can identify the pin is in use). In your startup script toggle the selected GPIO to 0 for .5 seconds and then set back to 1. The UPS will be again ready to protect the Pi from power loss.

Code: Select all

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(12,GPIO.OUT)

GPIO.output(12,0)
time.sleep(.5)
GPIO.output(12,1)

Return to “Add-ons”

Who is online

Users browsing this forum: bertlea and 5 guests