Monday, 9 March 2015

Sinclair ZX Spectrum+ new fully mappable keyboard membranes - available now

Previously I announced I was working on a new replacement keyboard membrane for the Sinclair ZX Spectrum+ computer. This solves two problems when looking to use the Spectrum+ as USB keyboard. Firstly, many Spectrum+ membranes fail due to cracks or breaks in the membrane, and secondly, the keyboard mapping is limited by design decisions taken 30 years ago. Some can be repaired, but often need to be replaced.
The original membranes had a 8x5 matrix with 8 way and 5 way tails to plug into the original ZX Spectrum main board. That gave the original 40 keys, plus extra keys by pressing two of the existing keys together (i.e. the arrow keys are caps shift + 5,6,7 and 8, delete is caps shift + 0). This limited the remapping as there was no way to detect if the user had pressed the arrow key, or had actually pressed caps shift and a number.
These new membranes are replacements for the original ones, but have a different keyboard matrix, and a different connector. The new 5x13 matrix allows each key on the keyboard to be individually scanned and remapped. Ironically, in the USB keyboard firmware, I have a mode which is designed for use with emulators, and in that mode, I have to do the double keypress in firmware, and send caps shift+0 when the delete key is pressed etc.
The single 18 way connector is more convenient for connection to small microcontroller boards, Until now, I had been using long boards with the connectors at each end. These worked out quite expensive to produce and took up a lot of space inside.
The new controller sits on the back of the keyboard and leaves space inside the case for things like a USB hub or a Raspberry Pi etc.
I now have the first batch of membranes, so I have now updated my Etsy store listings, and can now offer fully remapped USB keyboards, with and without integrated Raspberry Pi,
The ZX Spectrum+ USB keyboards are are plug in and go keyboards for any device which supports standard USB keyboards. No additional software is required. The standard build now has a mode switch. What was the reset switch on the side of the case is now used to change keyboard mapping modes.
In the first mode, the keyboard works best for general use. Any keys with symbols on will generate those symbols when pressed with symbol shift. Dedicated symbol keys and arrow keys work as expected. The extra buttons on the left give things like home and end, delete, caps lock, tab, alt and the Windows key. With caps shift, the top row of numbers now give functions keys F1 to F10. In this mode, they keyboard makes a tick sound as each key is pressed, to give some feedback, as the original did.
When the mode switch is pressed, the keyboard beeps and changes into a mode designed for use with Spectrum emulators such as fuse. In this mode, the keys all act as the would with a Spectrum+, so you can use it as if it were a Spectrum, It doesn't tick in this mode as the emulator does that. Press the mode switch again and it returns to the normal mode.
Also updated is the version of the ZX Spectrum+ USB keyboard with integrated Raspberry Pi 2. This is the same USB keyboard with new membrane and mode switch, but now with a Raspberry Pi 2 integrated into the case, so it still looks like a Spectrum+, but with a quad core ARM processor and an SD card full of games, and the internet etc.
I've had a few requests on recent builds to have the option to use this as a USB keyboard without the pi. I am now providing this as an option, the keyboard controller can be fitted with an external socket, so a normal USB lead can be plugged in for use without the Pi, or a short loopback cable when using the Pi. Normally, the keyboard controller is wired directly to the Pi, so no loopback is required.
I get asked a lot about buying just the controllers, rather than complete keyboards. I've put this together as a kit with all the parts necessary to convert a Spectrum +, The kit consists of a new membrane and one of my USB keyboard controller boards, loaded with the appropriate firmware.
Finally, if you just want the membrane to interface to your own project, that is also available. It is fitted with an 18 way 0.1" female header, so you need an appropriate 18 way 0.1 pin header on whatever you want to connect it to.
TheZX Spectrum Plus USB keyboard kit is available from my Etsy store, or you can contact me directly.

UPDATE: Also available, ZX Spectrum 48K rubber key USB keyboard conversion kit.