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 touchscreen, but see the box (below, Alternative Form-Factors) for that alternatives you might want to consider.
The official touchscreen 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 touchscreen fits snugly inside, secured by four screws, and there’s a compartment 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, particularly 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 conferencing (and there’s a handy slit in the compartment 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 portability you’ll be wanting to use the stand.
Construction 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 touchscreen, your camera mounted to the front and your HAT sitting snugly on top of the compartment cover. If you’re worried about overheating, the cover includes a knock-out for a 6mm CPU heatsink.
We also recommend downloading the latest version of Raspbian Jessie from www.raspberrypi.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 performance of the touchscreen, although some users have reported that the Pi’s CPU temperature 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 touchscreen itself, but it’s handy to have an alternative.
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 touchscreen works well as a mouse substitute, but there’s no right-click support and the recommended solution on the Raspberry Pi website only works with Wheezy and not Jessie. However, the box ( AddRight-ClickToThe
Touchscreen,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 consideration 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 rechargeables 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 smartphones. 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 touchscreen (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 manufactured, plus capacity reduces over their lifetime.
An alternative 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 rechargeable) 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 conjunction with mains power, which turns it into UPS backup.
To keep things as portable as possible, we paired a MoPi with eight rechargeable 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 rechargeable 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 independently off mains power.