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

Re: Geekworm ups pi hat

Wed May 03, 2017 12:32 pm

I have my Pi connected to a powered USB Hub. I can try something like that just powering the Pi and the UPS at the same time with two Micro USB cables using two different ports of the USB Hub. I hope I do not break anything....
Anyway, the main problem is not initialize the Pi after the power come back, is that the UPS does not begin charging unless powering everything off, disconnect and reconnect.
I will test that way anyway.

Regards.

Geekworm
Posts: 28
Joined: Wed May 03, 2017 9:26 am
Location: China
Contact: Website

Re: Geekworm ups pi hat

Thu May 04, 2017 3:33 am

Thanks.
Geekworm Official Store!
Contact: [email protected]
Know more Raspberry Pi Related Product Information: http://www.raspberrypiwiki.com/index.php/Product_Manual#Raspberry_Pi

Pyle
Posts: 3
Joined: Mon Apr 10, 2017 6:57 am

Re: Geekworm UPS pi HAT

Sat May 06, 2017 11:00 am

@ukonline2000

Does this cable fix the accu-drain after dis- and reconnecting main-power?

As developer, you can easily look for the parameter by checking the following registers (MAX17048) with, without an again with the power-line:

Code: Select all

VCELL/SOC (02/04): 4.08V (86%)
Hibernate    (0a): True
ActThr       (0a): 0.060V
HibThr (%/h) (0b): 26.62
CRATE (%/h)  (16): 0.00

VALRT min.   (14): 3.40V
VALRT max.   (14): 4.20V
VL           (1a): False
VH           (1a): False
Dis          (18): False
VRESET       (18): 3.00V
If VCELL fells below 4V, main-power is disconnected. If main-power is back, the used accu energy would not replaced by the device, VCELL won't be back to >4V<=4.2, CRATE doesn't change as long accu is totaly empty. And you know what happens with undercharged LiPos.

Is there a schematic available to find a workaround by customer? Currently the HAT is not worth the time.

simonbr
Posts: 25
Joined: Sun May 13, 2012 5:02 pm

Re: Geekworm ups pi hat

Sat May 20, 2017 3:10 pm

Hi all,

For your information, I published an article about an ongoing project with this UPS board on my website. It contains various technical details, such as a reverse engineered circuit diagram. The article also suggests how the board might be modified to enhance its functions. Let me know what you think!

Have a look at:

https://brousant.nl/jm3/index.php/elekt ... spberry-pi

Best regards
Simon

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

Re: Geekworm ups pi hat

Sat May 20, 2017 9:07 pm

simonbr wrote:Hi all,

For your information, I published an article about an ongoing project with this UPS board on my website. It contains various technical details, such as a reverse engineered circuit diagram. The article also suggests how the board might be modified to enhance its functions. Let me know what you think!

Have a look at:

https://brousant.nl/jm3/index.php/elekt ... spberry-pi

Best regards
Simon
Very good job!, amazing :o congratulations :)
As you say, the modifications are not trivial and not suitable for everyone. A simple schematic for newbies about the modification regarding the resuming battery charging after the power supply comes back would be very useful,I do not know even if I am going to be able to make it.

simonbr
Posts: 25
Joined: Sun May 13, 2012 5:02 pm

Re: Geekworm ups pi hat

Thu May 25, 2017 9:08 pm

Hi Fermars, thank you!

Following your suggestion, I added an article on my website describing a relatively simple modification of the UPS board. I hope it is of use to you and others.

Check out https://brousant.nl/jm3/elektronica/105 ... n-detailed

Also, I made some updates to the original article. I think I found out the type of U3, it's ETA9741 :) . See https://brousant.nl/jm3/elektronica/104 ... spberry-pi

Best regards
Simon

souler92
Posts: 3
Joined: Thu Jun 08, 2017 6:14 pm

Re: Geekworm ups pi hat

Sat Jul 08, 2017 7:39 pm

sepie wrote:I bought one on aliExpress and after some initial hurdles I have it up and running on Raspberry with OSMC. I use a script that ensures battery is charged to a minimum level each time and turns down when battery is below a certain level. So far it works well in the car (that is the use case). I am less happy about the small on/off switch on the board. I need to find a way how to make this bigger and easy accessible on outside of Cyntech case. Another thing what would have been nice is that you could program how it turns on. For me best would be always on when outside supply available.

hey i bought this one https://nl.aliexpress.com/item/Raspberr ... 0.0.ZMFEdK


i really need help setting it up.. i dont have any coding skills. and i need to get it to work in my car. soooo ignition on, pi starts up. ignition off , pi shuts down.

can you help me?:0

tazitiz
Posts: 1
Joined: Wed Nov 29, 2017 8:38 am

Re: Geekworm ups pi hat

Wed Nov 29, 2017 8:48 am

On a reply to souler - about the geekworm ups hat 1.1

I have been toying with this one for a week, and the ups works nicely. When the power is on it charges the battery and supplies power to the pi. When power is cut it supplies power to the pi as long as the battery is not empty. And icing to the cake: when power supply is reconnected, the hat will start charging the battery until it is full and continues uninterrupted power supply to the pi.

This board is allmost an overall winner for ups hat pi, at a very low price! except for the total power, it does supply enough for the pi3 but if i connect an adafruit 7" 800x480 display to the usb, the power supplied by the ups hat is not enough and the pi starts bouncing on and off.

I have created a little script that you can use if the i2c interface on the pi has been enabled and the i2cget command works:

Code: Select all

# file created by holland-ict 29-11-2017
# 

# batt_voltage
raw=$(($((`i2cget -y 1 0x62 0x02 b`))*256+$((`i2cget -y 1 0x62 0x03 b`))))
fine=$(($raw*305/1000))
echo voltage of battery :$fine mv

#Calculated battery fill rate
perc_batt=`i2cget -y 1 0x62 0x4 b`
perc_batt_dec=$(($perc_batt))
echo fill rate of battery calculated by ic $(($perc_batt_dec*100/256))%

#version
version=  $((`i2cget -y 1 0x62 0x00 b`))
echo version of the hat: $version

#get alert - if voltage of batt drops under set variabel then alert bit 7 - or most significant bit - will be set
alert_raw=`i2cget -y 1 0x62 0x6 b`
alert_dec=$(($alert_raw))
if [ "127" -lt "$alert_dec" ] ; then    echo alert alert alert. sudo shutdown pi and sink the stash; alert=$(($alert_dec-128)) else echo no alert.;fi

mins_remain=$(($((`i2cget -y 1 0x62 0x7 b`)) +$((256*alert_dec))))

echo calculated minutes remaining by cw2015 ic: $mins_remain

# have fun!
in the coming weeks i want to build a crontab that updates dummy switches in domoticz so you can monitor the ups in there. keep you posted!

s0l0ist
Posts: 1
Joined: Wed Dec 20, 2017 10:59 pm

Re: Geekworm ups pi hat

Wed Dec 20, 2017 11:03 pm

First of all thanks to everyone who contributed to this thread.

But like some others out there I have a problem. I am running several hats on the board and would like to squeeze more juice out of the UPS.

It says max 2.0A output. Is there some pull up/down resistor, mosfet, or something that I can replace that would allow me to draw up to 2.5A on the output? I'd rather have this thing be able to fully power my Pi 3 + 3.5" screen without throttling because of voltage / current drops.

Thanks!

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Thu Feb 22, 2018 4:37 pm

Hi all:

I know a lot of time passed since the last post was submited.
I've been using this UPS board for the last months with a lot of succes using my own python script installed as a service.

From my tests, and looking at the i2cdump I'm pretty sure the geekworm ups hat has the higher performance MAX17048 chip with much more registers then previously reported in this topic.

https://datasheets.maximintegrated.com/ ... X17049.pdf


If someone finds interesting, I may also post here my python script that controls the ups.

philicibine
Posts: 4
Joined: Thu May 11, 2017 10:44 am

Re: Geekworm ups pi hat

Thu Feb 22, 2018 8:53 pm

id be interested in your python script!

Just bought one of these for my car, but didnt realise about the whole button press to restart it thing. Need to find a solution. :|

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

Re: Geekworm ups pi hat

Mon Feb 26, 2018 7:22 am

nvdias wrote:
Thu Feb 22, 2018 4:37 pm
Hi all:

I know a lot of time passed since the last post was submited.
I've been using this UPS board for the last months with a lot of succes using my own python script installed as a service.

From my tests, and looking at the i2cdump I'm pretty sure the geekworm ups hat has the higher performance MAX17048 chip with much more registers then previously reported in this topic.

https://datasheets.maximintegrated.com/ ... X17049.pdf


If someone finds interesting, I may also post here my python script that controls the ups.
I am interested in your python script, thank you for sharing.

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Fri Mar 02, 2018 4:55 pm

The install script and python service are available here:

https://drive.google.com/open?id=1lDuTR ... -jEM2yIDRp

Just put them in a folder in you Pi and execute
sudo ./install.sh


Don't forget to read the readme :)

Code: Select all

Raspi UPS HAT.
Scripts by nvdias
March 2018

Python script and service
Install with:
 sudo ./install.sh

 - It will install the necessary python and i2c modules (python i2c-tools python-smbus)
 - Adds i2c activation in /boot/config.txt  (device_tree_param=i2c_arm=on)
 - Adds module to /etc/modules (i2c-dev)
 - Service will load at boot time,
 - Detects for raspi ups hat in i2c, channel 1, address 0x36.
 - Writes log into /var/log/raspiupshat.log,
 - If kodi is running, it will send notifications to TV Screen.

Detects battery mode,
if battery is less than 30% it will gracefully shutdown.

After pi is shutdown, and power gets back, the system WILL NOT turn on automatically.
It will be needed a long press in ups button to power it off.
Long press again will power-on.
Removing battery from ups will reset the system (not advisable).

The battery will loose capacity from time to time.
Lowering the charged status from around 96% to les than 80% in around 8 months.
The provided service will do a quick reset to the UPS at boot to recalibrate the battery,
and each time external power is recovered.

A good approach is to do the following procedure every 6 months:
power off the pi and the ups and charge it overnight disconnected from the raspberry pi.
After reconnection, the battery level should be back to around 95%

For notifications to work in kodi:
   settings ->  services -> control -> allow remote control from applications on this system

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

Re: Geekworm ups pi hat

Fri Mar 02, 2018 11:38 pm

Thank you. Downloaded, I will tested asap. ;-)

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Sat Mar 03, 2018 12:53 am

simonbr wrote:
Thu May 25, 2017 9:08 pm
Hi Fermars, thank you!

Following your suggestion, I added an article on my website describing a relatively simple modification of the UPS board. I hope it is of use to you and others.

Check out https://brousant.nl/jm3/elektronica/105 ... n-detailed

Also, I made some updates to the original article. I think I found out the type of U3, it's ETA9741 :) . See https://brousant.nl/jm3/elektronica/104 ... spberry-pi

Best regards
Simon
Forcing a quick reset after the power return it will force the ups to recharge the battery.
The script I've shared earlier takes care of that.

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

Re: Geekworm ups pi hat

Sat Mar 03, 2018 11:38 am

The main problem with this UPS is that they do not recharge the battery once the power returns. Usually you are not close to the PI to do a reset when that happens.

The only solution that really works is this one:
viewtopic.php?f=45&t=174392#p1156484

Do not know if could be done something via software to do a "hard" reset to the UPS to start charging automatically.

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Sat Mar 03, 2018 11:58 am

Yes. That was what I was trying to explain.
After the power is back you can force a quick reset by software (providing the raspberry pi is still running)
I’ve shared a pi service based on a python script that does that.
Just look 2 or 3 posts above.

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

Re: Geekworm ups pi hat

Sat Mar 03, 2018 3:36 pm

Ok. I asked because I have not seen any command line to do that soft reset in your readme.txt. Can you tell us the command list to control the UPS? Thanks!!

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Sat Mar 03, 2018 5:41 pm

Fermars wrote:
Sat Mar 03, 2018 3:36 pm
Ok. I asked because I have not seen any command line to do that soft reset in your readme.txt. Can you tell us the command list to control the UPS? Thanks!!
You need to send 0x4000 to the register 0x06 of the ups controller which is at address 0x36 of smbus 1

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Sat Mar 03, 2018 5:51 pm

This can be done via the command line with:
i2cset -f -y 1 0x36 0x06 0x0040 w


The quick reset should only be called when the battery is stable for more that 30 minutes, or after the power returns.

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

Re: Geekworm ups pi hat

Thu Mar 22, 2018 5:09 pm

There seems to be a new version 1.1 https://www.banggood.com/Geekworm-Power ... 82803.html
Any experiences with it? Are the problems solved like not charging after power comes back?

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Thu Mar 22, 2018 5:52 pm

My ups hat is version 1.1
It has exactly the same behaviour
(I don't think there was a version 1.0)

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

Re: Geekworm ups pi hat

Thu Mar 22, 2018 7:28 pm

Is your PCB-Board also red?

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

Re: Geekworm ups pi hat

Thu Mar 22, 2018 9:01 pm

I have got the 1.0 version with green board. I don't know what new features we can get with this one.

nvdias
Posts: 8
Joined: Thu Feb 22, 2018 4:32 pm

Re: Geekworm ups pi hat

Thu Mar 22, 2018 9:18 pm

No wait. I'm sorry. Didn't comment correctly:


- This topic is for ups hat.
it supports 2.5A on the battery.
No under voltage warnings (if the battery is full).

Here:
http://www.raspberrypiwiki.com/index.ph ... _HAT_Board
controller datasheet:
https://datasheets.maximintegrated.com/ ... X17049.pdf

As I said earlier in some posts it does a lot more than what is advertised.


- The one in the links above is: Power Pack Pro V1.1
I've also bought that one.
It ships with a simpler chip
It is more "chinese" than the ups hat.
the controller chip is very limited.
I cannot get more than 1.8A from it - not enough to power my raspberry pi 3 with a 2 TB seagate hdd - the disk simply stalls at boot.

It has the interesting issue of optionally connecting to the pi with a usb otg cable. but not enough power :(

see here:
http://www.raspberrypiwiki.com/index.php/Power_Pack_Pro
datasheet:
http://www.raspberrypiwiki.com/images/0 ... asheet.pdf

Return to “HATs and other add-ons”