Dyce & Sons Ltd.

Helping IT since 1993

Ten pi-fect projects for your new Raspberry Pi

Thursday 14th March, 2013

There was an article a while back, in Scientific American I think, that posed the question: given a super-powerful computer, with infinite computing power shoe-horned into a coke can, what would you do with it?

(The best answer, IMHO, was the one which pointed out that those pesky laws of thermodynamics implied what you really had was a very large bomb… [See Pickover, C. (1991) An informal survey on the scientific and social impact of a soda can-sized super-super computer. Computers in Physics, May/June 5(3) 290–301])

The arrival of the Raspberry Pi (RPi) prompted a similar sort of question: given an (almost) disposable PC with late-1990s power, what would you do with it? Other than, of course, to use it as a cheap media centre.

Yes, yes, we all know it supposed purpose is to teach kids to code, but I mean, come on, where’s the fun in that? If the target audience are anything like my two iPod junkies, then just learning to writing code is only going to interest the tiniest minority. Thankfully, it turns out that there’s quite a lot you can do with your RPi. Which is important, because your average Linux head isn’t going to persuade ten year olds to start pootling around with Scratch. But if a £29 PC is merely the gateway to doing other more exciting STUFF, then they may have to learn some coding to get it all to work.

In their defence, the average(?) Linux head is inured in a culture of solving common problems, talking about them in forums, and posting fairly detailed workthroughs. What’s more interesting is seeing the crossover between Linux heads, open source electronicistas and a wide range of niche hobbyists. RPi is seeing action with groups from Apiarists (do you know the current state of your hive?) to Xenophiles (SETI, anyone?). Yachtsmen and Zumba DJs take note.

There’s a large amount of overlap between the elements within projects, so starting with a web server will get you on the road to a weather station and so on. But let’s not give the game away just yet. Here then, is a collection of useful and perhaps fun RPi projects which range in difficulty from plugging in some wire and downloading a bit of code, to firing up a soldering iron and whipping out the carpentry set.

Well, what are you waiting for?

Coffee table arcade game

Nostalgia alert! When I was 12, my best friend’s grandfather owned a pub. In those pre-Sunday Licensing days, we could sneak in early, he would stick some free credits on for us, and three of us would have a quick Space Invaders tournament. How technology has moved on.

Difficulty Level (1–10)

4 - some fairly basic carpentry and wee bit of soldering

Extra cost

Under £100

Shopping List

LCD display, joystick, buttons, prototyping board, resistors, table

Approach

Mount an LCD screen into an old table, hook it up to your RPi. Get hold of an off-the-shelf arcade joystick and some arcade buttons, and with the judicious use some resistors as voltage dividers to tie them to the GPIO inputs on the RPi. Install (or compile) a copy of advanced MAME, and some choice games.

Take it further

Hook up two sets of controls for two-player games, add some sound with an amp and some speakers.

Online Help

This is a popular meme, so there are lots of workthroughs and examples out there, including some IKEA modders. If you’re not sure you want all the fuss, these chaps have some more expensive options available.

LAMP server

Yup, you can easily build a web server on an RPi. Why would you want to? As a first project, it’s good practice, and novices will learn a heap of stuff: downloading and compiling source, Linux command line tools, configuration etc. For the rest, well, for a headless web-app server, an RPi may be all you need. Or use it as a test server, or for hosting a blog. It’s also forms the basis for some other types of projects (see below), where having a web page that can display data from the RPi’s GPIO inputs is half the battle.

Difficulty Level (1–10)

3 - but varies: bog-standard compiling and HTML coding, plus MySQL and PHP if you want

Extra cost

Zero

Shopping List

None (although if you’re needing an excuse for a decent router upgrade…)

Approach

There are precompiled SD card images out there for various flavours of RPi Linux, but half the fun will be getting it running from scratch.

Take it further

See some of the other projects below. But how about adding wireless and solar-power?

Online Help

Oh, yes. Oodles. But a novice’s best bet is probably to stick to the forums initially.

Pi/Kindle Chimera

You’re locked in the server room; you could email for help, but there’s no terminal to hand. WWMD? Yup, time to whip up a portable terminal using your jailbroken Kindle and trusty RPi. Actually, when you think about it, it’s not so bonkers. For terminal work, e-paper is just about usable. And it’d make a change from paperclip lockpicks. (WWMD: What would MacGyver do?)

Difficulty Level (1–10)

3 - You can do it in software, but, DISCLAIMER that’s a jailbroken Kindle, which can be easily bricked. So, yes, I will be building one, but only when I can get to my mother-in-law’s, and not using mine…

Extra cost

£60

Shopping List

Kindle, USB keyboard, Micro USB-to-USB cables

Approach

Install a terminal emulator on the Kindle, and USBNetwork. Cable RPi to the Kindle, add a keyboard, and then login to the RPi from the Kindle. Then (the trick) use a terminal multiplexer to share the RPi’s session from the Kindle. Voila, external keyboard works, and Kindle = display.

Take it further

At the risk of spoiling the next idea, stick it in a case and run it off a battery.

Online Help

Damaru offers a workthrough for the aptly named KindleBerry Pi

Pi Netbook

Here’s your chance to re-create the Osborne 1. Only in colour. With networking. And no chance of shoulder dislocation. Thanks to the recent explosion in hobbyist electronics - Adafruit and Arduino, I’m looking at you! - the availability of small off-the-shelf HDMI capable LCDs with driver boards has blossomed. There’s a variety to choose from 1.5in up, so a Nintendo-scale ‘nanobook’ isn’t totally out of the question.

Difficulty Level (1–10)

7 - OK, you’ll definitely need to break out the soldering iron for this

Extra cost

You can easily manage it for under £150

Shopping List

Small flight case or (!) cigar box, an RPi breakout/expansion board, assorted panel mount connectors for peripheral/external connections, keyboard, batteries, LCD

Approach

Really this is about building the peripherals needed for an RPi into your choice of case.

Take it further

How about LiPo rechargeable batteries? Or adding a wireless support and/or GPS. You know you want to.

Online Help

Don’t limit yourself to just RPi sources: there are lots of easily adapted self-build laptop workthroughs. There are plenty of RPi-specific examples of this in the wild. For example, the RPi Challenge runner can be found here.

Info kiosk info projector

Here’s one that makes good use of the RPi’s other special characteristics: it’s really small and physically lightweight. So hanging it on the ceiling next to a projector isn’t going to cause the office Stealth & Safety crew too many sleepless nights. And yes, it’s cheaper than a dedicated PC. Thanks to some decent LCD/LED projectors out there, for a number of situations it’s much cheaper than, say, a 64in display screen.

Difficulty Level (1–10)

2 - Easy peasy: you’re just hooking up an RPi to a projector

Extra cost

Under £500

Shopping List

Low-cost LCD/LED projector, RPi case, appropriate ironmongery for hanging projector and sticking a network point on the ceiling

Approach

The trick here is to make sure that your content will display on a hard reboot of the RPi. Setup the RPi to open a browser after booting, and make your site the homepage. Use HTTP refreshes for automatic updates.

Take it further

Add a wireless connection to the RPi to save on the cabling.

Online Help

Forums are your friend, especially when selecting a suitable projector: something that won’t overheat and has a long MTBF for the lamp or equivalent.

Weather station

The RPi is ideally suited to the role of weather station: small, low cost and low power. The RPi makes a great data-logger, and you don’t even need a network connection, just a large enough SD card. There tools and Python scripts out there to graph your data, or present it via a web page. And once it’s up and running, you can contribute your data to shared sites like the WeatherUnderground.

Difficulty Level (1–10)

3–7 - ie. pre-built to homemade

Extra cost

Dependent on your approach

Shopping List

Dependent on your approach

Approach

GPIOs make it easy to hook it up to external sensors directly, or there are weather station boards to available to build. You can avoid a soldering iron altogether too: kits from Maplin or RS (for less than £60) that include all the basic pre-built sensors, or open source tools like Weewx let you talk to professional USB-compatible weather stations.

Take it further

A popular addition to your weather station: add a cheap web cam. Or how about a Wi-Fi or XBee connection, and solar power?

Online Help

If you thought the IKEA modders were keen, wait until you meet the Weather Station folk.

Cloud server

Is he having a laugh? Nope, thanks to apps like OwnCloud and BarracudaDrive, you too can jump on the latest bandwagon for under £30. Yes, you really can run a cloud server from your RPi. Why would you want to? The sales pitch is that it avoids the possible privacy issues of Box, Dropbox, iCloud and their ilk, but it also helps to get around over-enthusiastic firewalls at work. Plus, turns out a cloud server on the local network is really just a self-important NAS server. Who knew?

Difficulty Level (1–10)

2–5 - some compiling, fiddly disk formatting and network config required, possibly

Extra cost

Dependent on your approach.

Shopping List

Powered external USB drive, a fixed IP address and a properly configurable router are both ‘useful to haves’.

Approach

BarracudaDrive has a pre-built image to download, and clear instructions for getting things up and running. OwnCloud needs some fiddling with the innards of PHP to get the best out of it.

Take it further

Set up RSync over SSH to provide secure offsite backup of your data to another RPi setup at a friend’s house.

Online Help

Both sites mentioned in the Approach section offer the usual setup workthroughs, plus there are forums available.

Pi scales

As someone clearly on the mortally-wounded side of morbidly obese, I have found it personally upsetting that one can’t as yet purchase a set of speak-your-weight bathroom scales featuring a choice of ‘No coach parties, please’-style repartee. A niche market missed, I think. No matter. It is but the work of a moment (ahem) to whip up a RPi connected set of scales, and some Python scripts to play and display the appropriate (health warning) message.

Difficulty Level (1–10)

5–8 - yep, you’ll at least need a soldering iron or possible some carpentry skills for this one

Extra cost

Approach dependent

Shopping List

Approach dependent, but certainly a post-success cream tea

Approach

Homebrew: (hard) tie some load sensors via a Wheatstone Bridge to your GPIOs and write some code; (easier) canabalise an existing set of digital scales and use the guts from that; (easiest) get some cheap USB postage scales, and employ the law of levers to build a mechanical multiplier.

Take it further

Script a Facebook update for your daily weigh-in, or take up bee-keeping.

Online Help

Help comes from strange places: tracking weight over time (as well as the weather) is important to bee-keepers.

Pi-BX

Asterisk, the well-known open source telephone tool, will quite happily compile and run on an RPi, handling up to ten calls (or conference participants) without apparent strain. Getting your landline connected to your RPi may take some fiddling, and you’ll need some external hardware. There are also options for ISDN connections. Just remember, you’re saving on the PC hardware. But if you’re just trying it out, you can configure it to use SIP instead. Before you know it, you’ll be configuring voice-gaol, caller id, and cheesy country and western hold-music.

Difficulty Level (1–10)

5 - issues will likely be Asterisk related

Extra cost

Under £100

Shopping List

For hooking up to a landline, the Cisco SPA3102 seems to be the popular choice. Handsets?

Approach

Pi-wise, it’s a case of downloading the latest RasPBX image. Then the Asterisk fun begins.

Take it further

If you do manage to hook up your RPi to the POTS line, you can even run a fax-to-email service. Very cool.

Online Help

There’s a dedicated site for all things RPi-Asterisk related, with regular updates, and a helpful blog. Asterisk wise, there are also plenty of fora out there as well as a thriving community.

FM radio transmitter

Here’s one just for the non-UK brethren, clearly. Turns out that with some pre-compiled C and a short piece of wire, you can trick the RPi’s GPIO pin four into broadcasting FM Radio. How cool is that? So why aren’t we being swamped by teenager pirate radio stations? It’s certainly illegal in the UK. With a decent 75≈í¬© aerial, a no band-pass filter and a following wind, the mighty calculations say you’re looking at a signal strength somewhere in the 9–14mW range, well over the 50nW UK limit. Hey ho.

Difficulty Level (1–10)

2 - easy as (sorry, statuary required cliché ahoy) pi

Extra cost

Next to nothing - beyond the price of a flight overseas (or an Ofcom fine) at least

Shopping List

200mm of wire, breadboard, overseas travel ticket.

Approach

Download the module, connect GPIO 4 to a 200mm piece of wire as an aerial, and you’re off.

Take it further

As written, it plays .WAV files, but you might try hooking up a microphone to turn it into a live transmitter. Set up two on different frequencies, and use it as a radio link between your non-UK shed and your non-UK kitchen.

Online Help

Straight from the horse’s mouth, the Imperial College Robotics Society. African branch, obviously.

Get Cracking!

There should be something here to whet the appetite. It’s clear that there’s more to RPi than vegging in front of a XMBC enabled TV, and a plenty of areas to interest the non-scriptkiddie in your house. Who’m I kidding? I’m off for an IKEA coffee table.

(First published on The Register)