Monday, 28 October 2013

ZX Spectrum Plus Raspberry Pi Case Mod

A week or so ago, there was an article on the tech blog site us vs th3m about my vintage computers as USB keyboards with links to my Etsy Store, and that seems to have generated quite a bit of interest. So I've been quite busy this week building various USB keyboards.
One of the keyboards purchased was a Spectrum+ USB keyboard and the buyer requested it be setup for a Raspberry Pi. I've done quite a few ZX81's and Commodore 64 Raspberry Pi casemods in the past, but I hadn't done a Spectrum+, and it seems to fit quite well.
The ZX Spectrum+ was a recased version of the original ZX Spectrum, and as such, the 58 key keyboard was actually connected to the same 8 way and 5 way connectors as the ZX Spectrum and ZX81, a 40 key matrix. A special three layer membrane was used which meant when you pressed a key, for example, the left arrow key, it actually pressed 'Caps Shift' and '5'. That makes it rather difficult when it comes to converting it to a USB keyboard, as everything is still on the original 5x8 40 key matrix, so the keys cannot all be individually mapped. i.e. you can't map the left arrow key, all you can do is watch for 'Caps Shift' and 5 and send the left arrow key press to the USB.
Space inside wasn't too bad, there was space for the pi and my favourite USB hub for these things, a 4 port USB 2 hub from Trust.
That sits very nicely in the expansion port, with the audio and video connectors of the pi through the ear and mic sockets.
There wasn't quite enough space for a normal Micro USB connector to power the pi, so I used the GPIO port. It's not ideal as it bypasses the fuse, but it works fine. I took that to a 2.1mm DV jack in the same location as the original spectrum power. I suppose you could fit a 5V regulator in there and use the original spectrum power supply, otherwise a regulated 5V supply is required.
And that just about completes it. The USB keyboard circuitry is mounted on the back of the keyboard, offset so as not to clash with the pi. There is still space inside to connect to the HDMI and LAN ports if they are required, or you can have power, USB, audio and composite video on the back.
It sits quite nicely with a mouse, such a setup would grace any desk.
Now that it's all together, you can fire up Raspian (or your distribution of choice) and use it to look at some interesting websites.
Or you could try Raspberry pi chameleon, a nicely packaged distribution of emulators, of course the Spectrum would be the first choice.
Although it feels slightly odd running a Spectrum emulator on a pi in a Spectrum.....
So if you fancy a Raspberry Pi encased in an 80s computer (perhaps even you own old computer), or just want to use one as a USB keyboard, have a look around my Etsy store.