So last week a friend asked if I’d be interested in looking at Mame on the Raspberry Pi. As I didn’t yet have one, he graciously lent me one as he is already busy making Pibows, a custom acrylic case for the Pi PCB, he simply doesn’t have the time to spare looking at getting Mame up and running.
Never one for turning down a challenge nor the opportunity to play around with a Raspberry Pi. I began digging around on the net, finding out as much as I could about running arcade games through Mame on the Raspberry Pi, not to mention how to set the darn thing up. I had read that the primary OS was Linux, a Debian distribution to be precise called Raspbian. Perhaps playing around with Lubuntu on the Nomad for all those months was going to pay off.
Things You Might Need
When I was handed the Raspberry Pi, it came in a tiny white box. Inside you got, the PCB in an antistatic bag and a piece of paper telling you that your device meets all the right EU regulations. To keep costs down, Pi’s are not sold with any accessories, the idea being you buy them separately. There’s also a good chance you own some of the parts already.
The Pi is powered via a standard 5 volt – 1Amp micro USB, which is used on many modern mobile phone chargers. As for video, you can choose to go old school analog and use the composite RCA port (phono), just like back in the day with the ZX Spectrum and C64.You will need a phono to phono cable or if you want to get techie, a male to male RCA cable for this. The picture isn’t amazing and on a CRT it’s headache inducing. An LCD does give better results, if a little blurry.
Alternatively you can use the more modern HDMI port, which will give a much better digital picture and is compatible with most modern flat panel televisions. If you own a flashy new telly, you might have a spare HDMI cable laying around. If not you will need to decide which method of display your going to use.
For storage you will need to buy a class 4, 4GB SD memory card or bigger. The Pi foundation advise against using none branded memory cards, such as the cheap one’s you find on ebay. The Pi needs a good quality card for the access speeds. Otherwise you might encounter problems running your OS. For Sound, any set of speakers should work fine with the Pi. Alternatively a 3.5mm audio jack to phono cable should allow you sound through you TV.
Not Feeling The HDMI Vibe
If like me, you don’t own anything with HDMI, you will be stuck with using composite. Unless you buy a HDMI to VGA converter, which will allow you to hook the Pi up to any PC VGA monitor. I found one on ebay for £8, it’s yet to arrive in the post but with some luck it will make the Pi more useful.
- Going Analog
First thing I have to say is don’t use the Pi on a CRT television for any length of time through composite. If you’re using the terminal your might be fine. However myself and a friend found booting into Raspbian to be almost unbearable. The picture was extremely flickery, like Amiga 1200 Pal Hires Laced flickery! Unless you like eye strain and headaches, I strong advise against using this setup for anything other then running commands via the terminal.
- Composite to Scart
You might find on ebay that some sellers are offering a scart cable for the Pi, this is simply a composite output to through the Televisions scart connector, it does not alter the picture from composite.
- Analog & LCD TV
This is possibly the only good way to use the composite display. LCDs don’t suffer with flicker like CRTs. While the image might be a little blurred, it’s a lot less harmful on your eye’s then the alternative. Luckily most LCD televisions come with composite for hooking up such things as consoles, video camera’s ect. BMV Recommends this method to those geeks on a budget, who cant afford a new TV or a HDMI to VGA adaptor.
While I’ve not used this means of display myself, I have seen one at the Pibow workshop and it looks great. Pretty much the same display as modern computer with a monitor. If you buy yourself a HDMI to VGA converter, the picture will be pretty much the same.
After getting the Pi, I looked at the various items I needed to buy. Cables, PSU and SD card. A quick search on ebay will throw back quite a few kits, which offer all of the accessories you need to get your Pi working in one job lot. I even found a composite to scart cable. After buying it, I have to say it’s not that amazing. In fact it didn’t seem as good as using scart on an Amiga. While some of these kits aren’t that good, if you have your wits about you, they can make setting the Pi up a lot easier then having to buy everything separate and saves on postage. The kit I bought came with a PSU rated at 5v 1000mah, scart cable, which connected to the Pi with a phone cable for picture and a headphone jack for sound. It also came with a class 4, 4gb memory card. Pre-installed with a copy of the soft-float Debian “Wheezy” OS. The scart cable was of a cheap construction and the metal shielding at one point came unstuck from the header of the cable. For £12 what can you expect? The PSU however is great and is not only useful for powering my Pi, but also my phone and HP Touchpad. Three uses in one! Not bad at all!
In part 3, I plan to cover setting up your pi, what to do if your getting a grey picture on your TV and how to stretch the picture on your screen to fit better.
Taking on the task of building a machine in a customised case is not without it’s challenges. As I soon discovered when I came to designing the front of the machine. With six LED’s, two switches and one illuminated power button. I had plenty to fill up the flat blank looking facia. But how was I going to go about it? I knew I wanted lettering under the various lights and switches to indicate function. But how exactly was I going to do it, without it look awful. Someone with money to burn, might have paid for chemical etching or some method that paints the letters on. On a budget I faced using a label maker and sticking labels on to the front facia. This was definitely not the look I was aiming for. The Altair had a wonder front to it and I wanted something similar.
It was then when I had an idea.
Placing the front panel under the flatbed scanner, I made a reasonably high resolution copy. I then loaded the image up and began designing where all the LED’s and switches would go. Having already sketched a rough design out on paper, with measurements of the panel and the components. I had a pretty good idea where things would be installed, which meant building it on the computer was fairly straight forward.
Printing a template out on my laser printer, I cut it out and taped it to the plastic panel. Then using a dremmel and a drill piece, I bore out holes for all the components. The LED’s where the trickiest part, make the holes to large and the LED’s would fallout, the fitting needed to be snug. With the holes made, I used a file to clean the panel up and removed the paper template. Offering the switches and light up, I found more filing/drilling was needing. So back to the dremmel I went.
It took a good hour of fiddling before all the components slipped in to their designated openings, but soon it beginning to look Altair-ish. I wont deny a sense of pride filled me, when I saw the front panel with all the components sitting in the case for the first time. Up until that point, the project had felt more a less like a pile of components. So seeing it come together for the first time was pretty satisfying.
With switches and light installed, I used a hot glue gun to secure the LED’s. With the wiring I know the chances of them falling out would be inevitable.
The next step was the actual facia or cover. Now this was the clever bit which I mentioned earlier. Having made a template on the computer, I had also incorporated in to the template all the various labels. Printing out another copy, I cut the out the holes for the LED’s and switches and offer it up to the front panel. Almost all the components pushed through the holes where they should. But several of the LED’s did not line up. As I had been cutting out the holes by hand with the dremmel, I guess I should be pleased at most of them aligned at all.
Taking measurements I went back to the computer and altered the layout, spacing the LED’s farther apart. This took me several attempts and many templates before I finally had one that worked. Finally with all the parts pushing through where they should. I was ready for the next stage. Making a final panel cut out, using thicker, high resolution card. When the printer spewed forth the finished version I saw a problem. Unlike normal paper the high resolution card had given the black ink a gloss look. With no way around this, I took a leaf out of my prop making skills and made a gamble. Using some Matt varnish spray I use for for water sealing decal paper. I sprayed the facia with three coats, with 4 minutes between coats. I then used a hair dryer to gentle dry the varnish. After 20 minutes it was dry to touch and had to my joy given the printed panel a Matt finish!
Using some 3M adhesive spray, I mounted the facia to the front of the case. Definitely heart in your throat work, as fowling up at this stage would have meant a big mess. As it where, it went on without a hitch.
One thing I was aware of when making the cover, was the need for it to be 3-4mm smaller then then actual plastic panel. As the panel it self, slid inside channels cut out along the front of the bottom and top sections of the case.
With the card attached the panel would have been to thick to fit. As the facia only needed to cover the visible surface of the front panel, it wasn’t much of a problem. Thou when the lid finally did go on, some trimming was need before everything went on properly. Even the best laid plans can run fowl!
With a melted PCB the front panel was as dead as an Aqua concert. So now I was faced with the prospect of having to rewire everything with a fresh LED PCB, providing I was able to get one.
Luckily as it was and I ended up buying two, as I knew what my luck was like.
Rewiring the front panel for a second time actually turned out to be very useful. As I was not only able to shorten the wires going from the regulator to the PCB, but also those from the PCB to the 4 LED’s on the front panel. Allowing me this time, the ability to mount the PCB on to the rear of the front panel. Once more using the handy retro 70’s solder/ray gun. I was able to get the whole job done in a surprisingly short space of time, not to mention ease.
Having done my research, I installed a 20 ohm resistor between the voltage out of the regulator and the PCB, preventing the circuit from drawing to much current. I had infact bought a 15 and 20, in anticipation of a 20 ohm resistor making the LED’s too dim. Luckily this wasn’t the case. After a quick test on the low voltage PSU proved the new circuit was working properly, I went about testing the larger Uniross. It was some time after all this, that I was to discover the Uniross was not actually powerful enough to boot the motherboard, not even as far as posting. But now I’m wondering off, so back to hooking things up.
With everything wired up on the kitchen side, I held my breath and press the power button, at first nothing, but then pressing a little harder the front panel came to life. five minutes passed and the blinkers where still working, I flicked through the patterns for a good 10 minutes, waiting for signs of over heating. Not a hint, the 20 ohm resistor had done it!! Hurrah
Powering the machine down, I went about placing the case back together. While the biggest hurdle was now over with, the next challenge, the one I had been dreading was finally upon me. Finishing the front panel. While the LED’s blinked, the Power LED worked, the Reset and Pattern change toggle switches worked. But the one thing which it needed was writing under each LED and switch, indicating what they where. How the heck was I going to do it? Decal’s? No, as I didn’t own a printer capable of printing white ink and yes they do make them. Etching? no as that would cost me a fortune and this was a budget, home brew project. It had to be something I could do myself. So after a lot of thinking, I stole and idea from my prop making skills.
In my next post I shall cover how I designed the front panel, it was a pretty simple job, time consuming, but a project that could be undertaken by anyone.
Yesterday I set about connecting all the jumpers and wires inside the computer, all was going well. Indeed I was feeling rather pleased with myself. This was short lived when I attempted to power the machine up and discovered the LED flasher board was not working. On closer inspection, I discovered two wires has come loose. Quickly out with the soldering gun, I had the wires reattached in no time at all. So back to powering the board. After a little tweaking of various connections and testing for conductivity before I powered up again, I felt satisfied that this time the board would work.
Flashing in to life, it was a sight to see all the LED’s on the front panel light up and working for the first time and being power from the internal ITX PSU as well.
My joviality again was not to last for long as i noticed one of the LED’s had stopped blinking then another, until all of them where out. Taking a look at the PCB, I went to place my finger of the microchip to test if it where getting to hot. Only to find a large glob of hot soft glue come off on my finger. The chip had not just got warm, it had fried itself.
At first I couldn’t fathom why this had happened. During all my bench tests, the pcb had run fine through the regulator I had build. The 2.8v feed should not have killed at all, that’s when it struck me. I had accounted for the constant voltage, swapping from the universal psu to the ITX psu. But I had not taking in to consideration the current, the level of amps from the test psu was 1.5mah, how much was it from an ITX power supply? I wasn’t sure, but if i had to hazard a guess. I would conclude in excess of 1.5mah’s. Add to this that the PCB for the blinkers is a very cheap and simple circuit that does not have a current regulator. So nothing was there to prevent the circuit from drawing more current then was needed. Effectively committing circuit suicide.
So today I am out again to out beloved poundland in the hope i can sauce another flasher unit, if not Thrashbarg has offered to design a circuit that will run from the 2.8 volt regulator i have made.
Fingers crossed i shall have it working this time, fourth times the charm I hope.