Electronic – Building a wireless keyboard (preferably with a kit)

bluetoothkeyboardswitcheswireless

This is the project that spawned these earlier questions.

I'd like to create my own keyboard. Functionally it's going to be a keyboard, but visually it's going to bear more semblance to a joystick than to a keyboard. (Except there won't be a movable stick; there are just going to be many small buttons for each finger to be responsible for.)

It would come in 2 pieces (i.e. 2 joystick-like things.) I would mount each of those to the end of the armrest of my office chair. I'd like to have it connected to the computer wirelessly (either by Bluetooth or anything else.) That way I could move freely with my chair and not even have to put my hands on the desk.

My goal for this is to create the world's most ergonomic and efficient keyboard. I looked around on the Internet for a keyboard like this, but couldn't find one, just a bunch of defunct companies. (DataHand looked okay, but you can't get it even on eBay.) I would easily pay $2,000 for a keyboard like this, but I couldn't find one.

I also intend to use an assortment of AHK scripts with it to boost efficiency; for example allowing chorded keys to type common words, to save even more effort.

I'd like to note that I'm a newbie at electronics and have very little experience with it. (I'm a software developer.)


Now, the way I've approached this is buying a Microsoft wireless keyboard and trying to connect to its switches. But I've underestimated how difficult this could be. The main annoyance with this is that there isn't a separate circuit to close for each individual key. I could play that keyboard's game and create a circuit for each combination of the connections on the keyboard. But, if I could simply buy a kit that'll just give me a connection for each individual key, that'll make my life so much easier.

Someone pointed me to MaKey MaKey. It's a great project, but (a) it doesn't have wireless built-in, only as an add-on which seems to require some Arduino knowledge to use, (b) there don't seem to be connections for each and every keyboard key and (c) I'm not sure whether their approach of using high resistance switching and a moving window averager would work for a keyboard with normal switches, rather than banana-operated keyboards.

Is there something similar to a MaKey MaKey, except without the above issues?

I'd also appreciate any other suggestions and ideas relating to this project! Thank you!

Best Answer

First, I'd say dump the wireless requirement, at least for the early prototypes. Once you have a prototype that works, and you've picked up some electrical knowledge along the way, you can add-in wireless after-the-fact. Assuming you've designed the firmware well, it should be fairly easiy.

Then, I would say the approach I would recommend would be to target a microcontroller that can easily emulate a HID device.

The cheap and easy approach, and the one I would take, is to buy an arduino leonardo. The leonardo (and the makey makey, for that matter), both use an ATmega32U4, which is a microcontroller with an integrated USB interface.

Since the USB interface is part of the microcontroller, rather then a separate, purpose-specific device, it can be configured to act as a arbitrary HID (human interface device). In fact, there already exists a library for using a ATmega32U4 as a USB keyboard.

Now, lastly, you are basically almost certainly going to have to use a switch-matrix of some sort. Aside from designing your own circuit-board, with an enormous IC (such as a 144 pin TQFP, or similar), you are not going to have enough IO lines to have a dedicated input for every key.
This is fine. Switch matrices are a well-understood practice, and if you're really concerned about button aliasing, you can add a diode for every switch, and make the circuit-board incapable of aliasing.


For the moment, I would suggest you buy an arduino leonardo, and throw together a prototype. I think you're underestimating the mechanical complexity of this build significantly, and having the electronics you need to at least get the system talking to the computer, and acting as a keyboard will let you start poking around at the mechanics.