UPS PIco on a Pi B+ running OSMC

The UPS PIco is a great piece of kit from the folks over at pimodules. It’s a simple to install UPS that can give you RPi some much needed resilience. In my case, it was for a RPi being used as a media centre in a location with dodgy power. Whilst it had scraped through a year of use, I was getting increasingly nervous about the power situation and the potential for SD corruption. The UPS PIco seemed like the perfect solution.

By “simple” I really mean it. If I can solder the one pin into place in ~5 minutes, any cretin can do it!

Officially the UPS PIco only supports Raspbian, not OSMC. Luckily OSMC is also a Debian derivative and this means getting the UPS PIco going is fairly straight-forward and you can follow all the steps in the official documentation bar two:

Making do without raspi_config

The i2c interface on your RPi is probably disabled. With the UPS PIco installed, you can test this by running: sudo i2cdetect -y 1

If you get this Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory then it’s not enabled.

Enabling it without raspi_config is a simple case of editing /boot/config.txt.

  1. sudo vi /boot/config.txt
  2. Add (or just uncomment) the line: device_tree_param=i2c_arm=on
  3. Save (:wq)
  4. sudo reboot

You can check further documentation on this in /boot/overlays/README.

Adding  python and dependencies

This is a little more complicated, but not too bad

  1. First, let’s get up to date: sudo apt-get update && sudo apt-get dist-upgrade
  2. Now install the base: sudo apt-get install build-essential 
  3. And set a couple of things:
    1. export ARCH=arm
    2. export CROSS_COMPILE=/usr/bin/
  4. Now for some meat: sudo apt-get install -y python-dev python-pip python-smbus
  5. sudo pip install rpi.gpio

And that’s it. Don’t forget to update /etc/modules, as per the docs, and to reboot before trying any of the PIco scripts.

External links:

Parts used:

  • Raspberry Pi B+ (v2 and v3 are also supported)
  • UPS PIco TopEnd LP 450 with optional fan (various versions are also available)
  • PIco Case B+ (as not even the more slimeline “TopEnd” will fit in a standard Pi case without some grinding on the case – despite what the site says)
  • The “TopEnd” and fan were ordered pre-soldered, all the remained was to solder in the reset pin that allows the UPS PIco to turn the Pi on from cold.

Note: The site states that the reset pin cannot be used with the Pi 3, unless you plan to separate the PCBs regularly, you can probably get away with soldering some wire between the relevant points.

Leave a Reply