3DPCB Keyboard

Description

This custom keyboard was created to speed up my 3D CAD development. My 60 most used commands are now just a click or two away. The keyboard is fully customizable, uses standard components and is easy to replicate since it does not use a PCB, instead everything is 3D printed using the 3DPCB idea.

Interactive webGL model of a section of the keyboard

Features

  • 33 keys (5×6+3)
  • Easy to customize (printable keycaps with laminated paper inlay)
  • Anyone can build it using a 3D-printer (FFF/FDM), common components and a soldering iron.
  • QMK firmware (allowing advanced keyboard layout)
  • Replaceable keycaps – twist and release
  • Using common 6x6mm TACT switches
  • Anti-ghosting using 1N4148 diodes
  • No PCB required (everything is 3D printed)
  • Low activation force (depending on switches)
  • Ergonomic – half size keyboard enables shoulder width position of hands.

Bill of Materials (BOM)

  • 1x Arduino pro micro (or clone)
  • 33x 6x6mm tact switches (low actuation force)
  • 33x 1N4148 Diodes (can be omitted, with risk of key ghosting when pressing multiple keys)
  • Strands of 0.3mm copper wire (from RK Cable)
  • PLA for 3D printer
  • Micro USB cable

Development

I realized that I frequently use the same commands when I am designing different things (like e.g. this project ;) in Rhino 3D. I tested custom keyboard shortcuts and tried to memorize them, but without much logic it was difficult to learn if revolve was ctrl+shift+7 or ctrl+alt+7 etc. With a custom keyboard, I could design the keycaps to show the most frequent operations. As my right hand is controlling the mouse, I wanted the keyboard to be left-handed and only half the size of a normal keyboard. This allowing the hands to operate closer to each other which results in a more ergonomic working position.  I started to take notes on which operations and keys that I used most frequently. Then I grouped them in different categories, like select, curves, surfaces etc. I started with two different functions per key, but realized that three operations were more logical for some keys.

I did my homework and studied tons of different keyboard solutions, both off-the-shelf solutions, but mainly custom mechanical DIY keyboards. I decided to position the keys in an ortholinear layout, allowing the fingers to move up and down instead of the common staggered layout. It improves the visual appearance and some say that it is better ergonomically.

With an estimate of how many keys I needed, and the number of operations per key, I started to design the keyboard. By now I have built several projects using the 3DPCB design, and a keyboard is perfectly suited for this technique. I started to design the keys around standard Gateron/ Kailh/ Cherry MX mechanical switches and did a single key prototype print.

First version using mechanical switches. Too high for this project, but the 3DPCB concept fits great with a mechanical keyboard. Maybe one day…
Note the space for embedded diode and the different height of the channels for copper wire, avoiding short circuit without the need for insulated / enamelled wire or PCB.

However, it became obvious that I preferred a keyboard with lower travel length, less build height and tactical feedback (clicky). I therefore switched to standard 6x6mm ALPS switches (I had previously bought a decent amount of 50g /0.5N versions for the 3DPCBoy) and did a one key prototype.

Building a good keyboard from scratch is quite difficult and it is hard to get the distinct click. Luckily, I have designed a few professional mobile phones for Sony Ericsson and Huawei, so I know most pitfalls to avoid. The challenge is to adapt the high precision multi-material keyboards with a 3D printed at home version. I am too embarrassed to mention number of iterations I did, but in the end, it was all worth it…

Routing and 3DPCB design

Working in Rhino 3D (my favorite surface modeler) I placed the switches in a 7×5 array with 19x19mm cc (almost the standard 19.05×19.05mm used by most keyboards). Since I wanted the keyboard to be as flat as possible, I decided to sacrifice two keys and replaced them with an Arduino pro micro. The columns were directly connected to the switches and routed on the backside, while each key got one 1N4148 diode (to prevent ghosting) before connecting them to the rows – routed on the top. By adding holes for each row, the wires were brought to the backside and connected to the Arduino. First version was ok but it was simplified in an iterative approach until I was satisfied with the routing.

2D drawing showing all components and the wiring. Bottom wires are magenta, top layer blue.

I added radiuses and trimmed the curves before I swept diamond shaped 3DPCB channels on the backside and added channels and groves for the front side wires, components and solder connections.

Backside of the 3DPCB base.

Front of the 3DPCB base.

Keymat design

I like simple designs, so I experimented with using a laminated paper overlay as keys, but realized that it dampens the z-movement too much. I then added some cutouts in the paper, but realized that the paper still did not move freely. I increased the slot width, but was still not satisfied with the tactile click – it became flimsy, and with holes that would gather dirt. I finally scrapped the paper idea and went for a 3D printed keymat using 2D springs. This was more promising, but highlighted the need for tuning. If I made the springs too wide, there was little area left for attaching the keys, and as expected, the thickness has a great impact on the tactile feedback as the stiffness of the spring follows the b*h^3/12. Only a tenth of a mm in cube will affect the tactile feedback. After several nights of spring designs and many, many test prints, I thought that I had the perfect design. When I multiplied it to the 7×5 grid, I realized that all the different radiuses created thousands and thousands of polygons that caused a large file size and slowed down real time rendering.

Initial design of keymat / 2d spring with radiuses

I simplified the design and replaced the radiuses with chamfers, resulting in a much lighter model.

Keytop design

In the first version the keys were printed upside down, with guiding pins for the keymat that was glued to the keys. It worked but prevented more complex key shapes. I then flipped the key, printing it with the bottom down and added a standard “+” attachment of the keys on the keymat. Unfortunately, it is difficult to get a press fit with the limited precision of the 3D printer. To avoid having to use glue, I thought of using a slide-in design, but realized that only a tenth of mm misalignment of the keys would cause it to scrape against the frame – again affecting the tactile feedback. I instead decided to use a bayonet mount, which allowed replaceable keys by lifting and twisting them 45 deg, with good x-y positioning and low build height. Again, I had to iterate more than a dozen times until I was happy with the result. The final version also has a spring that clicks it into position, preventing rotation that would cause scraping.

Evolution of keymat and keytop. For this project I used the keytop with white inlay. The curved tops feel great but requires laser etching, engraving or UV inkjet to mark the keys…
Rendering showing keymat and base with one keytop (without inlay)
Rendering with all parts (base with components, keymat, keytops and inlays that can be printed on a standard laser printer)

For my CAD version, I used key tops with a small border that allows a standard laser printout to be placed in the middle. However, I also designed a more traditional, curved key top that allows better distinction between the keys.

Key symbols

I started to use text for each key, but realized that with up to three functions per key, it became way too much information for the brain to quickly process. Instead, I replicated the CAD operation symbols from Rhino with simple lines. The key symbols were then exported to Illustrator where I played around with color schemes and added cutout marks for auto aligning the cameo CNC knife.

I printed the paper with a standard color laser printer, laminated both sides and placed a thin double-sided adhesive on the back (without removing the liner). A CNC knife was used to cut out all the keys with high precision. This can of course be done by hand, but would be a bit tedious. You can also try using a laser cutter, but I would expect burned edges.

3D Printing

Printing is quite straight forward, I printed everything using white PLA and standard parameters:

  • 100% infill
  • No support
  • 205 deg C

I used a BCN3D with a 0.4mm nozzle and printed the base first, then keymat and finally keytops, allowing me to assemble the components while the rest was being printed.

Freshly baked – some stringing due to an old nozzle.

Assembly

Once the printing is done you are ready for the assembly. I started with the switches and noticed that I had to straighten the legs before they could be inserted in the base. Once in position, I folded the legs so they secured the position. I then added the diodes and bent both legs, trimmed the length and soldered them to the switch. The anode (without the stripe) of the diode should be connected to the switch (I actually did the opposite, it is easy to change in QMK, but is not the default ). Now it’s time for the Arduino pro micro and the wires. I used 0.3mm strands of copper wire (0.07mm2 area) that I got from a stripped piece of RK-wire (the multi strained cable used for internal wiring in electrical 230V cabinets). Solder one end to the pro micro, thread it through the diamond shaped 3DPCB channels and then to each switch / diode until the channel ends. Inspect all components and joints and ensure that nothing is missing.

Add the keycaps to the keymat one by one, if they are not moving freely, trim the edges with a file or sandpaper. Then remove the liner from the double sided adhesive on the laminated inlays and attach them to the keycaps.

Program the firmware with QMK (see section below) and when you have confirmed that all switches are working – use 6 pins from a 0.1″ pin header to join and press fit the keymat with the base, then trim excess pin on the backside (you can see the 6 dots between the keys on the photo below).

Backside of the keyboard, showing how the switches are connected with the diodes and the column wires.
Frontside of the keyboard (without keymat and keytops), showing how the diodes are embedded in the design. Note that the standard direction of the diodes are the opposite (but can easily be configured in QMK)

Here is the description for row and column mapping to the arduino pro micro:

  • R0 (top)                PD7        6             a7          
  • R1          PE6        7            
  • R2          PB1        15           sclk
  • R3          PB2        16           mosi
  • R4          PB6        10           a10
  • C0 (left) PD4        4             a6
  • C1          PC6        5
  • C2          PF6         19           a1
  • C3          PB5        9             a9
  • C4          PF7         18           a0
  • C5          PB4        8             a8
  • C6          PB3        14           miso

QMK firmware

I selected QMK for the pro micro firmware. It is easy to use, allows tons of adjustments and is used in several custom keyboard builds. It is possible to install QMK locally, but I used two web-based tools:

I created three layers that are selected by the 2nd and 3rd key. Keys like “esc” and “del” are available in all layers. The CAD specific keys are mapped against custom shortcuts generated in Rhino. For instance:

  • Layer 0 -> Ctrl+0 -> _Scale
  • Layer 1 -> Ctrl+1 -> _Scale2D
  • Layer 2 -> Ctrl+2 -> _Scale1D

Kbfirmware.com then generates the firmware to the Arduino pro micro that was programmed using Arduino command line tools (copied from verbose output during upload)

Documents

Summary

I love the fact that you can design, print and assemble a custom keyboard that is very close to a commercial one. I have used the keyboard a lot and even if I am planning minor changes of the layout, it works better than expected. The biggest problem now is that I only have one – I guess I have to build a second keyboard (one at home and one for work).

This project is yet another great utilization of the 3DPCB idea. It is quick and easy to print, assemble and customize, and the final result is a sturdy keyboard without a PCB and without a rat’s nest of point-to-point soldering and different layers of insulation, which are commonly used in hand-built keyboards. I hope that this project is inspiring the custom keyboard scene, and that more will build keyboards with 3D printed circuit boards.

I’m impressed by the ease and power of QMK. I have already received requests for custom gaming keyboards for Fortnite and Minecraft. It is super easy to adapt the keyboard by changing the number of rows and columns. Or maybe I will design a version with linear/mechanical switches, possibly combining linear for movement and tactile for inventory…

Licensing

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

2 Replies to “3DPCB Keyboard”

    1. That would be nice, but it probably work better on metal then low temp plastic. Laser Toner has a glass temp at 110 deg C while PLA has 60 deg C & ABS 105 deg C…
      With more exotic materials it might work though.

Leave a Reply to Mike Cancel reply

Your email address will not be published. Required fields are marked *