Pages: [1]   Go Down
Author Topic: Makey Makey (Arduino mega) for full 85+ keyboard  (Read 1172 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I recently bought the Makey Makey (based on Arduino Leonardo / ATMega32u4), hoping to construct a full USB steampunk-style keyboard from some metal parts. Before it arrived I re-read the details and realized it has only 18 possible inputs, so 85+ keys will not work. Does anybody have ideas how I could add more input channels?
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2363
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One way used in most keyboards is a matrix switch.

http://en.wikipedia.org/wiki/Keyboard_matrix_circuit

Mark
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To expand on what holmes4 suggested...

If you used all 18 inputs you could create a 9 by 9 matrix of buttons, or 81 total.  That's not quite a full keyboard but fairly close.  The code would be like to using a standard matrix keypad, the main differences being the array would be larger and you would have to be sure to maksing diodes for each of the buttons (specifically between the button and the connection to the pin for the row it's on).
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure you could use a matrix switch, but if you're going to all that trouble you might as well use an Arduino to do it with. Another option is to use multiple Arduinos running the MaKey MaKey sketch (with added 22Mohm resistors), or multiple MaKey MaKeys (which of course run a version of the Arduino bootloader), plugged in via USB at the same time. Then there's no need for a matrix. They can all act as seperate keyboards of 18 keys each. I have tested this with 3 MaKey MaKeys, though I haven't tested this with multiple Arduinos. But either way it should work. While in some ways this could be simpler, it costs more!!!
Logged

Austin, TX
Offline Offline
Full Member
***
Karma: 2
Posts: 182
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's an idea: get an old PS2 keyboard and steal the controller from it.  Then you only need 2 pins on the arduino (for the PS2 interface) to read the key codes, and the controller does all the work. You just have to wire up the keys to the controller, in a matrix fashion as suggested.  Look at the way the PS2 keyboard is wired for inspiration.  You'd even have access to 3 led outputs if you wanted to use them.
There are several libraries and code examples in the playground and forum about how to interface a PS2 keyboard.  Since the arduino is only getting key codes, you'd have to write a lot of code to turn those into letters, but it's not that hard. The chip should have enough program space to do it.
Logged

Chris J. Kiick
Robot builder and all around geek.

Pages: [1]   Go Up
Jump to: