North East Blog Directory

July 31, 2014

Alistair's Blog

ZX Keyboard

A ZX Spectrum converted in to a USB keyboard on show at Manchester Mini Maker faire.

The ZX Keyboard, a USB keyboard made from an old ZX Spectrum on show at Manchester Mini Maker Faire.

Several year ago I decided that I wanted to make an old ZX Spectrum keyboard work with an emulator and ended up making one in to a USB keyboard. This is the rather waffly history of the project with a few tips and links for building your own. I have also created a Hack a Day page for the basic build instructions and a GitHub repository for the files.

Although I have never owned a working rubber keyed ZX Spectrum (mine was a Spectrum+ with a more solid tactile keyboard) I was given a broken rubber keyed one many many years ago. It was in a bit bashed up and did not work, and I have used a few of it’s components to fix other machines, but surprisingly the keyboard was okay.

Back in the start of 2012 I wanted to mount a soon to be released Raspberry Pi inside and emulate a full ZX Spectrum, as well as a Commodore 64 just to mess with people’s heads. I waited until the Model B was Pi eventually available but it would not fit without making more modifications than I wanted, and the smaller Model A was a long way off becoming a reality. I then decided that instead of mounting the Pi inside I should turn it in to a USB keyboard so I could use it with a Pi or a normal desktop PC. Naturally I then forgot about it for another couple of years, until for some reason just now.

Several people have asked why I did not use Bluetooth (some more criticising that asking, but whatever) and there was a Kickstarter making new Bluetooth ZX Spectrum style keyboards, but the project was to use an original ketboard, get it working with the Pi, and to do it myself.

Anyway, the build…

The hardware was surprisingly easy with the big unknown being the USB communication to which I considered a few solutions. Lots of projects use  a Arduino Leonardo that can natively emulate a USB keyboard, or reprogramme the Arduino Uno’s serial controller that requires zero extra hardware, but will prevent the Arduino from being programmed via the USB port. I was keen to use a low cost (the one used cost £1.30) Arduino Pro Mini clone and a small number of basic components.

Having decided on the Arduino Pro Mini (yes, I have my cart pull the horse for pet projects) the easy solution (for me because of prior knowledge) was to get the Arduino to emulate a PS2 keyboard and use a cheap PS2 to USB converter. If it was a one off commercial project, or I was against the clock then this is what I would do as it is the quick and easy solution that adds pennies to to cost of the project. This however is a daft pet project that is an ideal excuse to use as a learning experience, so I decided to play with the V-USB library from Objective Development.  In the end I found the VUSB for Arduino library that had done a lot of the porting work for me, although I am bypassing the top levels of the library to increase compatibility and allow multiple keys to pressed. Now I have thins knowledge my default may well be to opt for USB for future projects.

Connecting to the keyboard hardware was easy enough as I reused the original connectors from the old motherboard that already had components missing. The flat cable from the membrane was very tarnished and had cracks across the connections but I chopped an inch off the end and this solved the problem. The connections have been well documented by hobbyists over the years so there was no backwards engineering required. The way it is wired to the Arduino is not just to make things look neat mind. I will also help the software. Instead of having to check each button of each column at a time it is arranged so multiple values can be read in an operation.

The key mapping took a lot of thought and I have tried to make the keyboard usable for normal operations while keeping full compatibility for Spectrum Emulators. I think I have managed that and have written a little about how it works on the hackaday page mentioned at the top of this post.

So that is it. I will be taking the keyboard to future hack days, Bar Camps, and Mini Maker Fairs if you would like to see it. I hope you are inspired to have a go at building one, perhaps a better one than mine. Do let me know if you do. If you want one but don’t have the time or skills to convert your old ZX Spectrum (or any other machine for that matter) then I am happy to do it for a few quid so get in touch.

by Alistair MacDonald at July 31, 2014 11:02 AM

Random Thoughts of an ASP.Net Code Monkey

Retired from the MVP Program–Got a New Badge

On Monday 28th July 2014, I retired from the Microsoft MVP Program after 7 years!  The MVP Program is a fantastic honour and privilege to be a part of and I have interacted with many, many fantastic peers and community members over the years. 

I’ve had to retire because I have joined Microsoft as a Program Manager on the Microsoft Azure Websites Team, a very exciting and interesting opportunity for me!  I’m looking forward to getting up to speed quickly and working with my new team.

I’ll still be as active as I used to be in the community, workload permitting, and look forward to seeing many of you at NEBytes and DDD North as it’s business as usual with both of those.

July 31, 2014 09:09 AM

July 30, 2014

SuperMondays

Privacy and Geocoding Videos

A big thank you to Doug, Peter and Andy for presenting this month, and as ever a big thnak for to Newcastle University in supporting us. Here are the videos of this moneth event. A copy of Doug’s slides are on Slide Share and Andy’s new service is Ask The Pigeon.

by supermondays at July 30, 2014 10:52 AM

July 22, 2014

SuperMondays

SuperMondays – Privacy and Geocoding

This month we have a varied event, with Doug Belshaw and Peter Shaw speaking about Privacy, and Andy Redfern taking us through geocoding the green vote!

Doug Belshaw educates you to educate others – on raising the next generation in the thorny subject of privacy. How do you get more than a ‘meh’ about creepy government surveillance? How do you get people to actually read those mammoth Terms of Service that everyone agrees to? And what are we actually doing with our kids’ data?

Peter Shaw will be telling tales from the trenches – lessons learned in developer security. Covering essential points such as not letting business leave security until the last minute, ways that tricksters will attempt to get private details from you, and warning signs that your app might be leaking data will all help you to be aware of the issues and combat them quickly.

Andy Redfern will be demonstrating ‘Green Geocoding’ and showing us how he helped Green voters connect with European Election Candidates in the last election. With more than 30 million pieces of data, a government database, you’ll see how clever custom algorithms assembled all that data to deliver it to tens of thousands of voters.

Please note that for the next few months we will be in the Bedson Teaching Centre off Queen Victoria Rd opposite the RVI. Entrance 21 on the map.

Eventbrite - SuperMondays - Privacy and Geocoding

by supermondays at July 22, 2014 06:49 PM

# This site is managed by the team at SuperMondays, is hosted by the team at Consilience and is maintained on github.