Αστέρια ΑνενεργάΑστέρια ΑνενεργάΑστέρια ΑνενεργάΑστέρια ΑνενεργάΑστέρια Ανενεργά
 

The UPS PIco is an advanced uninterruptible power supply for the Raspberry Pi® that adds a wealth of innovative power back-up functionality and development features to the innovative microcomputer!

New Update - The UPS PIco now includes the Gold Reset Pin as standard, adding various functions including hardware resets.

The standard UPS PIco is equipped with a 300mAh LiPO battery specially designed to enable safe shutdown during a power cut. Additionally, this can be easily upgraded to the extended 3000mAh version, which enables prolonged use of a Raspberry Pi for up to 8 hours without a power supply connected!

The UPS PIco features an embedded measurement system that continuously checks the powering voltage of the Raspberry Pi®. When the cable power on the Raspberry Pi® is absent, insufficient, or the device detects a power failure, the UPS Pico automatically switches to the unit’s battery source. The module then continues to check the voltage on the Pi and switches automatically back to the regular cable supply when power is once again available.

The UPS PIco is powered and the battery pack intelligently charged via the GPIO pins on the Raspberry Pi®, so no additional cabling or power supply is required.

The UPS PIco is designed to be 100% compliant with HATstandards for the Raspberry Pi® B+ and A+, and is mechanically compatible with the original Raspberry Pi® models A and B when an extension header is used. In addition to this, because the UPS Pico requires no external powering and fits within the footprint of the Raspberry Pi®, it is compatible with most cases.

The UPS PIco can also be equipped with an optional Infra-Red Receiver which is routed directly to GPIO18 via the PCB. This opens the door for remote operation of the Raspberry Pi®and UPS Pico!

Finally, the UPS Pico features an implemented Automatic Temperature Control PWM FAN controller, and can be equipped with a micro fan kit, which enables the use of the Raspberry Pi® in extreme conditions including very high temperature environments.

Features:

The list of features of the UPS PIco is as follows:

  • Raspberry Pi B+ HAT Compliant
  • Plug and Play
  • Smart Uninterruptible Power Supply (UPS)
  • Integrated LiPO Battery (8-10 Minutes of Power Back-Up)
  • Intelligent Automatic Charger
  • No Additional External Power Required
  • Additional 3000 mAh Battery for 8 Hours Run-Time (Not Included)
  • 5V 2A Power Backup (Peak Output 5V 3A)
  • Integrated Software Simulated Real Time Clock (RTC) with Battery Back-Up
  • File Safe Shutdown Functionality
  • Raspberry Pi B+ Activity Pin
  • PWM FAN control (Fan Not Included)
  • 2 User Defined LEDs
  • 2 User Defined Buttons
  • Integrated Buzzer for UPS and User Applications
  • Status Monitoring - Powering Voltage, UPS Battery Voltage and Temperature
  • I2C PICo Interface for Control and Monitoring
  • RS232 Raspberry Pi Interface for Control and Monitoring
  • XTEA Based Cryptography User Software Protection
  • 2 Level  Watch-dog Functionality with FSSD and Hardware Reset
  • Raspberry Pi B+ Hardware Reset Button via Spring Test Pin (Not Included)
  • Jumpers for Raspberry Pi B+  Pin Functionality Selection
  • Stackable Header  for Add-On Boards
  • Boot Loader for Live Firmware Update
  • Compatible with Intelligent IR Remote Power ON/OFF (PowerMyPi)
  • Integrated ESD-Protected 2 Channel A/D 10 Bit Converters 0-5.2V
  • Integrated ESD-Protected 1-Wire Interface
  • Labeled J8Raspberry Pi B+ GPIOPins for Easy Plug & Play
  • Infra Red Receiver Sensor Interface (IR Not Included)
  • Upgradable with PIco Add-on Boards
  • Fits Inside Most Existing Cases

 

UPS PIco

 

Uninterruptible Power Supply

2

with Peripherals and I C control Interface

for use with

Raspberry Pi® Pi2, B+, A+, B, and A

 

HAT Compliant

"Raspberry Pi" is a trademark of the Raspberry Pi® Foundation

Simple Setting Guide for the UPS PIco

© PiModules & ModMyPi Intelligent Modules for your Raspberry Pi®


Document Revisions

Version Date Modified Pages Modified Sections Comments
1.0 15/11/2015     First Public Document Release
         
         
         


What is in the BOX?

This package comes with everything you need to start using the UPS PIco right out of the box. It is assembled, tested and contains all required accessories. All Jumpers are connected in the start-up configuration. A little work is necessary in order to setup the complete RaspberryPi® and UPS PIco in a single full operating system, and this is instructed below.

Each Box contains the following parts:

  • 1 x The UPS PIco module assembled and tested
  • 1 x Dual layer wide temperature adhesive tape (used for battery mounting) stuck on the bottom side of UPS PIco battery
  • 1 x Set of installed jumpers
  • 1 x Separate packed LiPO battery
  • 1 x Gold Reset Pin
  • 1 x Buzzer
  • 1 x Sticky Pad
  • 1 x Header Strip

Please kindly notice that, due to shipping regulations, LiPO batteries are packed in the same box but are physically or electrically (depending to the Hardware Version) separated and not connected to the UPS PIco module. It must be connected by the user, and it is a part of the installation procedure.

 


Setting up Procedure

  • Ensure that all jumpers are in place on the UPS PIco4 green, and 1
  • If you would like to use the buzzer, you can solder it on now. Ensure that this is done with the correct polarity. Positive "+" "+"
 

  • If you would like to install the Gold Plated Reset Pin, please do so now following the instructions below. It is not mandatory to install the pin at this time, but it will enable full function of the UPS PIco

http://www.pimodules.com/ pdf/ pico/UPS Pico%20Reset Pin Mounting V1.0.pdf

  • If you would like to install the PIco fan kit, please do so now following the instructions below. It is not mandatory to install the fan kit at this time, but it will enable full function of the UPS PIco

http://www.pimodules.com/ pdf/ pico/PIco fan Kit Assembly Manual V1.0.pdf

• Once you have all parts correctly installed, we're ready to proceed with installation!

UPS PIco Hardware Installation

There are two different iterations of UPS PIco boards available at this time HV1.0 & HV1.1. Please follow the guide for your specific board below to ensure correct installation. To find out which board you have, check the version number under the text "HAT Compliant".

Please ensure that you have a good quality power supply available for powering the Raspberry Pi. 5V 2A is recommended. This will ensure that there is enough current to recharge the PiCo's battery.

The UPS PIco uses two GPIO pins to communicate with the Raspberry Pi:

  • GPIO_22 - Generates pulse trains that are recognised by the UPS PIco. This allows the PiCo to judge whether the Pi is running or not.
  • GPIO_27 - Operates the initiation of the File Safe Shutdown Process (FSSD)

When the UPS PIco hardware is installed correctly, and the UPS PIco recognises the pulse train, the UPS LED will twice once per second. This will only occur after a proper software set-up. If the UPS LED is not blinking, or blinking very fast, your system is not correctly set­up, and the power back-up will not work. The following LED blinking patterns are available from the UPS LED:

  • Very Fast (200ms) - Indicates Raspberry Pi is booting
  • Very Fast (200ms) - Indicates cold boot (when the UPSR button has been pressed)
  • Very Fast (200ms) - Indicates Raspberry Pi is shutting down
  • Normal (500ms) - Indicates the Raspberry Pi is powered and UPS has a stable pulse train
  • Slow (2000ms) - Indicates Raspberry Pi is being powered by the UPS battery
  • Off - UPS is in low power mode (LPR) and the Raspberry Pi is off

If you wish to remove the UPS PIco board from your Raspberry Pi, please ensure that the Raspberry Pi is NOT cable powered, and that the battery connector on the UPS has been removed from the white socket. In other words, ensure that the Raspberry Pi is completely disconnected from all power sources, and completely shut-off, before removing the UPS PIco. For the HV1.1, it is not needed to remove the battery cable, it is enough to press the UPSR button for about 1 second. This will electrically disconnect the battery from the system.


HV1.0 Installation

  • Ensure that the UPS PIco battery is NOT plugged into the UPS.
  • Glue the sticky pad onto the top of the Raspberry Pi's HDMI connector. This acts as a small spacer to keep the board in place.
  • Ensure that the Raspberry Pi is NOT powered e.g. the unit is completely off.
  • Plug the UPS PIco
  • Turn your Raspberry Pi on by installing the power cord to the micro USB connector
  • The UPS will react to the power:

o The red & blue LEDs will flash 10 times every second, and the buzzer will beep every second. If the fan kit is installed, this will spin during the cold start up procedure.

  • Now, plug the battery onto the white battery connector on the top of the UPS PIco.
  • That is hardware installation complete! Please note. Software installation must be completed before the UPS PIco will function.

HV1.1 Installation

  • Plug the UPS battery into the white battery socket connector on the UPS PIco
  • Pass the battery cable through the cable slot on the UPS PiCo board so that the battery sits on top of the UPS PIco.
  • Press the UPSR button on the UPS PIco for about 1
  • Ensure that the Raspberry Pi is NOT powered e.g. the unit is completely off.
  • Plug the UPS PIco
  • Turn your Raspberry Pi on by installing the power cord to the micro USB connector
  • The UPS PIco will react to the power:

o The red & blue LEDs will flash 10 times every second, and the buzzer will beep every second. If the fan kit is installed, this will spin during the cold start up procedure.

  • That is hardware installation complete! Please note. Software installation must be completed before the UPS PIco will function.


UPS PIco Software Installation

The UPS PiCo will not function unless the following software is installed, and the Pi correctly set-up for UPS use.

  • Ensure that you have the latest version of your chosen operating system. The UPS PIco is designed for use on Raspian.
  • Ensure that you have a stable and valid internet connection.
  • From terminal, enter the Raspberry Pi configuration menu using the following command:

sudo raspi-config

  • Scroll to Advanced Options
 

• Then to A7 I2c interface and set this to enabled, and set the kernel to load by default. Then scroll to A8 Serial, and ensure this is enabled (it is usually enable by default anyway).

 


  • If the system requests a reboot, please do so, then continue set-up.
  • Next, ensure that Python is installed and updated, by using the following command

sudo apt-get install python-rpi.gpio

• Then, ensure that i2c is installed and updated, by using the following command sudo apt-get install i2c-tools

 

  • Now edit the /etc/modules file sudo nano /etc/modules
  • Add the following lines at the end: i2c-bcm2708

i2c-dev

 


sudo i2cdetect -y 1


  • If this doesn't work, or throws an error. Please reboot your Raspberry Pi. This should re-initialise i2c.
  • We now need to download the PiCo python script, available here http://www.pimodules.com/ zip/picofssd.py
  • You can download it to your home directory using the following command: wget http://www.pimodules.com/_zip/picofssd.py
  • Now execute the script and check for errors: sudo python /home/pi/picofssd.py
    • The UPS LED should start flashing on the UPS, twice per second to indicate that the UPS is working correctly. To exit the script, hit CTRL+C.
  • Ensure that you save the file before you exit
  • You can check that i2c is running by using the following command
    • If it's working correctly, we can set the script to run at boot.
 


• Edit the file /etc/rc.local sudo nano /etc/rc.local

• Add the following lines, before "exit 0" sudo python /home/pi/picofssd.py &

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device ( sleep 4; hwclock -s ) &

• You can view a reference of the edited file here http://www.pimodules.com/ zip/rc.local

 

  • Ensure that you save the file before you exit
  • Now restart your Raspberry Pi to ensure all software changes are made.
  • When the system restarts, you should see the following UPS LED blinking process:

o During boot - LED blinks very fast (200ms)

o After boot - LED blinks normal (500ms) which indicates that the Raspberry

Pi is recognised and the UPS is working correctly. o The CHG LED might also light continuously, to indicate that the battery is charging. If this LED is off, it means that the battery is fully charged.

  • To test the device - Remove the power supply from the Raspberry Pi (just unplug it). The Pi should stay active, and the UPS LED should flash slower at once per second.
  • If your reconnect the power, the UPS should automatically revert back to standby mode.
  • If you wait 30 seconds the Pi will shut down. Once complete, the UPS LED will flash (twice per second) for 2 - 3 & UPS will turn off.
  • When power is restored, e.g. by plugging the power supply back in, the Raspberry Pi should boot again.

UPS PIco Updating Firmware

The UPS PiCo features an embedded serial bootloader which allows users to manually update the unit's firmware. The firmware can be uploaded using a dedicated python script, called picofu.py.

Bootloader is small piece of firmware stored permanently in the micro controller flash memory of the UPS Pico, located in the special protected area. It can not be erased by user without dedicated hardware tools. In order to upload new firmware, an invokation of the bootloader routine is needed. It can be done manually or automatically if I2C-tools is running and installed.

The bootloader functionality ensures that the UPS PIco is up-to-date, and allows users to report various changes that can be implemenetd on the user's side. It is extremly useful functionality, and ensures that the product has longevity.

It is mandatory to have previously installed python and I2C-tools on the Raspberry Pi. You will install these during initial PiCo setup outlined previously in this document. Please install smbus support for python to enable additional functionality. Simply run the following command (with an internet connection):

sudo apt-get install python-smbus

As the bootloader uses the Raspberry Pi Serial Port (RS232), it is mandatory to have it free on the Raspberry Pi (without any hardware occupying it). It is also important that you ensure that there is no software using it. as well If minicom has been used, please restart the Raspberry Pi, as minicom keeps the RS232 interface occupied.

The first task which is done by the UPS PIco after reset is to check if bootloader has been requested. If not, then the rest of the firmware runs. Otherwise, the UPS PIco lights the big RED LED and waits for the firmware upload from the Raspbeerry Pi.

First, please ensure that you have downloaded the UPS PiCo firmware update python script by using the following command.

wgethttps://app.box.com/s/4qc9ju2s84r7epxt9p6f77eoi8f4czfo

Next, ensure that you have downloaded the UPS PiCo firmware that you want to use. wget http://www.pimodules.com/_zip/UPS_PIco_V1.0_10_11_2015_code_0x53.hex

There are two ways to invoke the bootloader mode and to upload the new firmware:

Automatic Initiation

The bootloader is invoked by running the following command line

sudo i2cset -y 1 0x6b 0x00 0xff && sudo python picofu.py -v -f UPS_PIco.hex

TheUPS_PIco.hexshould replaced with the name of the last firmware update, or the firmware you wish to use - Please remember that linux is case sensitive. Using the firmware outlined in this document, that we just downloaded, you would run the following command:

sudo i2cset -y 1 0x6b 0x00 0xff && sudo python picofu.py -v -f UPS_PIco_V1.0_10_11_2015_code_0x53.hex

When firmware starts the upload procedure, the BIG BLUE LED will blink very fast, and the BIG RED LED with turn off.

 

Once complete the system with output ALL Done :) Ready to go. . .

We would recommend that you now shutdown your Pi and UPS PiCo completely in order to ensure that all changes are integrated. Once you've rebooted your system, you can check the UPS PiCo firmware version using the following command:

sudo i2cget -y 1 0x6b 0x00

In this case the system should output 0x53, signifying that the firmware has updated correctly.


Manual Initiation

The UPS PiCo has the ability to invoke the bootloader manually, via the on board buttons. You can do this instead of using the automatic initiation outlined above.

The following procedure needs to be followed:

  • Press and hold theUPSR button
  • Continue to hold theUPSR button, and press and hold theKEYA
  • Release theUPSR button, but keep holding theKEYA button
  • Release theKEYA button
  • The big RED LED will light, and system wil be able to receive the firmware update
 

 

• Then write the following command on the Raspbeery Pi command line sudo python picofu.py -v -f UPS_PIco.hex

TheUPS_PIco.hexshould replaced with the name of the last firmware update, or the firmware you wish to use - Please remember that linux is case sensitive. Using the firmware outlined in this document, that we just downloaded, you would run the following command:

sudo python picofu.py -v -f UPS_PIco_V1.0_10_11_2015_code_0x53.hex

When firmware starts the upload procedure, the BIG BLUE LED will blink very fast, and the BIG RED LED with turn off.

Once complete the system with output ALL Done :) Ready to go. . .

We would recommend that you now shutdown your Pi and UPS PiCo completely in order to ensure that all changes are integrated. Once you've rebooted your system, you can check the UPS PiCo firmware version using the following command:

sudo i2cget -y 1 0x6b 0x00

In this case the system should output 0x53, signifying that the firmware has updated correctly.

Further Information

The full user guide is available here, this details further functions of the UPS PiCo:

https://app.box.com/s/etpghc3yx2ojlluj6fczu0m0hwrnqw4m

Σχόλια   

0 #1 Web Page 03-08-2017 17:00
Great post. I was checking constantly this blog and I am impressed!
Very useful information specifically the final part :) I deal with such information a lot.
I used to be looking for this particular info for a very
long time. Thanks and good luck.
Παράθεση

Προσθήκη νέου σχολίου


Κωδικός ασφαλείας
Ανανέωση