Phantom Keyboard
Last updated: Jan 8, 2021
Preliminary Notes
This project let me dip my feet into laser cutting, C programming, micro processors, CAD drawing, and general ergonomic design. My keyboard came out great, and to this day it still holds up!
8 Stars on Github! I am both honored and humbled that others are using my documentation as a resource.
Tools/Materials
Tools:
- Soldering Equipment
- Laser Cutter
Software:
- Solidworks, AutoCAD, or equivalent CAD program
- Keyboard layout generator
- CAD 2D sandwich case generator
Hardware used in my build:
![](Images/ClearSwitch.jpg)
![](Images/Caps.jpg)
![](Images/PCB.jpg)
![](Images/Costar.jpg)
![](Images/Teensy.jpg)
![](Images/Diodes.jpg)
- Teensy headers
- 5v LEDs
- Acrylic, 1 sheet at 610 mm x 460 mm, ~5 mm thick
- Acrylic, 1 sheet at 610 mm x 305 mm, ~1.5 mm thick
- USB Mini B Male to USB Mini B female
- USB A Male to USB Mini B Male
- M3x30MM Countersink bolts
- M3 nuts
Hardware that can be added/substituded:
- Holtite
- Parachord
- Any M3 bolts if you do not want countersinks
- Any CherryMX/Gateron switches can be substituted and/or replaced
- Any material choice I make can be substituted
Case structure
In terms of the case, all of my research has led me to the famous “Sandwich” case. This case basically has a bunch of layers that are laser cut to make a complete apparatus for your Switches and PCB.
Sandwich Case details
The case consists of the following layers:
- Top Layer: The top layer is the border that covers the switch layer. This can be any height that is below the switch top height.
- Switch Layer: The switch layer has to be 1.5mm to 1.0mm in order for the cherry switches to properly clip onto the layer.
- Spacers: 15.0mm of spacer seems to be a comfortable balance between room for the wires and the PCB. Keep in mind these layers will be hosting the cable connection for the keyboard.
- Bottom Layer: This layer can be as thick as you want.
Materials
- Acrylic: Popular, cost effective, could flex but thicker layers and proper engineering can reduce this.
- Wood: Good for prototyping, but I do not recommend it for a final product.
- Metal: if you have the money, then sure this is a great material!
How to make the case
I generated my specific case by using Keyboard layout generator and CAD 2D sandwich case generator. You first go to Keyboard Layout editor, and generate your configuration. Once that is done, copy and paste the raw data into the CAD 2D sandwich case generator and set your settings. In my case, I put a bit of a border, and set kerf to .05 since that’s the specification of the laser cutter I will be using.
![](Images/CADSettings.png)
Once you have this done, make a DWG file ready with all the parts laid out to cut. For me, I needed to make the parts on a 24x18 sized sheet for all layers except the switch layer. And then I made the switch layer on a 12x24 piece of 1.5mm thick acrylic to match the clip mechanism specs on a Cherry MX switch. You can find more details on this here.
After cutting your pieces, you should have an assembly ready. The design I made calls for 8 M3 screws to fasten the case. I bought Countersink Screws and nuts because of my case dimensions.
I am making 5 layers of .1875” thick acrylic, and one layer of .06” acrylic. This leads to a total of 25.34 mm of thickness. The nuts are 2.25 mm thick, so we have a leftover of 2.4 mm of screw at the bottom. So far, I will probably install some rubber feet here similar to this if I can find it in 3mm.
In terms of angle, I am going to be installing some mechanisms after the keyboard is done that will allow me to dynamically change the position of the keyboard. This will not be part of the main phases, so dont worry about it right now.
Assembly
You are gonna have to solder a good amount, so get a place with good ventilation, a lot of solder, a good iron, and a voltmeter to fix those happy mistakes.
Here is the order we are going in:
- Diodes
- Teensy
- Switches
- LEDs
For the diodes, make sure that they are facing the right way. Each spot where the diodes are going to be soldered is going to have a square and a circle on the PCB. The rule of thumb is to make sure that the black strip (1N4148 Diodes) is closer to the square part of the terminals.
The Teensy must be placed with male to male headers soldered onto the actual logic board.
Now the switches. Put four or five switches in each corner of the plate layer, and then put that onto the PCB. This will ensure the switches are aligned, and makes the process of combining the switch layer and the PCB layer easier.
Code Upload and Testing
Download the correct drivers/compiler for the Teensy board. Once you do this, upload your custom key mapping and test each key. You can go to keyboardtester to do this.
Results
![](Images/Done.jpeg)
![](Images/SideDone.jpeg)
![](Images/UpDone.jpeg)
Miscellaneous Topics
Depending on the application, stabilizers might be a good or bad idea. For my specific application, costars were the best choice, but cherry stabilizers might be better for tighter fits.
After this, make any visual changes! I put some countersinks for the holes that the screws go in, since the screws that I am using have a countersink.
The acrylic that I used for the switch layer warped during the laser cutting process. This can be avoided by using a thicker material, or using metal. Be warned that thicker material will not allow cherry switches to latch on, which might be a problem for certain applications.