UPS-Hat-for-Raspberry-Pi

From SB-Components Wiki

UPS HAT for Raspberry Pi

UPS Hat is a 5v power supply, It fit at the top of the raspberry pi, and it gives power backup, while raspberry pi's USB power is cut off. It has various protections like short circuit protection, reverse battery protection and indicator, overcharge/discharge protection, and over current protection. It has a 5V USB output, convenient for powering other boards.

Features

  • 5V Operating Voltage
  • Charge and Power Output
  • I2C Bus Communication
  • 0.91" OLED Display
  • Battery Warning Indicator
  • Raspberry Pi 40 Pins GPIO Headers

Specifications

  • OUTPUT VOLTAGE - 5V
  • CHARGER - 8.4V 2A
  • CONTROL BUS - I2C
  • BATTERY SUPPORTED - 18650 LI BATTERY (NOT INCLUDED)
  • DIMENSIONS - 94.5mm X 56mm
  • MOUNTING HOLE SIZE - 3mm
UPS HAT for Raspberry Pi
Buy it From : Click Here

Installation

  • First of all, you need to enable I2C in raspberry pi, for this you need to go
sudo raspi-config

then go to "interface options->I2C->yes->press enter"

  • This folder contains two python files and Images, Fonts folder:-

INA219_UPS.py -> This file you need to run, displays the load voltage, current, power, and battery percentage on the terminal as well as in OLED

oled_091.py ->This is the OLED display library

Images folder contains images that we display in the OLED display

Fonts folder contain various fonts, which we use in the OLED display

Steps To Use UPS HAT (Follow These Steps)

  • Fix UPS HAT at the top of the Raspberry Pi

UPS3.jpg

  • Plug the Power cable to raspberry pi

UPS4.jpg

  • Now Switch on UPS HAT using the slider switch

UPS5.jpg UPS6.jpg

Run a Program On Your Raspberry Pi At Startup (*optional)

Go to the below directory

sudo nano /etc/rc.local
sudo python3 /home/pi/Desktop/UPS_Hat/INA219_UPS.py &


UPS7.jpg

Press Control+X then press Y to save

Resources

GitHub