Intro

The Raspberry Pi. Love it, hate it, but you'll have a hard time denying the fact that adding an EUR35 1GHz embedded machine to the arsenal of the average hobbyist is a bad thing.

Recently, I got one of the Pi's myself exactly because of that reason: it's always useful to expand your toolset with something powerful and cheap. I didn't get it for a specific reason other than the fact I may have to use it somewhere in the future and it would be fun to play with it.

To make a long story short: Ofcourse I couldn't just be satisfied by just hooking it up to a TV and installing RaspBMC and playing some movies... so I ended up spending quit a lot more time than I originally envisioned. The end result does show it, though, I ended up with what may be the smallest MAME-powered arcade cabinet in the world:

[image van doosje in al z'n glorie]

This is the story of how I got there. If you want to duplicate any step I did, feel free: the designs and source code is all downloadable.

Connecting an LCD

So, I got the Raspberry Pi and I want to do some development for it. Why not dive into kernel development? I still had a nice framebuffer module for intelligent displays from my SPI-controlled TFT display and I also had a 2.4" LCD with an 8-bit interface and an ILI9325 controller, meaning I could directly connect it to the GPIOs of the Raspberry Pi. That made the hardware really simple:

[loos schema van direct connected LCD]

As you can see, there's not much to it. Most IO-pins are directly connected. To save some I/O, the /rd-pin is permanently tied to Vcc because it's not necessary to read from the display. There are 4 resistors for the backlight, and that is it.

Because of the direct connection to the fairly speedy GPIO of the Raspberry Pi, the display refresh times aren't too bad. I tested it by using mplayer to show a 320x240 variant of the Big Buck Bunny short movie. The video is non-accelerated, by the way: the kernel driver bypasses the Videocore driver that accelerates video in the Raspberry Pi so only software decoding is available.

If you want to replicate this, you can: just get a ILI9325-compatible 320x240 display and connect it in the same way as I did. (Take care: some sellers mistakenly offer displays with Samsung controllers as having an ILI9325-controller. The two aren't compatible.) The software driver is in this patch, apply it to the latest Raspberry Pi kernel sources, enable the ILI9325 framebuffer driver, recompile and you should be good.

A case

When I finished the display, I knew what to do with the Raspberry Pi: Make an arcade cabinet! One of the more important pieces of an arcade cabinet, even for one as small as I intended to make, is the housing. Luckily, I've been looking for a good excuse to lasercut something ever since a FabLab opened near my home town.

My design is inspired by various (normal-sized) arcade cabinets you can find online. I basically jotted down the dimensions, drew a few designs using pencil and paper until I found something I thought would look good, then copied the design to Inkscape. Inkscape isn't really a CAD-program, but for 2d purposes like this, it works fine, and I was already familiar with it.

in Inkscape, I also made the 'fingers' used to friction-fit the case together. The idea of a friction fit is that you make 'fingers' on the side of the parts you want to join, with the distance between the fingers chosen so the fingers on the opposing side only just fit between them. By then using some force to join the two parts, you can make a solid connection without glue. The problem in designing for a friction fit are the tolerances: you have to know exactly how much material is 'burned away' by the lasercutter to get the fingers to exactly fit.

Because I didn't know the thickness of the material that gets burned away (aka the 'kerb' of the laser cutter) I used the 'clone' functionality of Inkscape to derive all the edges from one master edge. That way, I could always adjust the fingers for a change in kerb later. All in all, the design looked like this:

[svg dump]

With the designs finished, I went to the Fablab. The nice people there helped me set up the laser cutter and also told me the laser width was 0.1mm, so the kerb should be that. So, the laser cutter went to work... and I gotta say, it's a weird feeling to see a design you've slaved over for hours being made real in a few minutes:

[picas van laser cutter die hip aan 't snijden is]

I ofcourse had to immediately put it together... and found out a few things were wrong: I had a couple of dimensions wrong, but also the kerb was bigger than the 0.1MM of the width of the laser: it seems the heat melts away a bit more of the acrylic material. I decided I could fix those issues at home, though

[pica van blauwe inelkaargezette unit]

Ofcourse, the plans are again downloadable

. These plans aren't directly feedable to a random laser-cutter, by the way: you'll have to adjust the kerb and see if the lasercutter you use needs a certain setting for the lines that are to be cut.

Joystick, buttons, audio If I were to make an arcade cabinet, I'd have to do some of the boring stuff too: I needed to have audio and inputs.