I needed a button matrix to use as an interface for a new digital instrument that I’m making as part of my undergraduate major project. Something like the monome would probably work quite well, but I cannot justify being lazy and paying for one when I feel like I could probably hack some existing things together and end up with a custom result.
In earlier posts I talked about establishing serial connection between raspberry pi and arduino, because initially I intended to read a button array with the arduino and then send little data packets via usb that told the raspberry pi which buttons were pressed.
Previous design exploration: 16-Digit Keypad connected to Arduino, connected via USB serial to Raspberry Pi using a 3.5″ TFT LCD Screen as display.
For a few reasons, particularly the latency issues, this wasn’t a viable solution. I am vaguely aware that the arduino could be cut out of the process, and the button array read by the raspberry pi directly, but I’m also vaguely aware that to try and figure out how to do that may set me back a month.
The solution was to buy a cheap USB Keyboard, gut it, rip the chip out and hook it up to a custom button array made up of a 5 x 5 grid of N/O buttons.
I like this solution in that it doesn’t really matter which contacts I solder the buttons to, so long as each button triggered a different keystroke. I can then assign each button to it’s specific keystroke and then map each keystroke to it’s corresponding position in my Processing/Python sketch.
Ultimately, the keyboard is controlled by a small chip that communicates via USB. The chip has two banks of 13 contact points. To get any of the ~101 keystrokes available you have to close the circuit between two specific contact points.
So I started blindly shorting the board with alligator clips and a probe with notepad open on my laptop to capture the keystrokes.
Ended up with some glitch poetry
Now I just need to perform the time-consuming task of soldering up an array of N/O buttons to the keyboard chip, based on the combinations that results in 25 useful keystrokes (letters, numbers, punctuation – no function or naviagation keys). Then I need to house it all in a 3D printed case.
continue to Part II