Guide to Raspberry Pi (Part 2) – Making the Pi work

Guide to Raspberry Pi (Part 2) - Making the Pi work


Given the Raspberry Pi gives you nothing more than a circuit board you’ll need to supply a few extras of your own in order to turn it into a fully functional computer. While the Pi supports a composite video output meaning you could use almost any video display the simplest option is an HDMI-capable monitor. The Pi’s HDMI port is a full-sized one so any basic HDMI male-to-male cable will do the job.

 

Power supply

However the most critical element is the power supply. On its own the Pi needs a minimum 5V/700mA DC power feed to get it up and running. However in practice you need at least a 5V/1A (1000mA) supply. We managed to power the Pi using an HTC smartphone 5V/1A adapter. The fact that the Pi also uses a standard microUSB port to supply the power meant we used the HTC data/power cable too (as we said the Pi comes as a board only). While this worked for us we can’t guarantee every 5V/1A adapter will work. As you’ll read in a moment not all USB-ready power adapters are worth the power they claim to deliver.

The Pi has two USB 2.0 ports although they’re currently limited to 140mA each whereas the standard USB 2.0 port usually delivers up to 500mA. This gives us two problems: not only are we limited to light-load USB devices but once you account for a keyboard and mouse there are no ports left for anything else.

The Pi needs a minimum 5V/700mA DC power feed to work.

 

Powered USB hub

This is where choosing the right powered USB hub is pretty important. Unfortunately things are a little tricky here too. We picked up a low-cost seven-port powered hub from the local computer store for just under $10 but we had real trouble getting it working on the Pi. Basically as soon as we plugged a third device into the USB chain the Ethernet port would drop its bundle. As the Ethernet runs over the USB chain as well we think there might be high/low speed issues yet to be resolved when using some USB hubs. In the end we bought a second four-port powered hub and it worked perfectly.

It’s important that your USB hub has a decent power supply unit too. The four-port hub came with what was claimed to be a 5V/900mA power brick. But on testing it would’ve been lucky to deliver 500mA downhill with a tailwind. So again we recommend that if you buy a hub make sure it comes with a 5V/2A brick so that it has enough power reserves to run an external hard drive.

Choosing the right powered USB is important to ensure it works with the Pi.

 

SD card boot disk

The other thing you’ll need is the SD card boot disk. You can buy a 2GB SD card with the basic Debian Squeeze Linux distro preloaded from Pi retailers but that’s hardly the way to do it especially when you can do it yourself. All you need is the freeware Win32DiskImager utility and a Pi-ready distro. You can see how it’s done in the step-by-step guide opposite. For now the two simplest distros to install are the brand-new official Debian Wheezy distro you can download from the Raspberry Pi web site at tinyurl.com/76t6ekf or our own APC piLinux for Raspberry Pi distro available from apcmag.com/pilinux.htm.

The distro is built on the Raspbian optimised release of Debian Wheezy. It features HFP support for the Pi’s BCM2835 CPU along with the LXDE desktop environment and mostly programming aids to build your own apps. Our APC piLinux distro is built on the previous stable Squeeze release of Debian but comes with the Xfce desktop environment and includes word processing (AbiWord) spreadsheet (Gnumeric) web browser (Firefox clone Iceweasel) and the Omxplayer command line video player which handles up to 1080p H.264 video playback.

 

Casework

While the Raspberry Pi team went for the most compact design it could there’s nothing in the way of mounting holes on the board so you’ll have to be a bit inventive about installing your Pi into a case. Unless you happen to have a 3D printer lying around the simplest way is actually to make one out of LEGO. In fact you can buy purpose-built LEGO cases from thedailybrick.co.uk for around $16 or if you’ve got kids follow the guide at www.raspberrypi.org/archives/1354 and use your own LEGO pieces.

A case for the Pi can easily be created using LEGO pieces.

 

Performance

If you’re expecting to replace your PC with one of these don’t hold your breath. According to the Raspberry Pi team they equate the 700MHz Broadcom BCM2835’s processing performance to that of a 300MHz Pentium II – and that’s a pretty fair call based on our experience.

That said the Pi is fast enough to play Quake III play back 1080p video and handle speech recognition – not bad for a $38 computer. That it’s capable of running Linux and can be programmed with the Python language means there’s little doubt it’ll produce more ingenious and surprising ideas in the coming months.

 

Building your Raspberry Pi SD card boot disk

Step 1: Download the image file

Step 1: Download the image file

Grab a 2GB SD card plug it into your PC/laptop download our APC piLinux for Raspberry Pi distro (550MB) from apcmag.com/pilinux.htm (self-extracting archive) or the official Debian Wheezy distro (440MB) from tinyurl.com/76t6ekf (.ZIP file). You’ll also need Win32DiskImager from tinyurl.com/7ll9vau. Unzip the Win32DiskImager archive and launch the .EXE file.


Step 2 : Hook it up to the pi

Step 2 : Hook it up to the pi

Once the process is completed take the card plug it into the Raspberry Pi’s SD card slot plug in the power and it should begin booting up. Bootup time takes around 40 seconds and you’ll get to the login prompt. For our APC piLinux distro there are two username/password accounts: root / apc (admin account) and apc / magazine (user account). For the official distro it’s pi / raspberry .


Step 3 : Copy the image to your sd card

Step 3 : Copy the image to your sd card

Select the .IMG file of the operating system from your saved location and select the SD card drive letter. As a warning make sure that you select the correct drive because all of the data on that drive will be erased. Once you’re ready click the ‘Write’ button and the distro will be written to the SD card.


Step 4 : Log in & launch it

Step 4 : Log in & launch it

Once you’re logged in type startx and the Pi will begin launching the distro’s desktop environment. Once you see the desktop display you’re good to go. After this your SD card will appear to have just 64MB capacity in Windows due to it now having two partitions. You can use Win32DiskImager to rewrite distro .IMG files to the card but to get the full capacity back you must delete both SD card partitions in Linux with a tool like GParted.

TechLife the next generation of tech magazine