Accessorising your Raspberry Pi

Features David Briddock Jan 11, 2013

David Briddock finds there’s a multitude of ways to enhance your Raspberry Pi

The Raspberry Pi was designed as an affordable entry into the world of hardware and software experimentation. By delivering just a basic circuit board, the Raspberry Pi Foundation kept the initial cost to an absolute minimum. Even the operating system is stored on a separately purchased memory card.

It’s been an amazingly successful approach, with a forecast of one million unit sales by Christmas 2012. In the wake of this success is a fast growing accessories industry, bolstered by numerous communities who enthusiastically and inventively tinker with their beloved circuit boards, while offering masses of free advice, knowledge and inspiration. So which accessories are right for you?

Power supply

You won’t get vary far without a power source for your Raspberry Pi. A dedicated power adapter is one option. However, many existing mobile phone and tablet power adapters with a micro-USB connector will also be suitable.

Yet you might not need an adapter at all. Just take a simple USB cable with a micro connector at the Raspberry Pi end, and plug it into your PC or other device with a powered USB 2.0 socket.

Monitors and TVs

The Raspberry Pi circuit board has a dedicated HDMI socket, which delivers digital video and audio signals. If you’re going to use an HDMI-compliant monitor or TV, a cable long enough to comfortably span the gap between board and display is all you’ll need.
However, not everyone has an HDMI monitor. In this case you’ll need an adapter. Take a peek around the back of the monitor to establish if it’s an HDMI-to-VGA or HDMI-to-DVI adaptor.

If you intend to use a non-HDMI TV, you can utilise the Raspberry Pi’s analogue RCA video and 3.5mm audio sockets. You’ll need a composite cable, which have those red, yellow and white plugs. If the TV only has a SCART socket you’ll also need a composite-to-SCART adapter or suitably terminated cable.

Storage

The Raspberry Pi board doesn’t come with any on-board storage. Instead it has a more flexible solution, namely an SD card socket. You could build up a collection of SD cards, each with a different version of Linux - or even a completely different operating system.

To install your chosen operating system and still have plenty of free space for files and data, buy an 8GB or larger SD card. Operating system downloads and installation instructions are available on the Raspberry Pi Foundation website.

Unfortunately, not every SD card on the market is Raspberry Pi compatible, so I’d suggest consulting one of the many compatibility lists before making a purchase. One of the most comprehensive is provided on the eLinux website.

While an SD card is essential for booting the OS, you can always add more storage using the USB ports. Adding a powered USB flash or hard disk drive is straightforward enough but provides huge amounts of additional storage capacity. That’s essential if you intend to store large audio or video files, such as when using your Raspberry Pi as a media centre as shown by Phil Thane in Micro Mart issue 1222.

Keyboards and mice

Since any USB keyboard will work fine, you can select the one that suits your own requirements and budget. On the other hand, a full-sized keyboard can seem rather ill-matched when sat alongside the credit card-sized board, so why not consider a mini keyboard. There are quite a few available, some just 11cm (around 4”) long.

Even at these diminutive dimensions certain models also offer wireless capability, in addition to a USB connection. A wireless keyboard typically uses a Bluetooth connection, which requires a mini dongle and a free USB socket. However, one of the most flexible and stylish is a USB and wi-fi keyboard, complete with mini touchpad, which is amazingly still only 15cm (6”) long.

As for the mouse, once again any USB device should work fine. However, why not use one of those miniature mice, originally designed as the ideal companion for netbooks, small laptops and the new super-slim ultrabook PCs. Bluetooth-connected wireless mice are also easy to find.

A particularly stylish mouse is the Microsoft Arc Touch, with a smooth, elegant design and touch-centric scroll pad. Another radical option is the Logitech Cube (goo.gl/D7mNR), with its touch-sensitive skin and built-in ‘presentation mode’.

A wireless keyboard and mouse setup is particularly useful when building Raspberry Pi projects. It enables the board to be housed in a wide variety of containers, without having to worry about all those cables.

USB hubs

The basic Raspberry Pi circuit board has two USB 2.0 ports, but as your range of accessories grows, you might need more. A simple multi-port hub is fine for keyboards, mice and similar items with minimal energy consumption requirements.

Choose a powered hub and you’ll have a much more flexible solution. It will support devices such as external hard drives, although you’ll also require a suitable power supply.

Internet connectivity

While an internet connection isn’t absolutely essential, it opens up a much bigger world to the Raspberry Pi owner. Operating systems can be updated, new applications downloaded, development languages added, and so on.

The basic board already has a standard Ethernet cable socket. This is by far the simplest way to get online, as there’s no need to set up any identity or password information. All you’ll need is an Ethernet cable long enough to reach your router.

However, depending on your home wireless setup, adding wi-fi capability might be much more convenient. While the basic board isn’t wi-fi enabled, this capability can be added simply and cheaply. The latest version of the ‘official’ operating system, based on the Debian ‘Wheezy’ release, has all the necessary wireless drivers and support software, so all you’ll need is a suitable wi-fi dongle.

One of the most attractive is the tiny Nano Wireless USB adapter. Its miniature dimensions make it a perfect companion to the Raspberry Pi. Despite its size, it’s based on the more advanced 802.11n wireless standard, which delivers much greater range and speed potential than older 802.11g-based alternatives.

Cases

Raspberry Pi cases are also a big seller, with many types in short supply. The Pibow brand is a particularly attractive design, and the ModMyPi cases (goo.gl/V3780) come in a variety of colour combinations.

Some enterprising retailers offer Lego case kits, complete with raspberry-inspired logo. However, if you already have some Lego lying around, why not construct your own case? For inspiration take a look at this Lego Technic version.

A more advanced and novel option is to create a uniquely designed case of your own. You could do this from scratch using a 3D design application, such as the free or Pro version of Google’s Sketchup. Another, and far quicker, way is to start with an existing design, then personalise the model. There are a number of Google Sketchup case design examples on the 3D Warehouse website.

Once your design is complete, send off the 3D file to a 3D printer service website. Popular sites include Shapeways and Sculpteo, or the UK-based 3dprintuk and 3D Creation Lab.

Camera module

The Raspberry Pi circuit board was designed with a 15-pin camera connector, also known as the Camera Serial Interface (CSI). Earlier this year the Raspberry Pi Foundation promised to supply a low-cost, five-megapixel camera module.

As I write, this camera module isn’t currently available. However, as it’s at the late prototype stage, a release date is expected soon - ideally in time for Christmas. Keep up to date with the latest status on the Raspberry Pi forum.

GPIO

From an educational perspective, the Raspberry Pi’s General Purpose Input Output (GPIO) connector is particularly attractive. The GPIO interface connects the world of the CPU, operating system and programs with the experimental world of electronic circuitry and sensors.

Marked as ‘P1’ on the circuit board, the GPIO has a total of 26 pins arranged in a 2 x 13 strip. In addition to the many user controllable digital input/output pins there are 3.3V and 5V power supply lines. It’s worth noting that revision 2 of the Raspberry Pi circuit board includes a few GPIO pin reassignments.

The eLinux website contains a comprehensive guide to the GPIO, plus notes on the revision 2 changes, descriptions of each pin and advice on how to handle the 5V power lines. On the same eLinux page are numerous GPIO code samples in C, Python, Linux shell script and many other languages.

Python coders may be interested to know about Google’s useful Python package for the Raspberry Pi’s GPIO.

Breadboards

One of the best ways to make use of the Raspberry Pi’s GPIO is with a solderless breadboard (also known as a breakout board) and a ribbon cable connected to the GPIO pins.

With a breadboard you can rapidly insert wires, chips, LEDs, resistors, capacitors and all kinds of electronic components into its grid-organised pattern of holes. The circuit layout can be rapidly rearranged as often as you like.

An easy way to start is with a breadboard-based project kit, which includes the ribbon cable plus various components and wires. An example is this programmable traffic light kit. With such a kit, new projects can be tackled simply by purchasing a few more electronic components.

Adafruits prototyping Pi Plate goes a little further. The plate surrounds a breadboard grid layout with numerous connector blocks to wire up all kinds of sensors, components and electronic devices that won’t easily fit on a breadboard. The Adafruit website also provides an informative tutorial about how to use the Pi Plate.

Breadboards are typically quite large. If you’re looking for an expansion board that fits within the dimensions of your Raspberry Pi, then check out the Pi Crust. This tiny board almost appears to be part of the original design and is ideal for projects where space is at a premium.

Projects

With the Raspberry Pi being such a popular device, there’s a multitude of project ideas on websites and blogs. The quality of advice on offer can vary enormously, so be prepared to hunt around to find a good one.

AdaFruit sells a good selection of project kits, including clocks, LCD displays, sensors and analogue-to-digital converters. In addition to these kits Adafruit has created a collection of comprehensive, step-by-step web-hosted Raspberry Pi tutorials for beginners to electronics. How to add an LCD display is just one example from this collection.

The recent tie-up between Adafruit and Element14 only increases the opportunities and information for the budding Raspberry Pi electronics engineer.

Books

A number of quality Raspberry Pi books are starting to appear. First there’s the official Raspberry Pi User Guide, aimed at introducing readers to the world of Linux and electronics. In particular, this book demonstrates how to interface your board to other electronic devices via the General Purpose IO (GPIO) connector. Beginner’s guides to Python and Scratch programming are also included.

Co-authored by Raspberry Pi creator and foundation leader Eben Upton, the official guide is available from numerous places on the web in both dead-tree paperback and electronic ebook forms.

Some Python and Scratch language books have a focus on coding for the Raspberry Pi. However, as Python and Scratch are cross-platform programming languages, there’s already quite a collection of suitable programming books. One of these may be more suited to your previous experience and background.

Become an inventor

The Raspberry Pi board is an ideal starting point for the budding inventor. With a few accessories, some electronic components and a little knowledge, you can create something truly original. The Raspberry Pi’s diminutive size helps imaginations run free and makes almost anything you build easy to carry around. The latest version 2.0 boards have two project-friendly mounting holes.

Your project could be aimed at entertainment, education or be part of a scientific experiment. You could build a device for streaming internet radio or video, a gizmo for home automation or security, a solar-powered GPS navigation gadget for the outdoors, or maybe a novel musical instrument. You could even design your own laptop, handheld games console or intelligent robot.

Whatever you create, drop Micro Mart a line and tell us what you’ve achieved.