The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

Review


raspberrypi.org/magpi The Official Raspberry Pi Projects Book 199


PIJUICE


pijuice.com


£40 / $53


Last word


As well as an all-in-one portable power solution
that’s far neater than the alternatives, the PiJuice
offers advanced power management features
with an impressive number of settings and custom
options for maximum versatility. Three user-
definable push buttons and a built-in real-time
clock are a major bonus.

What’s my level?
One thing we soon noticed was a
disparity in the displayed battery
level when charging – via the GPIO
pins of the mains-connected Pi
or the PiJuice’s own micro USB
socket. As soon as we unplugged
the power, the status level dropped
rapidly by around 20%. According
to PiSupply, this is a known quirk
of the protection circuitry in Li-ion
batteries and the specific ‘fuel
gauge’ IC used by the PiJuice, and
the actual battery discharge rate is
fairly linear. So, a bit confusing but
nothing to worry about. In addition,
an RGB status LED gives a rough


guide to the battery level, flashing
blue during charging.
So, how long does the battery
last? We performed a simple uptime
test with a Python script that
periodically logged how long the Pi
had been running. On an idling Pi 3,
it averaged around four hours. A
little shorter than we’d hoped for,
but on a Pi Zero or A+ you should be
able to achieve near double that. To
extend battery life, you could also
make use of the wake-up alarm


SOLAR POWER


PiSupply also sells a Solar kit
(£90/$117) which comprises
a PiJuice and a specially made
6 W solar panel to charge it
out in the field. The latter
folds out of a soft case, with a
pull-out flap that can be used
to hold its twin mini panels
at an angle. You’ll probably
need bright direct sunlight to
provide a good level of current
(about 1 amp at most) – ours
was weak when we tried it out
on a grey autumn day – but
it’s a nice option. We were
also supplied with a 40 W
version (with six mini panels)
which should provide a greater
current output and, with twin
USB ports and a barrel jack,
could be used to charge several
devices at once.

feature in the GUI config options,
to turn a shutdown Pi back on at a
specific time or even charge level.
Another interesting option is
the watchdog timer that monitors
a software ‘heartbeat’ and, if it’s

not heard for a certain period,
automatically resets the Pi – ideal
for when you can’t physically reach
it to do a hard reset following a
crash. There’s also an array of
system event scenarios for which
you can trigger events, including
custom functions – just add the
path to your own script under
User Scripts.
Further options include changing
the battery profile (to one of several
presets or a custom configuration),

updating the firmware, and
choosing the functions of the
board’s two LEDs. Lastly, you can
set the functions for the three
tiny push buttons on the side
of the PiJuice – individually for
press/release, single press, double
press, and two long-presses (with
customisable time parameters).
By default, the SW1 button can be
long-pressed for ten seconds to
safely shut down the Pi, and then
pressed to restart it – another
greatly appreciated feature.

A much neater solution than


most portable power methods



  • no messy wiring here

Free download pdf