Skip to content

Instantly share code, notes, and snippets.

@ericandrewlewis
Last active March 18, 2022 08:46
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericandrewlewis/a5bc6c31b840a556a813 to your computer and use it in GitHub Desktop.
Save ericandrewlewis/a5bc6c31b840a556a813 to your computer and use it in GitHub Desktop.
Notes on making a keyboard

Notes on making a keyboard

Instructions for making a 60% keyboard with an abbreviated navigation cluster.

Parts & Tools

  • A keycap is the part of the key that the user touches. It is non-mechanical, it is just a piece of plastic. It sits on top of a switch.
  • A switch is the electro-mechanical component that, when compressed, makes an electronic connection.
  • Switches are wired to a controller, which aggregates keypress info and tells the target device (e.g. Macbook Pro) what to do over USB.
  • Switches sit on either a PCB or a piece of metal.
  • The PCB or piece of metal sits inside a case.
  • Female USB connector
  • 1n4148 diodes, one per switch
  • 22 AWG solid core wire for connecting things
  • Wire cutters
  • Soldering iron and solder

Purchase list

104-Key Cherry MX Keycap Set

Cherry MX Black switches and spec sheet

Stabilizer clips, two for each stabilized key.

Stabilizer springs, one for each stabilized key. For 2x keys and for the spacebar).

Stabilizer inserts, two for each stabilized key.

Teensy 3.1 controller

1n4148 diodes, one for each switch.

Hook-up wire

Soldering iron

Solder

Soldering vaccuum for mistakes.

Female USB connector?

Details notes on parts

Keycaps and Switches

Keycaps physically interface with its underlying switch at the keycap mount. Only keycaps and switches with compatible keycap mounts can be used together.

Keycap sizing from "custom" Cherry MX Keycap set in purchase list

13x1 (` to =) + 2 (backspace) = 15

1.5x1 (tab) + 12x1 (q to ]) + 1.5x1 ()

1.75x1 (caps lock) + 11x1 (a to ') + 2.25 (enter)

2.25x1 (shift) + 10x1 (z to /) + 2.75x1 (shift)

1.25x3 (fn to alt) + 6.25 (space) + 1.25x4 (alt to ctrl)

Microcontroller

The Teensy 2.0 is a USB-based microcontroller commonly used in the mechanical keyboard community. Pin layout for various Teensy models.

The Signal Charts section here hints at the controller's interpretation of a wired keyboard matrix to deduce which key is being pressed.

tmk_keyboard - keyboard controller firmware for Atmel AVR USB family.

How to build your very own keyboard firmware lays out how to use TMK with Teensy.

Case

Laser Cutting Acrylic in NYC

LaserMaster seems cheap

The cutout area should be .551" squared for each key with 0.19678572" space in between

External Resources

matt3o posted verbosely about his process making a keyboard. He writes high-level about the component parts, shared his finalized layout (in DWG format), placing switches and wiring the matrix, wiring the controller.

Deskthority wiki

Build your very own PC keyboard, Matteo Spinelli - high-level introduction to components.

Reddit So... I want to make my own keyboard - Reddit article with link drops

r/MechanicalKeyboards' overwhelming link drop

Build Instructions

Find a workspace. Need newspaper for a surface.

Design the top plate. What tool should we design with? Illustrator, AutoCAD.

We need to get the schematic for the Cherry MX switches to figure out what shape of hole to cut into the plates. We also need to take into account the size of the keycaps.

Lars has a laser cutter at his work that accepts SVGs.

Get the top plate cut. What material should we use? Acrylic?

Where should we print it? http://nyclasercut.com/ ?

Design the case

Where should we get the case made?

We need to make sure to cover the inner bottom of the case with non-conductive material.

Get the case cut

How do we attach the switches to the top plate?

Follow this step by step re: diodes and wires http://deskthority.net/workshop-f7/brownfox-step-by-step-t6050.html

How a matrix works and why were using diodes

Bend the diodes en masse

Solder the diodes to the switches in a matrix fashion

Firmware

Read this: http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html

What do we need to do to hasu's code?

Extra links

Building a custom Phantom keyboard

Attaching a keycap with stabilizer inserts to the stabilizer spring at 11:10

Edit DWG files with Draftsight

Threads Of Interest

Custom Waterjet vendor - seems too inaccurate of a process though.

Maybe a company like this I can design stuff and make them make it http://www.protolabs.com/

I should just draw a keyboad in Sketch Up and then send it to proto labs https://uploads.protolabs.com/PartUpload-MultiPart.aspx?LinkFrom=FC

I'll wait to hear back about others experiences because I have no idea where to start with getting a plastic mold made http://deskthority.net/keyboards-f2/making-a-custom-keyboard-case-out-of-plastic-t11278.html

Maybe these dudes - http://www.toollessplasticenclosures.com/

Manufacturers that might be able to help:

Papp Plastics

Order a piece of plastic Mcmaster-carr pastics car and go to a waterjet shop machine shop

@laoyoulin
Copy link

There are lots of manufacturers you can use. For example, RpProto, you just need to upload your 3D (CAD) file and they will make it and send it to you. It looks like they use the process of Urethane Casting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment