The concept
As part of his ongoing effort to construct an open supply model of every thing, Clem Mayer sought to create a wi-fi keyboard that not solely communicates with a number gadget over Bluetooth Low Power, but in addition options clicky mechanical switches and has an uncommon format. The ortholinear, or grid, format was as a consequence of Mayer needing a approach to simply mix the English Qwerty format with the German Qwertz one since he works in each languages often.
Designing a PCB
After experimenting with an array of switches, Mayer went with a set of low-profile Gateron Blues as a consequence of their really feel and compactness. Moreover, the solderless variant will be mounted into friction-fit sockets in order that they are often changed and/or upgraded sooner or later with no need to interrupt out the soldering package.
On the microcontroller aspect, the ESP32-S3 was chosen because it helps each Wi-Fi and BLE in a small footprint. This part, in flip, is related to the multiplexed array of tactile switches, with every having an LED between one leg of the swap and the column line. One potential concern Mayer foresaw was that aligning a PCB completely inside the enclosure may develop into a problem, so he included a ribbon connector on each the principle keyboard PCB and the smaller LiPo charging PCB to permit for some slack.
Circuit meeting and shell
Meeting began by putting the ESP32-S3, voltage regulation circuit, and USB-C connector onto the principle PCB with solder paste after which reflowing it. After this step, Mayer hand-soldered every swap socket to the board’s underside earlier than placing collectively the LiPo charging daughterboard.
For the reason that electronics have been now accomplished, the following steps concerned attaching the array of 60 keycaps and creating some type of enclosure to guard the internals. Sadly for Mayer, the clean keycaps he bought didn’t match his format and, as a consequence of them not having any textual content, have been arduous to make use of. To unravel this, each cap was modeled and 3D printed to have translucent numbers, letters, and punctuation marks that might be coloured over with out worrying concerning the textual content coming off after heavy utilization.
Creating customized firmware
Though not 100% “from scratch” as Mayer initially supposed, the core logic round sending keypresses to the host based mostly on modifier keys was carried out from the ground-up. In essence, the keyboard is outlined as having a number of “layers” whereby a single layer will be energetic when a modifier key comparable to operate, alt, or shift is pressed. After utilizing the Adafruit_Keypad
library to scan the important thing matrix for a press and figuring out the important thing, the code can swap to the brand new layer if needed after which sends the important thing press/launch occasion over BLE to the host.
Utilizing the keyboard
When Mayer went to press a key, he observed that’s was not being registered accurately, and this was because of the design alternative of utilizing LEDs because the diodes as a substitute of signaling diodes which have a a lot decrease voltage drop. However as soon as the the resistors and diodes had been changed, it was time to make use of the keyboard. His private laptop and telephone have been capable of efficiently join whereas the sunshine on the prime would concurrently point out the present layer of the board. To see extra about this fascinating undertaking, you possibly can watch Mayer’s video right here on the element14 Presents YouTube channel.