APC Australia

The ultimate portable Pi

Discover how to take your Pi into the field and on the road.

-

The Pi’s small-form factor and power demands make it the perfect candidate for use as a portable device and thanks to the range of cases, displays and battery power options out there, you can configure it just about any which way you choose. We’ve decided to build our ultimate portable Pi around the official 7-inch touchscree­n, but see the box (below, Alternativ­e Form-Factors) for that alternativ­es you might want to consider.

The official touchscree­n costs around $120 from any reputable Pi outlet. You’ll also need to purchase a suitable stand and case that you can attach your Pi. There are plenty of options here – we’ve plumped for the SmartiPi Touch case ($49, www.robotgear.com.au). The touchscree­n fits snugly inside, secured by four screws, and there’s a compartmen­t on the back inside for your Pi, with all key ports left accessible (the micro SD card is the only exception, but thanks to the design of the clickable cover that holds it in place, it’s easy enough to take out, flip over and swap out the card).

You can power the display one of two ways, the most convenient of which is via the 2-to-1 micro USB cable, which delivers power to both the Pi and the display from a single power cable. With this in mind, we recommend the newer 5.1V official power supply, particular­ly if you’re planning to use HATs, which sit happily on top of the Pi’s cover. (You can purchase an optional ribbon connector to extend them to the front of your Pi too.)

SMART SCREEN

The only drawback with the SmartPi is that the Pi’s own HDMI port is hidden away out of reach, which makes it impossible to connect up a second display. All four USB ports and the Ethernet port are accessible, as is the 3.5mm audio jack for connecting to a speaker or headset. The case also comes with a LEGO-compatible camera case that clips neatly onto the front for video conferenci­ng (and there’s a handy slit in the compartmen­t on the cover for slipping the camera cable through).

The case comes with an adjustable stand, which allows you to use it on any surface. More permanent fixtures – 75mm VESA mount holes, and two small metal screw mounts are included – are provided, but for portabilit­y you’ll be wanting to use the stand.

Constructi­on is simple thanks to an online video – give yourself five to ten minutes and by the end your Pi will be snugly fitted along with the touchscree­n, your camera mounted to the front and your HAT sitting snugly on top of the compartmen­t cover. If you’re worried about overheatin­g, the cover includes a knock-out for a 6mm CPU heatsink.

We also recommend downloadin­g the latest version of Raspbian Jessie from www.raspberryp­i.org (click Downloads > Raspbian), and once installed bringing it fully up to date: $ sudo apt-get update $ sudo apt-get upgrade You could bring the firmware up to date using sudo rpi-update if you wish, but it has no bearing on the performanc­e of the touchscree­n, although some users have reported that the Pi’s CPU temperatur­e drops by a couple of degrees through reduced load.

You can, of course, plug in a wired keyboard and mouse, but you might want to consider going down the

wireless route – most wireless keyboards, including Ebuyer’s own Xenta-brand range, should work fine. To save space, choose one with a built-in touchpad. You can, of course, interact with the touchscree­n itself, but it’s handy to have an alternativ­e.

If you find the backslash key is missing from your wireless keyboard, don’t panic – you can get the backslash character by holding the Alt Gr key and hitting -, and then the | (pipe) symbol is obtained by holding Alt Gr as you hit the ` key in the top left-hand corner of the keyboard.

If you’d rather avoid using any form of wireless keyboard, you’ll need to add an onscreen keyboard to Raspbian with: $ sudo apt-get install Florence

Once installed, Florence is run from the Universal Access menu. You’ll see the onscreen keyboard appear, plus a small floating keyboard tile, which you tap to bring the virtual keyboard to and from the screen. Sadly, it doesn’t work well with the Terminal, so keep a USB keyboard to hand.

Elsewhere, the touchscree­n works well as a mouse substitute, but there’s no right-click support and the recommende­d solution on the Raspberry Pi website only works with Wheezy and not Jessie. However, the box ( AddRight-ClickToThe

Touchscree­n,below) reveals a workaround that simulates a right-click using two fingers.

PORTABLE POWER

As things stand, you have a compact, all-in-one solution for your Pi that’s hamstrung by one critical problem: you need to be connected to mains power in order to use it. That’s a problem that’s easily fixed, and how you do this depends on your needs. The key considerat­ion is that you supply a steady 5V of input from your battery, so you can’t simply connect up four AA batteries and hope for the best (AA rechargeab­les would supply 4.8V in total, which would drop as the batteries discharged, while AA alkaline would supply 6V, which is outside the Pi’s tolerance range).

The simplest solution is to power your Pi using any kind of portable battery that’s used to recharge smartphone­s. Make sure they have a 5V output setting and then all you need to do is plug one into your Pi to power it up. But what size battery should you go for? It all depends on your needs.

First, determine how much power (measured in milliamps per hour or mAh) you’ll need to supply – not just the Pi (up to 1,200mAh), but also your touchscree­n (around 500mAh) and any other devices (the camera requires 250mAh, for example). If you want to calculate the power draw of your USB devices, use the following command:

$ usb-devices | grep ‘Product=\|MxPwr’

Tot up the figure and the result – 2,000mAh or upwards – is how much power you’ll need for each hour of use. In theory this means a 10,000mAh battery will supply five hours of use, but in practice it’s usually less because of the way they’re manufactur­ed, plus capacity reduces over their lifetime.

An alternativ­e way to supply portable power to your Raspberry Pi is with the MoPi add-on ($44, https://shop. pimoroni.com). This plugs into your Pi’s GPIO pins and allows you to connect a wide variety of batteries, from solar and car batteries to standard (and rechargeab­le) AA batteries, using standard screw terminals. There’s also a handy on/off button and the MoPi will cleanly shut down your Pi when power drops below a certain level. You can even use it in conjunctio­n with mains power, which turns it into UPS backup.

To keep things as portable as possible, we paired a MoPi with eight rechargeab­le AA batteries using a cheap AA battery holder. The MoPi supports input voltages from 6.2V up to 20V, so you’d need a minimum of six rechargeab­le 1.2V AA batteries, but we’ve gone for eight because you get longer battery life and it’s one of the default supply profiles – all you need to do is remove the small jumper on the underside of the MoPi.

Just follow the step-by-step guide ( https://pi.gate.ac.uk/pages/mopi. html) and you’ll soon have your portable Pi running independen­tly off mains power.

 ??  ?? Free your portable Pi from the mains supply by installing the MoPi add- on.
Free your portable Pi from the mains supply by installing the MoPi add- on.
 ??  ?? Install twofing to make it possible to perform right- clicks on your touchscree­n using two- finger taps.
Install twofing to make it possible to perform right- clicks on your touchscree­n using two- finger taps.

Newspapers in English

Newspapers from Australia