In this Instructable, I'll show you how to convert your ZX82 Spectrum keyboard into a functionally-expandable USB keyboard compatible with anything USB-enabled. This build is compact enough that when you're done, you can fit a Raspberry Pi or other small computer into the spectrum as well and just plug the keyboard in internally.
This build is nice and easy; I'll walk you through building the hardware interface to connect your Arduino to the Spectrum's keyboard membrane. Then we'll talk about how the software driver is constructed piece by piece, so it should be easy for you to customize later.
You will need:
Harvest your parts
The good news is getting the bits you need is easy. You will need to harvest:
First of all, unscrew all the screws on the underside of the Spectrum. Turn it back over and lift the lid, ensuring you don't tug the ribbon connectors. Carefully, but firmly pull the ribbon connectors upward out of the motherboard to remove them. The top half should now be free of the bottom.
We also need the lower case and the keyboard headers off the motherboard. Remove the screws from the motherboard that hold it down. Now you can desolder the headers from the underside of the board. The correct connections are easy to spot; they're the only series of pins arranged horizontally.
Protecting your membrane (REALLY IMPORTANT)
These membranes are some of the most fragile tech I have ever encountered. In their day they were fragile and going on 40 years old they're really fragile. To keep them safe, use masking tape to secure them to the lid of the spectrum without creasing the membrane. If at any point you need to replace the membrane, you can get replacements on eBay. This link is for the ZX82 model.
Ready your Adruino IDE
For LeoSticks, you can find all the information you need to get it going with your Arduino IDE at the LeoStick link provided. You'll need to follow the instructions to add the supporting library to the Arduino IDE and then try uploading a program to check it uploads properly. When it does, you too are ready.