Building Your Own Keyboard – Part 1

 

 

How to build your own keyboard, or as I like to call it, spending way too much money on a computer peripheral you could get for like ten bucks. Hearken back to the old days, though, a true aficionado knows the glory of a loud, heavy, indestructible keyboard, like the IBM Model M, which has a cult following to this day. I was surprised to find out that there is a small but thriving community of manufacturers and hobbyists making mechanical keyboards, keycaps, switches, firmware, and all. You can design and assemble the entire keyboard yourself, and it can be fully customizable, with the firmware running on a Teensy 2.0 microcontroller.

I’d like to thank matt3o, who wrote the guides I followed to build this keyboard, and helped with a few issues in my design. His guides are linked below [0]. I’ll probably refer to them a lot, as my keyboard is pretty much a stright run through his guides, though with a different layout and a (what seems to be) novel and much faster way to solder the diode grid to all the switches. I also added a nifty transistor switched LED strip to illuminate through the acrylic layers on the case. I hope this guide can convince anyone interested in custom keyboarding to take the plunge and build their own!

Pictured above are the three keyboards I made. The first one, with the unlabelled keycaps, I considered purely a prototype, but it turned out perfectly functional. It’s made out of clear acrylic and some wood middle layers. The goal was to just test out my layout, CAD design, LED strip, minimize costs, and develop firmware before dropping the huge moneybomb on aluminum/wood cases. What I like to refer to as the ‘executive’ version is made of of waterjet cut 6061 Aluminum 0.06″ sheet, laser cut 0.15″ Poplar wood, and 0.062″ clear acrylic. The switches are all handwired with bare pre-tinned 28 AWG wire and heatshrink on the columns to prevent shorts. The keyboard with the NERV key is a work in progress and is basically the same as the DSA dolch keyset, but with different keycaps and a teensy++ microcontroller.

On to the tutorial! I’m going to break it up into multiple posts since it is a fairly long process. Here are the categories:

1. Case design and manufacture
2. Switches and keycaps and stablizers
3. Assembly and soldering
4. Firmware, LED strip, and transistor

[Part 1 – Case Design and Manufacture]
This part was the biggest learning curve for me to deal with, but thankfully there are a few tools made by members of the keyboarding community that takes a lot of the tedious gruntwork out of the situation.

You’ll first want to check out www.keyboard-layout-editor.com [1]. I highly recommend sticking with a straight ANSI layout pictured below, which is the standard you will find on most stock keyboards. My custom layout is similar to an ANSI 60% layout, but I added a column and scrunched in the arrow keys at the bottom right. I like it a lot, but buying keycaps is a pain, you’ll have to use a blank layout or pay too much for a special modifier pack to get the correctly sized right shift key and function keys. I designed it to fit a stock DSA Dolch kit from Signature Plastics. I’ll comment more on choosing keycaps in the next section, for now keep in mind that, when planning your layout, you are going to have to later spend money on the keycaps.

The nice part about keyboard-layout-editor.com is that you can export your layout as text in the Raw data tab. Cut and paste my layout below if you want to follow along. It will also come in handy with the next tool, which can do the majority of the CAD design for you. You can import your design from keyboard-layout-editor and http://builder.swillkb.com/ will make a CAD file for you [2]! That’s easily 90% of the work done right there! It’s an ongoing project, so you’ll want to open the output files in CAD and make any changes or modifications you want. Here’s the code for my keyboard layout, pictured below:

[{c:”#f16f3b”,a:7},”ESC”,{c:”#909596″,f:6},”1\n1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”0″,{a:4,f:3},”-\n_”,”+\n=”,{c:”#f16f3b”,w:2},”Backspace”,”DEL\n~`”],
[{w:1.5},”Tab”,{c:”#909596″,a:7,f:6},”Q”,”W”,”E”,”R”,”T”,”Y”,”U”,”I”,”O”,”P”,{a:4,f:3},”{\n[“,”}\n]”,{c:”#f16f3b”,w:1.5},”|\n\\”,”Pg up”],
[{w:1.75},”Caps Lock”,{c:”#909596″,a:7,f:6},”A”,”S”,”D”,”F”,”G”,”H”,”J”,”K”,”L”,{a:4,f:3},”:\n;”,”\”\n'”,{c:”#f16f3b”,w:2.25},”Enter”,”Pg dn”],
[{w:2.25},”Shift”,{c:”#909596″,a:7,f:6},”Z”,”X”,”C”,”V”,”B”,”N”,”M”,{a:4,f:3},”<\n,”,”>\n.”,”?\n/”,{c:”#f16f3b”,w:1.75},”Shift”,{c:”#909596″},”\n\n\n\n\n\nup”,{c:”#f16f3b”},”End”],
[{w:1.25},”Ctrl”,{c:”#909596″},”Win”,{c:”#f16f3b”,w:1.25},”Alt”,{w:6.25},””,{w:1.25},”Func”,”Ctrl”,”Home”,{c:”#909596″},”\n\n\n\n\n\nleft”,”\n\n\n\n\n\ndown”,”\n\n\n\n\n\nright”]

I’ll explain more about stabilizer types in the next section, but a quick intro will suffice for now. When you press a key, stabilizers transfer the force from the sides of larger keys to the switch. There are a few different types, but I recommend going with costar stabilizers, since they fit in a rectangle and are easy to work with and readily available to purchase on The Internet (don’t ever underestimate how difficult it can be to source the parts you want for a keyboard).

When I first used swillkb it only output the top plate design, but it was easy enough to start from there with some basic CAD knowledge and make all the other layers for a the entire case. Use cut and paste and try your best to run up the learning curve of your CAD program of choice.

Without having and 2D CAD experience I tried out a few software packages before settling on Draftsight [3]. It’s free once you register and pretty straightforward to use. I also ordered the aluminum plates from eMachineShop, which has its own CAD program you can import dxf files into and order your own custom parts, which made it easy to get an instant quote on the design cost. Incidentally they were also the cheapest option. I ordered the Poplar wooden middle layers from Big Blue Saw, which was cheap but it turned out they were out of stock, so it took a month before the parts arrived in the mail. It’s worth sending off an email to double check what they have in stock if their website isn’t explicit.

Once you have your top plate designed, and if you already ordered your keycaps or have a spare set laying around, go ahead and print off, to scale, a paper version of the top plate. It’s an easy way to double check your layout and design before sending the CAD files off to be manufactured.

I lucked out, and have a friend in a design shop who cut out the entire design in acrylic so I could first verify the layout and case design before dropping the cash on a metal and wood case. Thankfully the layout was spot on, all I had to do was raise the stabilizer holes 0.25mm on the y axis to get them to work smoothly. With the tight tolerances in the design, you may end up having to file down the stabilizers to get a smooth travel. That’s fine and almost expected, I haven’t had any issues with it after filing down a bit of the plastic.

Next article I’ll talk about the fun part, choosing the switch types and keycaps to get the right look and feel for your keyboard!

 

 

Links:
[0] http://deskthority.net/workshop-f7/brownfox-step-by-step-t6050.html
[1] http://www.keyboard-layout-editor.com
[2] http://builder.swillkb.com/
[3] https://www.3ds.com/products-services/draftsight-cad-software/

One Reply to “Building Your Own Keyboard – Part 1”

Comments are closed.