The Blanck Keyboard

A month ago, I shared my handwired Planck keyboard. Over the last few weeks, I’ve been working on an updated version of it, which I’m calling the Blanck keyboard. It’s a Bluetooth LE mechanical keyboard, with a case milled out of a solid piece of walnut, a magnetic USB charger and a breathing activity LED, and I obviously had to write my own firmware from scratch to drive it.

Finished product, with blank PBT keycaps in Cherry profile

In my previous build, I had used a stainless steel plate and made a frame using walnut scraps. This time around I wanted to get rid of the metal altogether and use my CNC to mill the whole case out of a solid piece of walnut. Because I was making the case out of wood, I decided to make a very thick top layer to avoid any bending when typing.

3d model of the case designed in Sketchup.

Once the model was designed, I used Meshcam to create the toolpath and sent it to my Carvey for milling.

From solid piece of walnut to keyboard case.

In hindsight, I made a few mistakes: first, I totally forgot to account for the metal part of the stabilizer for the space bar, but nothing that some filing wouldn’t fix. Second, the bit I used was too big and didn’t capture all of the details of the switch holes — again, more filing. I also added a pair of holes for the magnetic charger and LED to fit through, and then mounted the switches (Cherry MX brown). In my 3d model, I had added little tabs for the switches to grab on, but these disappeared with all the filing, so I ended up Epoxying them in place.

Left: slot for the magnetic USB charger. Right: after putting the switches in.

Before working on the wiring, I decided to build a bottom plate out of aluminum and felt. I tried using the CNC to cut the piece but it ended up jamming a couple of times, so I only used it to drill the holes for the screws and cut the aluminum sheet by hand.

Finally I tackled the wiring. The board I’m using to drive the keyboard is a Adafruit Feather 32u4 Bluefruit LE, which only had 15 available pins — I wanted an indicator LED, and I could not use pin 9 for I/O because I wanted to be able to use it to monitor the battery level. Usually, such a keyboard is wired as a 4x12 matrix and thus requires 16 pins, but I took advantage of the fact that you can also wire it as an 8x6 keyboard (see picture below). Each physical “column” represents a pair of logical columns (for example physical column 1 is logical columns 1 and 2) and the parity of the physical row lets us distinguish between the two (for example, column 1, row 3, becomes column 1 row 2, whereas column 1, row 4 becomes column 2, row 2).

Left: turning a 4x12 matrix into a 8x6 one. Middle: column and rows wired. Right: detail of the wiring, we can clearly see two rows of wire for each row on the keyboard, and pairs of columns are wired together as one.

I don’t have any pictures of the rest of the wiring, but that was the most boring part: connecting the microcontroller to the matrix, wiring up the indicator LED (those I had were too bright so I had to add a resistor in series), and finally I decided to add a physical switch to cut the battery so I had to drill yet another hole through the case.

Final step was to write the software. I initially thought of porting an existing firmware, but I eventually decided to write my own, both because I wanted to learn how the core of the system actually worked, and because I wanted to add bells and whistles such as a breathing light when the device is connected over bluetooth:

In the end, it took a long time to get right: there is very little documentation as to what to implement to get a device to be recognized as a keyboard over BLE. Through trial and error I kind of figured it out, but it was pretty painful.

The other little feature I added was the magnetic charger. I got a cheap one off of Amazon that I gutted and customized using some brown paracord as sleeving.

Magnetic USB charger, before and after.

In the end though, this is a unique keyboard that I’ve been using daily for the past week or so — although to be fair I had to take it apart and change the microcontroller because the bluetooth chip died on me for some unknown reason, I really hope that doesn’t happen again.

I can’t promise I won’t be working on a third iteration of the keyboard, part of me itches to learn how to design a PCB..

The Blanck, viewed from above and below.
Like what you read? Give Adrien Friggeri a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.