USB Cherry MX Numpad

numpad-in-natural-environment.JPG
Almost a year ago, I bought my first mechanical keyboard. It's a Filco Ninja Majestouch-2 Tenkeyless (with Cherry MX Brown switches). It's an absolutely amazing keyboard to type on and is built like a tank, well worth the admittedly shocking price. However, the "tenkeyless" in the name means that it does not have a numpad. The keyboard is available with a numpad aswell, but the reason why I did not want one is that I am left-handed, and much prefer the numpad to be on the left side of the keyboard. A normal numpad would be almost useless for me.

Another reason why I got the tenkeyless version was this: not having a numpad also gave me an excuse to build my own! It's taken a year, but I finally managed to get around to doing it. That is what this post is all about.

Like I said, I've been planning for this thing for a long time. I bought a sacrificial keyboard many moons ago. The switches and keycaps are not cheap, and I wanted to see the layout of a numpad on a real keyboard PCB before I start making my own. So I bought a relatively cheap, old, used Cherry keyboard to disassemble.
numpad-sacrifice-to-keyboard-gods.JPG
That was the state of my project until a couple of days ago, when I finally decided to start doing something. I spent an evening looking at the old keyboard's PCB and fired up KiCAD to start designing my own board.

I decided to use the Atmel at90usb162 microcontroller as my base for the numpad. I've got a couple of them available for projects like these. Often keyboards use a scanning matrix to interface a microcontroller with a large number of buttons, but the microcontroller had just the right amount of I/O pins so I could connect each of the 17 buttons individually to the microcontroller.

The schematic for the numpad in PDF from can be found here.

The PCB dimensions:
numpad-v1-dimensions.png

The PCB was surprisingly easy to design. The next day, that is yesterday as I'm writing this, I went to my university where I have access to a circuit mill. I've mentioned it on this blog before and it is absolutely amazing. With very little effort, I had a really nice double-sided PCB in my hands in less than an hour. Vias are a pain, though. No through-hole-plating means that the vias have to be either riveted or you have to connect the two sides by soldering a small wire in the hole.

Here's the board half-way done.
numpad-halfway-bottom.JPG
numpad-halfway-top.JPG
After the soldering was completely done, I added a couple of PCB standoffs to the mounting holes to get the numpad to stand at a similiar angle to my Filco. I might do a proper stand for the numpad sometime in the future. Getting custom lasercut acrylic is temptingly cheap these days...
numpad-bottom.JPG
In any case, the numpad is about as useful as a brick as long as the microcontroller is unprogrammed. I grabbed the latest LUFA AVR USB library and implemented a HID keyboard based on the examples available. It was a relatively painless thing to do, and all of the credit for that goes to the awesome documentation and examples that the LUFA library provides.

Here's the numpad next to my Filco and Kensington Trackball. It seems happy there.
numpad-happy.JPG

All of the PCB designs, gerbers and code are available on my github account here.