Linux Format

PiJuice HAT

Les Pounder takes us out into the garden with a portable power solution for the Raspberry Pi. Now he can find out how his garden grows…

-

Now we can claim our Raspberry Pi is wind-powered with child-like sniggering.

The Raspberry Pi has powered a generation of makers, but what powers a Pi? Typically, it’s the power supply plugged into the mains, with only a small number of projects being powered from other means. In 2015 English company Pi Supply started the PiJuice crowdfundi­ng campaign, and in April this year PiJuice was fully delivered to backers and placed for sale on the company’s website.

PiJuice is an alternativ­e power system for all models of Raspberry Pi, including the Pi 3 B+. PiJuice has been designed as a HAT compliant board and fits on top of all of the GPIO pins with a pass through that enables access to the pins for further add-on boards and projects.

One slight issue we found was that access to the camera (CSI) and display (DSI) ports was quite tricky and required a little “origami” to route the ribbon cable. PiJuice has a large space in the centre of the board and this is for an 1,820mAh LiOn battery, which is charged via a micro USB port on the PiJuice. Both Lithium Ion (LiOn) and Lithium Polymer (LiPo) batteries can be used with PiJuice. Batteries are hot-swappable as long as there’s a power supply for the Raspberry Pi and by connecting the power via the PiJuice it’ll also power the Raspberry Pi. Speaking of power, PiJuice is compatible with input voltages between 4.2V and 10V, so small solar panels or wind turbines can be used as “off the grid” power sources. Separating basic and advanced options Software for PiJuice comes in the form of a Python 2 library and graphical user interface, both of which have been added to the Raspbian repositori­es meaning they are only an apt install away. The GUI is easy to use, keeping the key informatio­n in plain sight, but hiding a few options for the more advanced users.

One of the most useful sections is how we can trigger PiJuice to react given a system event. For example, we can force the system to shut down gracefully, or call a user script to send a message to alert us to a dying machine. In another tab in the GUI we can find a section to enable user scripts to be launched at the push of one of the three configurab­le buttons. Scripts can be in any language as long as they’re executable.

In the Configure HAT section of the GUI we can tinker with the I2C settings used by PiJuice to communicat­e with the Pi, alter the parameters of the buttons, change LED colours for certain events, and update the board firmware for the Cortex M0 used as the brains of the board.

What can we use PiJuice for? Well, initially we think of off-grid Raspberry Pi projects. Wildlife cameras, data collection using sensors, and weather stations. But we can use PiJuice as a UPS for our most critical Pi applicatio­ns, and this is one of its greatest strengths. Intelligen­t power management for the Raspberry Pi is nothing new, but with PiJuice we have a well-rounded product that’s cast off the gremlins it faced over three years in crowdfundi­ng purgatory.

So is PiJuice any good? The answer is yes: it works remarkably well and it’s easy to use. For basic use all the user needs to do is attach the board, power up and install the software – the board will do the rest. But for the advanced users, there are many layers of configurat­ion that can be explored to meet their needs. Despite the high price, the PiJuice comes thoroughly recommende­d.

 ??  ?? Running PiJuice with your favourite add-on board is possible, thanks to the GPIO pass through and HAT-compatible screw mounts.
Running PiJuice with your favourite add-on board is possible, thanks to the GPIO pass through and HAT-compatible screw mounts.
 ??  ?? PiJuice is a solidly made board that fits neatly on top of 40-pin models of Raspberry Pi.
PiJuice is a solidly made board that fits neatly on top of 40-pin models of Raspberry Pi.

Newspapers in English

Newspapers from Australia