Keyboards. Everyday item for the average computer user and prized possession of the enthusiast. Building a mechanical keyboard from a kit is a very popular project. As Clem spends most of his time in front of his PC, he is of course an avid user of mechanical keyboards, but not an enthusiast in that sense. So his daily driver can be described as the "cheapest thing that had mechanical switches“.
Watch the Video:
Since he coined his phrase of "there should be an open source variant of everything“ a keyboard went on the list. But not a normal one. An ortholinear, Bluetooth connected, modular keyboard with a weird mashup of keys comprised of US style QWERTY and German QWERTZ layout. The only way to build such a monstrosity is to start from scratch, even writing the firmware form scratch.
Clem decided on a 60 Button compact ortholinear layout, coincidentally the exact same size as the Blackmagic Speed Editor keyboard. So they are perfect for usage side by side on his editing workstation.
The Bluetooth connectivity is achieved by utilizing an ESP32S3 as the main MCU. USB-C acts as the charging port and Serial output. 4 colorful Leds provide feedback about the current state of the Keyboard and visually indicate if SHIFT. ALT /ALTGR or SUPER/FN/GUI are pressed. The Keyboard therefore has 4 freely programmable layers available for heavy customization. A BLE Keyboard on a cord does not make much sense, So Clem made a second PCB bringing the afformentioned modularity into play. The second PCB fits right above the uppermost row of keys, it has a convenient copperless window which is iluminated by the Leds on the main pcb, a lipo with its specific charging and protection circuitry and LDO. Both PCBs are interconnected via a universal bus broken out on a Molex premo flex connector and connected with a simple flat flex ribbon cable. This allows for varaible heights and tolerates slight missalignments. The Premo flex connectors break out all power traces, and UART connections so the keyboard could easily be used in future projects (foreshadowing) *wink *wink. The whole layout was done in Kicad and features hot swappable Keyboard switches. The flat low profile KS27 Gateron Blue switches were choosen for clickyness and simply availability, while the footprints should also fit other brands sockets and/or switches, they have not been tested yet. Builders should print out the board files to check if the holes line up for the chosen switches before comitting to a particular model. All pcbs were manufactured by Aisler with ENIG finish and had to be assembled with a hot air gun and soldering Iron as the PCB is to big to fit in Clems reflow oven. Of course for such a weird keyboard there are no ready made injection molded keycaps available. And blank keycaps would make the board unusable to Clem as he actually looks down a lot while typing to find the right keys. So the only choice is to design and 3d print custom keycaps. Clem designed his set of keycaps in Freecad and utilizes the Shapestring function of the Dreft workbench to make easy modifications to the writing for each key. He also extrudes the writing to the inside of each keycap and paints the letter with permanent marker. This results in a flat keycap without any raised portions that can be printed super fast laying flat on the bed of a resin printer, and the lettering can never rub of as it is actually never touched by the fingers. But of course this only works with transparent keycaps, so Clem naturally prints them in his super durable MAYER MAKES Engineering Resin. The full key set is an the source files are available for download and allow for easy customization as demonstrated in the video. The Firmware was written in Arduino with the Help of the ESP32-BLE Keyboard Library and the Adafruit keypad library. To get the BLE keyboard output working on the ESP32S3 Clem had to enable NIMBLE in the librarys files and install the NIMBLE library in adition. These changes enable a more efficient usage of the memory of the esp32s3 and should also make this library work on the Esp32s2 and C3 in theory. The Firmware first tries to identify which layer the user is trying to use and then sends the correspondingg key of the active layer. It took a lot of shuffling around the code until the out put was snappy enough for real keyboard usage. Also a DEBUG option can be enabled that outputs the KEYCODE of each pressed key via USB-Serial to identify any mishaps. Clem designed a backshell for the keyboard , it was intended to be milled from aluminium but that could not be done in time for the video release. He 3d printed a shell in PETG, but it turns out the keyboard with the secondary Lipo pcb mounted is so stiff and sturdy that a back shell is not really needed, but would be a nice upgrade. At 15mm total thickness, this also might be one of the flattest diy mechanical keyboards out there.
Bonus Content:
Bill of Material:
Product Name | Manufacturer | Quantity | Buy Kit |
---|---|---|---|
MULTICOMP PRO Zero Ohm Resistor, Jumper, 0603 [1608 Metric], Thick Film, 100 mW, 1 A, Surface Mount Device | Multicomp pro | 60 | Buy Now |
BOURNS Small Signal Schottky Diode, Single, 40 V, 300 mA, 500 mV, 2 A, 125 °C | BOURNS | 60 | Buy Now |
MOLEX USB Connector, USB Type C, USB 3.1, Receptacle, 24 Ways, Surface Mount, Right Angle | MOLEX | 1 | Buy Now |
STMICROELECTRONICS ESD Protection Device, 17 V, SOT-23, 6 Pins, USBLC | STMICROELECTRONICS | 1 | Buy Now |
MOLEX FFC / FPC Cable, Premo Flex Jumper, 10 Core, 1 mm, Same Sided Contacts, 6 ", 152 mm, White | MOLEX | 1 | Buy Now |
MOLEX FFC / FPC Cable, Premo Flex Jumper, 10 Core, 1 mm, Same Sided Contacts, 2 ", 51 mm, White | MOLEX | 1 | Buy Now |
MOLEX FFC / FPC Board Connector, 1 mm, 10 Contacts, Receptacle, Easy-On 52207, Surface Mount, Top | MOLEX | 1 | Buy Now |
MOLEX FFC / FPC Board Connector, ZIF, 1 mm, 10 Contacts, Receptacle, Easy-On 52271, Surface Mount, Bottom | MOLEX | 1 | Buy Now |
MIKROELEKTRONIKA Rechargeable Battery, 3.7 V, Lithium Polymer, 2 Ah, JST | MIKROELEKTRONIKA | 1 | Buy Now |
Additional Parts:
ESP32-S3-Wroom1 |
Keycaps 3d printed with MAYER MAKES ENGINEERING RESIN + Blue Dye |
PCB provided by Aisler.net use code „thanks_mayermakes_23“ for a discount. |
Switches used are Gateron Blue KS27, sockets are random parts i found by searching for the switches. |