Getting started

As one of the smallest systems around there are so many amazing things you could do with the Raspberry Pi if it was self-powered and portable. Introducing PiJuice! A fully uninterruptable power supply that will always keep your Raspberry Pi powered.

This guide will show you how to assemble the PiJuice HAT, set it up in its cases and discuss some of the most common issues and questions.

Kit contents

Inside the box you should have received the following items:

  • 1 PiJuice HAT board
  • 8 Plastic bolts
  • 4 Plastic spacers
  • 3 Plastic surround battery holder
  • 1 Battery 1820 mAh
  • 1 Pogo pin
  • 3 Stickers
  • 1 Manual

Board Assembly

Step 1 – Unpack your Raspberry Pi.

Step 2 – As the PiJuice already comes with the spacers and the plastic surround for the battery you can simply plug it on the Raspberry Pi.

If you need to install the pogo pin connector please follow this section first.

There is also a section to reinstall the spacers and the surround if you’ll ever need to put them back together as in the case of the pogo pin installation.

Place the PiJuice on top of the Raspberry Pi by gently pushing the female header onto the Raspberry Pi male header. As you do that check that the DIP switch is configured as in the picture provided. You can remove the yellow film on the DIP switch which is only used for manufacturing purposes.

The bolts should be screwed in with a PZ1 screwdriver. In some cases the bolts could be slightly hard to screw in the spacers. Use a metal bolt to help loosing the rim in the spacer so that the plastic bolt will oppose less resistance during assembly.
If not now, remember that you will also need to remove the plastic pull tab that prevents the battery from making contact to its connector.

Step 3 – Install the 4 plastic bolts provided.

Step 4 – If you have acquired the PiJuice cases you can skip to one of the next Sections

Otherwise you can power up your Raspberry Pi by either connecting a micro USB PSU to the Raspberry Pi or by connecting it to the PiJuice and then pressing SW1.

When using the Raspberry Pi micro USB the system will power up immediately whereas when connecting power to the PiJuice you will need to press the SW1 button.

You can now move to the software installation section.

Short Case Assembly


The PiJuice Short Case is the prefect enclosure for the PiJuice HAT and the Raspberry Pi. It has been designed so that it can still allow access to the various buttons and LEDs. Via a series of knockouts it also allows for several types of cables to provide additional connectivity. The sliding top provides easy access to the GPIO header of the Raspberry Pi.

Step 1 – Remove the top off the case.

Step 2 – Within the case you will find a plastic bag containing 4 rubber feet.

Step 3 – Remove the side panels.

Step 4 – Place the side panel with the Ethernet and USB openings on the Raspberry Pi.
Step 5a – If you are using a Raspberry Pi 2B 3B/B+ then you will need to push-out the cutout part of the case for the HDMI connector. If you take a look inside the case you will see notch for the Pi 4B HDMI connectors that can be pushed outwards.

Note: You can still use the Raspberry Pi 4B once the cut out had been removed

Step 5b – Slide the Raspberry Pi with the side panel in the case. The side panel will have to slide in the guides of the case. As you push in the Raspberry Pi make sure you gently open the two sides of the case to allow for the various connectors to get into place.

Step 6 – Slide the other panel in and make sure that the PCBs are slot in the groves of the case.

Step 7 – Finally slide the top back in place.

At this point the PiJuice is ready to be used.

You can now move to the software installation section.

Tall Case Assembly

The PiJuice Tall Case is the prefect enclosure for the PiJuice HAT and the Raspberry Pi. It has been designed so that it can still allow access to the various buttons and LEDs. Via a series of knockouts it also allows for several types of cables to provide additional connectivity. The sliding top provides easy access to the GPIO header of the Raspberry Pi or to an additional card stacked on top of PiJuice.

The PiJuice Tall case can for example easily accommodate the Pi PoE.

Step 1 – Remove the top off the case.
Step 2 – Within the case you will find a plastic bag containing 4 rubber feet.


Step 3 – Remove the side panels.
Step 4 – Place the side panel with the Ethernet and USB openings on the Raspberry Pi.Step 5a – If you are using a Raspberry Pi 2B 3B/B+ then you will need to push-out the cutout part of the case for the HDMI connector. If you take a look inside the case you will see notch for the Pi 4B HDMI connectors that can be pushed outwards.

Note: You can still use the Raspberry Pi 4B once the cut out had been removed

Step 5b – Slide the Raspberry Pi with the side panel in the case. The side panel will have to slide in the guides of the case. As you push in the Raspberry Pi make sure you gently open the two sides of the case to allow for the various connectors to get into place.

Step 6 – Slide the other panel in and make sure that the PCBs are slot in the groves of the case.

Step 7 – Finally slide the top back in place.

At this point the PiJuice is ready to be used.

You can now move to the software installation section.

Software installation

PiJuice works straight out of the box however to get the most out of it you will need to install the software packages we created.

Open a terminal window and simply type:

sudo apt-get install pijuice-gui

After a restart a new icon “PiJuice Configuration” will appear under Menu>Preferences. You will also notice a new icon in the system tray.

For additional information please refer to our Github repository.

Reassemble the plastic surround

Step 1 – To remove the plastic bolts holding the plastic surround in place use a PZ1 screwdriver bit.

You will notice that each of the plastic surround bits has two studs to keep them in place on the PCB.

Note that the plastic bolts used for the plastic surrounds are taller than the others.

Step 2 – To reinstall them reposition each on the PCB as shown in the picture then use the 4 long plastic bolts and the 4 plastic spacers to fix them to the PCB.

Install the pogo pin connector

Note: As of Firmware v1.3_2019_01_15 pogo/spring pin is no longer required to wakeup the Raspberry Pi when powering from the Pi’s micro USB.

Step 1 – Depending on which Raspberry Pi model you wish to use with the PiJuice you will need to solder the pogo pin in one of the following places.

  • TP1 – Pi 3B
  • TP2 – Pi Zero
  • TP3 – Pi B+ and 2B

Step 2 – Place the pogo pin in either of those pads from underneath as shown in the picture. By keeping the pogo pin in place perfectly perpendicular on the PCB proceed to solder it from the top side of the board. Use non lead free solder if possible as that’s generally easier to work with. If you have a temperature adjustable controlled solder station you should be setting it to about 300° Celsius. Cut the top part of the pogo pin as close as possible to the PCB.

Step 3 – When connecting the PiJuice back on the Raspberry Pi make sure the the pogo pin sits in the hole of the RUN pad and that the plastic surround can be reinstalled without leaving a gap on the PCB. Refer to reinstall the spacers and the surround to reassemble the board.

FAQ

Where can I find additional information

If you need to know more about the various aspects of PiJuice you can check our Github repository:

How long will PiJuice last?

We’ve created a neat little tool in order to help provide you with a good estimate of how long your PiJuice/Raspberry Pi will last. It entirely depends on the task you’re running on PiJuice. Use this tool to find out more: PiJuice Battery Discharge Time Calculator.

Knockouts and openings

Each case is provided with a number of knockouts. You can pop them out from the inward side by pushing with your fingers or with a hard tool.

The round openings are used for the LEDs and to get access to the onboard buttons of the PiJuice. You can activate the buttons by using a small screw driver or a blunt toothpick

Install Pi PoE

To install Pi PoE stacked up on PiJuice you will need to use the two knockouts provided on the side panel of the PiJuice Tall case.

Step 1 – Push out the two plastic squares of the side panel as shown in the picture. Use something like a chopstick to remove the think plastic left behind and clean up the openings.

Step 2 – Place the Pi PoE on top of the PiJuice pass through header. Link the Pi PoE to the Raspberry Pi with the small Ethernet cable provided with Pi PoE and slide the top back on the case.

You might need to use additional spacers to properly old the Pi PoE in place.

Which pins are used by PiJuice HAT

A detailed pinout for the PiJuice HAT can be seen in the picture below. Please refer to our Github repository for additional information.

What is the Pogo pin used for?

The pogo pin supplied with your PiJuice is used to enable the wakeup functions on the Raspberry Pi as well as using SW1, when connecting primary power to the Raspberry Pi directly and NOT the PiJuice HAT. This method is usually more efficeint in UPS applications. The pogo pin is only compatible with the following Raspberry Pi models: Pi Zero, Pi Zero W, Pi B+, Pi 2B and Pi 3. Due to the populated pins on the new Raspberry Pi 3B+ the pogo pin cannot be installed.

How do I set the PiJuice RTC?

The PiJuice MCU has a built-in RTC, which is then kept alive by the PiJuice battery. This RTC is primarily used to wakeup the Raspberry Pi at a specific time/date set by you in the PiJuice configuration settings. By default when the PiJuice has an ID EEPROM address of 0x50 the RTC driver is loaded when the Raspberry Pi boots and this can be confirmed by running ‘i2cdetect -y 1’ from the command line where you will see ‘UU’ at address 68.

pi@rpi-stretch-full:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- 14 -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
pi@rpi-stretch-full:~ $

If your ID EEPROM address is set to 0x52 (Which you will need to change if stacking another HAT) then you will need to manually load the driver in the /boot/config.txt by adding the following line:

dtoverlay=i2c-rtc,ds1339

Setting the System Clock & RTC

There are two ways in which you can set your system time and date providing that you have set the timezone in Raspbian; automatically using timesync or manually in the command line. If you have an internet connection then the time will automatically be synched after boot and this will also sync with the RTC time.

Manually you can set the time with the date command from the command line:

sudo date -s '2018-10-29 12:30:46'

After setting the date and time you must then copy the system time to the RTC with the command:

sudo hwclock -w

You can check this with:

sudo hwclock -r

Sync RTC time at boot

When the Raspberry Pi shutsdown and then reboots you must copy the RTC time back to the system clock at boot and you can do this in /etc/rc.local with sudo hwclock -s.

Note: This assumes that your PiJuice has sufficient power from the battery to keep the simulated RTC running in the PiJuce microcontroller while the Pi is shut down.

Can I install PiJuice software on Windows IoT?

Yes you can! You can find all the GitHub code here – https://github.com/tresoft/PiJuice-Uwp

First published at 12:19pm on October 3, 2017
Last updated at 12:48pm on September 25, 2020