Raspi UPS HAT Board

From All for Raspberry Pi, Arduino, Lattepanda, Orange Pi, Pine64 | by Geekworm
Jump to: navigation, search
Raspberry Pi UPS HAT Board + 2500mAh Battery sku:451766



Raspberry Pi UPS HAT Board + 2500mAh Battery sku:451766
Raspberry Pi UPS HAT Board sku:451741
Raspberry Pi UPS HAT Board + 2500mAh Battery sku:451766

Instruction

Features:

  • Standard dimension of Raspberry Pi HAT, and it's compatible with all of the expansion board.
  • Cascading design saves space while powering raspberry pi and expansion boards without affecting GPIO expansion.
  • Support up to 2A quick-charge technology, can rapidly charge full the battery.
  • Can be charged and supplied power to raspberry pi at the same time.
  • With 4 LED power indicator;
  • Provides an example code to beginner to demonstrate how to demonstrate battery capacity displays the current battery level in the raspberry pi current program, it can detect the current battery, voltage etc.
  -- Applicatoin scene 1: You can program to control automatic backup of data at low power and safe shutdown.
  -- Applicatoin scene 2: Remind users to charge at low battery levels. etc.)
  • Removable battery, user can choose a more larger capacity lithium battery pack (NOTE: voltage must be 3.7V).
  • With safety protection circuit to prevent overcharge and over discharge.
  • Retains the raspberry GPIO interface, you still can use all kinds of expansion board;
  • It is Mini UPS power supply; maximum 5V / 1.5A output, and maximum 5V / 2A input.

Note: The capacity of Lithium Battery is 2500mAh

But you can use the more big capacity battery. PS: Voltage must be 3.7V

Note:

The USP HAT will provide power to Raspberr pi via GPIO pin;

Don't connect the micro USB to rasberrry pi; please connect the micro USB to UPS HAT board; Connector specification is: PH 2.0 2-PIN connector

Two algorithm to obtain Battery capacity

Voltage estimation algorithm

Obtain the voltage, then estimate the current battery capacity by the following rules.

Charging
LED VBAT (Voltage of Battery)
1 to 2 3.622
2 to 3 3.832
3 to 4 4.043
FULL 4.182
Discharging
LED VBAT (Voltage of Battery)
4 to 3 3.74751
3 to 2 3.501
2 to 1 3.35
Off 2.756

Coulomb meter algorithm

Please refer to Raspi UPS HAT Board#how to USP HAT use via i2c

PS:

But because every battery has its own different features so UPS HAT need to take time to learn and adapt it.

Driver and Sample code

File:Rpi-ups-hat.zip

File:UserManual.pdf

How to use UPS HAT via driver

Please refer to How to use UPS HAT via driver

How to USP HAT use via i2c

In fact, you can use i2c to obtain the battery capacity and voltage. This python sample code is from a buyer friend, his name is Joachim, thank your very much.


  • File:Ups-hat-c.zip, this is C language source code from a friend, his name is Chris, thank your very much.

How to use it?

unzip File:Ups-hat-c.zip to get main.c

compile like this

gcc main.c -o ups-read

run with sudo

if no switches the it gives only integer percentage

if -v switch is used gives voltage

if -c gives full percentage

both switches can be used together

if you include it in sudoers config like this %wheel ALL = (root) NOPASSWD: /sbin/ups-read

then it can be run without password, ideal for displaying the percentage in a desktop toolbar

if you have any questions please do ask...

The LED and UPS Switch

IMG 0108.jpg

IMG 0110.jpg Charging LED.jpg

USB to Dual Micro USB Charging Cable

NOTE: the switch is disabled when you use USB to Dual Micro USB charging cable;

The raspberry pi will be power on automatically after the battery capacity is be exhausted when you use the one to two USB cable.

IMG 2344-how to work.jpg

FAQ

1.Is there a way to know if the battery is being charged or not?

Answer:

There is no direct way to know if the battery is being charged or not. BUT you can get many time volatage in a short time, then judge the volage value. For example: In 20 second, we get the 20 volatage value: 5.11v,

5.08V,

5.04V

5.01V

4.99v

... thus we can know the battery is charging. because the voltage value is raising...

Add your comment
All for Raspberry Pi, Arduino, Lattepanda, Orange Pi, Pine64 | by Geekworm welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


Anonymous user #14

8 days ago
Score 0++
Hello, when I measure the battery capacity I get values over 100%. For this measure I use the formula that appear in this document "File:How-to-use-via-i2c.pdf". I'm missing something?

Admin

7 days ago
Score 0++

Hello, Could you please show some more details? Please attached some photos about your data.

You can contact us by support@geekworm.com , please tell us your order number and product link of where you buy it, thanks!

Anonymous user #13

27 days ago
Score 0++
Voltage and percentage values returned by ups-read or python module are not changing. Am I missing something? I'd left my Raspberry Pi Zero W on battery last night and it was without juice by the morning, but I didn't receive any changes notifications or power down message on telegram (I'd basically replaced print commands with sendMessage methods of telepot Python module and it works like a charm). Do I need to turn your board off and on to refresh these values?

Admin

27 days ago
Score 0++

Hello sir, 1. First please check according to the photo above of the 2.0b portof your battery to see if the red cable and black cable is in wrong side. 2.Please Send us your order number and item URL to support@geekworm.com about the problem details. Best regards,

Cindy/Geekworm

Anonymous user #12

one month ago
Score 0++
Can two of these modules be used at the same time on a raspberry pi 3b+? Each module on top of the other?

Admin

one month ago
Score 0++

Hello, Sorry, the ups hat board is not support to stack to use, you can not use two of these modules at the same time . Best regards,

Geekworm

Anonymous user #11

one month ago
Score 0++
how long battery last?

Admin

one month ago
Score 0++

Hello sir, It depends on what battery capacity you use and the battery quality, we suggest that you use big capacity batteries,thank you. Best regards,

Cindy

Anonymous user #10

one month ago
Score 0++

I've written a nodejs module to communicate with the MAX17048 chip that monitors battery charge on this board.

See https://www....age/max17048

Admin

one month ago
Score 0++

Hello, What can we help you? Best regards,

Geekworm

Anonymous user #9

one month ago
Score 0++

Hi, I have some problems with undervoltage when my RPI 3+ is powered by the UPS HAT. This occurs both while the power supply (PSU) via micro-USB is connected or not. I have tried to power the PRI directly from the PSU, and no undervoltage here. The HAT must be the culprit. I'm running a barebone raspian (stretch). The problem becomes worse when I open programs or put load on the RPI in any other way. The yellow lightning icon in upper right corner is almost persistent then.

Can you please advise?

Admin

one month ago
Score 0++

Hello, Thanks for your message, we suggest that you can contact us by email: support@geekworm.com to confirm more details. 1.Please tell us what battery do you use for the UPS. 2.Please test the output voltage of ups hat by the GPIO PIN. 3.Please also tell us where do you order this board. Thank you! Best regards,

Cindy/Geekworm

Anonymous user #8

one month ago
Score 0++
Hi, can the battery percentages for led lights be modified? My boards lights are always all on unless charging. They do not behave as in your battery capacity table. Reading from ic2 works fine.

Admin

one month ago
Score 0++

Hello sir, Would you mind tell us where do you order this board? What battery do you use? Please check if the red cable and black cable of the battery 2.0 port in the right place, and also refer to the photo above. If any questions, please contact us by email: support@geekworm.com. Best regards,

Cindy/Geekworm

Anonymous user #6

2 months ago
Score 0++

Hi, I would like to power my Raspi Zero W with a Hifiberry mini hat (https://www....rds/miniamp/ using the geekworm UPS.

Does it work with a Raspi Zero W?

Admin

2 months ago
Score 0++

Hello sir, Sorry, the UPS HAT board only can power the Raspberry Pi zero W by weld the GPIO pin header on it, but if you add the Hifiberry mini hat on it, then it will not possible to add the UPS HAT board by GPIO PIN, hope to get your understanding! Best regards,

Cindy/Geekworm

Anonymous user #7

2 months ago
Score 0++
What if I first add the UPS HAT board on the Raspberry Pi Zero W and on top of the UPS hat the Hifiberry mini hat?

Admin

2 months ago
Score 0++

Hello sir, We do not test it, so we can not confirm anything, hope to get your understanding! Maybe you can do a test. Best regards,

Geekworm

Anonymous user #5

2 months ago
Score 0++
Hi, is there a way to know if the raspberry is powered by the battery, or external power ? Or, in other way, to know if the external power fails ?

Admin

2 months ago
Score 0++

Hello, We are so sorry, it seems that there is no way know if raspberry is powered by the battery, we will do a research about it, thank you! Best regards,

Geekworm

Anonymous user #4

3 months ago
Score 0++
Where can I reach the schematics of this card?

Admin

3 months ago
Score 0++

Hello, All the information is on this wiki page. Sorry, there is no schematics of this card provided, hope to get your understanding! Best regards,

Geekworm

Anonymous user #3

3 months ago
Score 0++
What modification is necessary to make the board be "always on". Another way to say, what modification will bypass the on/off switch?

Admin

3 months ago
Score 0++

Hello sir, If you want your Raspberry Pi to be able to start automatically when you have an external power supply or battery, rather than manually switch on power. You can use this USB to 2 Mirco USB Cable, USB connect charger, one Micro USB connect Raspberry Pi, another Micro USB connect UPS HAT.So as long as there is an external power supply or battery, Raspberry Pi can work properly. Unless the battery is low and the external power is lost. Here is the item link: https://www....5652221.html Best regards,

Geekworm

Anonymous user #2

3 months ago
Score 0++

I am trying to migrate my python2 app to python3 and got the following error message when running with python3. How can I fix this to work? import raspiupshat

ImportError: /home/pi/build/raspiupshat.so: undefined symbol: Py_InitModule4

Anonymous user #1

4 months ago
Score 0++
I installed the UPS HAT about 9 months ago and I see decreasing the voltage/percentage week by week? Would this be a problem of the battery or rather the hardware/algorithm? Thanks for your help...

Admin

3 months ago
Score 0++

Hello, Sir, we advise that you change the battery, you can use the 3.7v 18650 battery.

Geekworm