Back to Parent

Outcome


Intro

Whether you're a gamer or an avid typist, Mechanical keyboards are satisfying to type on and allow users to type faster and more accurately. Some mechanical keyboards can be costly to purchase, but with the right tools you can have your own for a moderate price.

Getting Started

Once you have decided you want your own mechanical keyboard, you have two major decisions to make. First you need to decide on the size of the keyboard you would like. Below are examples of the three most common sizes, full size, tenkeyless, and 60% respectively.  For this tutorial we will be building a 60% keyboard following a standard layout.

Full.thumb
Show Advanced Options
Tkl.thumb
Show Advanced Options
60.thumb
Show Advanced Options

Next, you will need to determine the type of key switches you want inside of your keyboard. There are countless types you can go with, but the most popular brand is called Cherry. The following link gives a good breakdown of what the different switches feel like, but I would recommend you try out the switches before you buy.

https://www.gamingfactors.com/mechanical-keyboard-switches/ 

Once you have both the layout and switches picked out, you are ready to start building.

Bill of Materials

Depending on the layout you go with, the amount of parts will change, but this tutorial we will be choosing to go with 60% standard layout

61 x Mechanical Key switches of choice (Cherry MX Red for this tutorial)

1 x Teensy 2.0    

61 x  1N4148 Diodes (one every switch)

4 x screw

4 x nut

1 x cherry stabilizer set 

Wire for connecting columns and rows of keys to the Teensy 2.0

Wood/ Acrylic for outer casing

Keycap set


Tools needed:

Soldering Iron

Laser Cutter

Screwdriver

Step 1: Outer Casing

Before we get into the wiring, lets take a look at the outer casing that will be housing your keyboard. While you can purchase aluminum, wood, plastic, or acrylic cases online. If you have access to a laser cutter it is much cheaper to build your own sandwich case. A sandwich case has 4-5 different layers that you laser cut out of thin wood or acrylic and screw together. While you can use CAD software to make a more custom design, there is a great tool online that does all the work for you.

http://builder.swillkb.com/ 

Below are the settings for a standard 60% layout with cherry mx switches. If you were to choose to go with another layout, click the KLE in blue and it will take you to another website where you can click the preset drop down menu to select the layout you prefer. You then will need to click raw data and paste it into the plate layout box on the case building website.

Swib.thumb
Show Advanced Options

If you have entered the proper parameters, it should look like the following.

Switch layer open layer.thumb
Show Advanced Options
Top layer bottom layer.thumb
Show Advanced Options

Make sure to download the files in the proper format of your laser cutter. Once the case is cut, you're ready to start wiring.

Step 2: Keyboard Wiring

While there are a lot of wires, it is a relatively simple process once you get the hang of it. You will need access to a soldering iron to complete this part. Start by placing each key along with the cherry stablizers inside of the top switch layer of the case you laser cut.  Each key will need a diode soldered to the pin closest to the edge of the switch, and a two wires running from the other pin in opposite directions. I will look like the following

One eky.thumb
Show Advanced Options

The diodes are then connected with the other switches in the same row with wire, and the higher pins are connected with the other switches in columns. Here is what it should look like when you have all of the Diodes connected properly

Diodes in.thumb
Show Advanced Options

The next picture is what it will look like once the columns are wired.

Columns done.thumb
Show Advanced Options

Lastly we need to connect the columns and rows to the Teensy 2.0. It is easier to connect the wires on the endpoints of the columns rows.

Teensy in.thumb
Show Advanced Options
Up close teensy.thumb
Show Advanced Options

Step 3: Loading Code on Teensy 2.0

While you can write your own code, there are plenty of resources available for keyboard layouts.  The best I have found is a Github repository by Hasu. All you need to do is download and run the program, select the keyboard layout (GH60 for the 60% layout), and save it. Make sure that headers on the Teensy match the columns and rows on the schematic on the application. Here is the link to the Github repository.

https://github.com/tmk/tmk_keyboard 

Once you have the file save, you need to flash it onto your Teensy 2.0. To do this, I would recommend using the program called the teensy loader application. You can find the link below.

https://www.pjrc.com/teensy/loader.html 


Step 4: Final Assembly

Now that you have the keyboard functioning properly with your computer, we need to put it in the case and add the keycaps. The only trick here is to make sure that the micro USB lead is sticking through the open layer of the case. I would recommend securing it with electrical tape, but depending on the thickness of the material you laser cut you may need to secure it another way.

Once all of the layers are lined up and the screws are in, it should look something like this

Sandwich.thumb
Show Advanced Options

You now have a fully functional custom mechanical keyboard!

Drop files here or click to select

You can upload files of up to 20MB using this form.