Open main menu

Changes

Raspi UPS HAT Board

5,582 bytes added, 09:35, 14 October 2019
{{GD Template Impl}}
[[File:IMG-6084.jpg|right|thumb|Geekworm UPS HAT V1.1 Front]]
[[File:IMG-6085.jpg|right|thumb|Geekworm UPS HAT V1.1 Back]]
[[File:IMG-6091.jpg|right|thumb|Geekworm UPS HAT V1.1 + 2600mAh Battery]]
[[File:IMG-0178-AE.jpg|right|thumb|Raspberry Pi UPS HAT Board V1.0 + 2500mAh Battery]]
[[File:IMG_0045.jpg|right|thumb|Raspberry Pi UPS HAT Board V1.0 + 2500mAh Battery]]
[[File:IMG_0048.jpg|right|thumb|Raspberry Pi UPS HAT Board V1.0]]
[[File:IMG_0046.jpg|right|thumb|Raspberry Pi UPS HAT Board V1.0 + 2500mAh Battery]]
== Instruction ==
NOTE: we released the last [[UPS2 | UPS HAT 2]] on Sep. 10, 2019.

<youtube>https://youtu.be/n2amD_gU4A4</youtube>
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.

<font color="#FF0000">'''Note: '''</font>
* <font color="#FF0000">The last version is V1.1.</font> We use another power management chip, but it has exactly the same features witch V1.0. The only difference is that you need to press the button for a little longer when you shut down.
* The capacity of Lithium Battery is 2600mAh, But you can use the more big capacity battery. PS: Voltage must be 3.7V
* The USP HAT will provide power to Raspberr pi via GPIO pin;
* <font color="#FF0000">Don't connect</font> the micro USB to rasberrry pi; please connect the micro USB to UPS HAT board;
* Connector specification is: <font color="#FF0000">PH 2.0 2-PIN connector</font>

== Two algorithm to obtain Battery capacity ==
=== Voltage estimation algorithm ===
Obtain the voltage, then estimate the current battery capacity by the following rules.
{| class="wikitable" border="1"
|-
| Charging
|
|-
| LED
| VBAT (Voltage of Battery)
|-
| 1 to 2
| 3.622
|-
| 2 to 3
| 3.832
|-
| 3 to 4
| 4.043
|-
| FULL
| 4.182
|}

* Sample code [[File:Battery-charge.zip]]

{| class="wikitable" border="1"
|-
| Discharging
|
|-
| LED
| VBAT (Voltage of Battery)
|-
| 4 to 3
| 3.74751
|-
| 3 to 2
| 3.501
|-
| 2 to 1
| 3.35
|-
| Off
| 2.756
|}

* Sample coce[[File:Battery-discharge.zip]]

===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-20190621.zip]]
[[File:Rpi-ups-hat.zip]] this is old version.

[[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:How-to-use-via-i2c.pdf]]
* [[File:UPS-HAT-sample-code-via-i2c-by-Joachim.zip]]
<hr>
* [[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 ==

[[File:IMG 0108.jpg|400px]]

[[File:IMG_0110.jpg|400px]] [[File:Charging LED.jpg|400px]]

[[Category:Product Manual]]
[[Category:Raspberry pi]]

== 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.

<youtube>https://youtu.be/-BaasWx8QbE</youtube>
[[File:IMG 2344-how to work.jpg|400px]]

== 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...

2. What pins of the Raspi header does the UPS hat occupy?

Answer: Only 5V, GND, I2C (SDA, SCL) are occupied.

<comments />
[[Category:Product Manual]]
[[Category:Raspberry pi]]