3D printed Cherry MX keycap
Posted: 14 Dec 2012, 15:28
If you asked me a week ago whether (consumer) 3D printed keycaps would work, I would have said: probably not. Now that I got to try it I have to say: it's shit but kinda works for novelty items.

I'll try to elaborate a bit and post my source files, so anyone can try it if he has access to a printer.
First, the machine used was an Ultimaker. It was only sightly modified with a heated bed and optimized feeder, but I guess thats not really important for this object.
Maximum z-resolution is 0.1 mm. On the x and y axis you can't really tell, but it's probably equal at best and definitely more in this case. No real measurements exist on this particular machine though.
Printing this key took 20 minutes, at a layer height of 0.1 mm. The inside is hollow and filled with support structure for printing. The filed result you see in the picture weights 1.5g.
PLA plastic was used since it's fairly easy to handle and shows no contraction during cooling.
The key
I went for a key base of 18x18mm² and a flat top of 12x15mm². Corners were rounded with r=2mm. I had no means for decent measurement, so everything is kinda eyeballed.
The connector pins were assumed to have a width of 1.0mm on the vertical section and 1.1mm horizontal, at an overall width of 4.0mm. Measurements with some digital calipers that I did on the stems afterwards showed me 1.1 and 1.25mm instead.
I added 0.4 mm to each of those initial numbers to make room for the uneven surface, bad print quality and the lack of decent measurement (and ended up scaling the whole key by 1.02, including this connector). After some filing inside the connector and taking away material on the outside of the pin (especially the lowest layer turned out ugly) it actually fit on the keyboard better than I ever expected. It doesn't require excessive force and doesn't come off by accident. Keypress itself feels smooth now. Of course it isn't perfectly aligned.

The inside has 4mm of air around the connector to allow for key travel. Although the 50% support structure which gets generated by Cura breaks away quite easy, it still leaves an ugly surface on the inside top and the bottom of the connector, which was set to start 0.75mm above the skirt of the keycap. Infill of the solid parts was set at 100%.
Some more shots of the keycap in use and the alignment achieved: 1 2 3
The surface
I'll just show you this picture. On the left are the results from first contact with the printer. Layer height was 0.2 mm to get done faster. Obviously it's horrible and the connector was far too small. I actually butchered one with a hot knife to make it fit, but I definitely needed another shot.
So the two keys on the right come from an optimized design with more space inside the key and larger connector dimensions to account for the lack of accuracy. This time a decent print with 0.1 mm layer height.

You can see both keys raw from the printer and filed to make the surface a bit nicer to touch and look at. Of course there are limits, I guess gently sandblasting it would be the only way to achieve a decent surface on details.
Also note that the whole key was scaled by 1.02, both because I figured my measurement was probably off and to allow for filing the surface without ending up with a small key.
The horizontal lines you can see on every keycap are faulty layers. I'm not entirely sure if it's a problem with the machine's z-axis or the print settings used for code generation. Remarkably they are very similar on all keys. Other objects printed with the machine sometimes end up having them, sometimes they don't or at least they are not always as prominent.
Oh and regarding the broken one: don't print it on a raft, too much reinforcement for the support structure inside. I broke it with a screwdriver while cleaning the inside, and the bottom of the pin is a really weak point with this design.
Software & Sources
I tried to keep everything fairly modular, models on top and geometry settings for different key rows should be easily modifiable. Guess you wouldn't want a key like this anywhere else though.
It's all open source software, so you can easily play with the existing model inside OpenSCAD. If you start from scratch you probably want to use a professional CAD application if you happen to have one available to you.
I got dragged into #gh last night for a little Q&A after posting a picture, and I think I covered about everything discussed there.
One thing stuck out from the logs after I went to sleep though:
I guess I could poke out the eyes from an earlier attempt and see if it even works without a light conducting material from the LED to the eyes.
TODO

I'll try to elaborate a bit and post my source files, so anyone can try it if he has access to a printer.
First, the machine used was an Ultimaker. It was only sightly modified with a heated bed and optimized feeder, but I guess thats not really important for this object.
Maximum z-resolution is 0.1 mm. On the x and y axis you can't really tell, but it's probably equal at best and definitely more in this case. No real measurements exist on this particular machine though.
Printing this key took 20 minutes, at a layer height of 0.1 mm. The inside is hollow and filled with support structure for printing. The filed result you see in the picture weights 1.5g.
PLA plastic was used since it's fairly easy to handle and shows no contraction during cooling.
The key
I went for a key base of 18x18mm² and a flat top of 12x15mm². Corners were rounded with r=2mm. I had no means for decent measurement, so everything is kinda eyeballed.
The connector pins were assumed to have a width of 1.0mm on the vertical section and 1.1mm horizontal, at an overall width of 4.0mm. Measurements with some digital calipers that I did on the stems afterwards showed me 1.1 and 1.25mm instead.
I added 0.4 mm to each of those initial numbers to make room for the uneven surface, bad print quality and the lack of decent measurement (and ended up scaling the whole key by 1.02, including this connector). After some filing inside the connector and taking away material on the outside of the pin (especially the lowest layer turned out ugly) it actually fit on the keyboard better than I ever expected. It doesn't require excessive force and doesn't come off by accident. Keypress itself feels smooth now. Of course it isn't perfectly aligned.

The inside has 4mm of air around the connector to allow for key travel. Although the 50% support structure which gets generated by Cura breaks away quite easy, it still leaves an ugly surface on the inside top and the bottom of the connector, which was set to start 0.75mm above the skirt of the keycap. Infill of the solid parts was set at 100%.
Some more shots of the keycap in use and the alignment achieved: 1 2 3
The surface
I'll just show you this picture. On the left are the results from first contact with the printer. Layer height was 0.2 mm to get done faster. Obviously it's horrible and the connector was far too small. I actually butchered one with a hot knife to make it fit, but I definitely needed another shot.
So the two keys on the right come from an optimized design with more space inside the key and larger connector dimensions to account for the lack of accuracy. This time a decent print with 0.1 mm layer height.

You can see both keys raw from the printer and filed to make the surface a bit nicer to touch and look at. Of course there are limits, I guess gently sandblasting it would be the only way to achieve a decent surface on details.
Also note that the whole key was scaled by 1.02, both because I figured my measurement was probably off and to allow for filing the surface without ending up with a small key.
The horizontal lines you can see on every keycap are faulty layers. I'm not entirely sure if it's a problem with the machine's z-axis or the print settings used for code generation. Remarkably they are very similar on all keys. Other objects printed with the machine sometimes end up having them, sometimes they don't or at least they are not always as prominent.
Oh and regarding the broken one: don't print it on a raft, too much reinforcement for the support structure inside. I broke it with a screwdriver while cleaning the inside, and the bottom of the pin is a really weak point with this design.
Software & Sources
I tried to keep everything fairly modular, models on top and geometry settings for different key rows should be easily modifiable. Guess you wouldn't want a key like this anywhere else though.
It's all open source software, so you can easily play with the existing model inside OpenSCAD. If you start from scratch you probably want to use a professional CAD application if you happen to have one available to you.
- LibreCAD 2.0.0beta1: drawing simple 2D helper shapes
- Blender 2.65: modeling the skull
- OpenSCAD 2012.12.06: creating the key (-> .stl)
- Cura 12.10: the slicer used to generate machine code. (-> .gcode)
- Sources on Github
I got dragged into #gh last night for a little Q&A after posting a picture, and I think I covered about everything discussed there.
One thing stuck out from the logs after I went to sleep though:
Well, there happens to be an LED beneath this key on the Poker. Although it is only lit when the ~ key is changed to ESC by Fn, so I didn't really think of it.03:14 < eckse_> it would be even cooler if the skull were hollow
03:14 < eckse_> an led underneath would be awesome
I guess I could poke out the eyes from an earlier attempt and see if it even works without a light conducting material from the LED to the eyes.
TODO
- post sources -- github
- poke out eyes