It has always been in the back of my mind to create a wireless ergonomic keyboard with trackpad and various features such as buzzer, haptics, oled etc. So when I found out about the Seeed Fusion DIY XIAO Mechanical Keyboard Contest from kbd.news, I thought it was the perfect platform for prototyping my idea and provided the motivation to complete the project.
What's in a name (and the symbol)The keyboard is named after Felix Klein. And the symbol used is the conformal map of the function z^3.
The main goals of the keyboard design were:
- Wireless/Bluetooth support (So I chose the Seeed XIAO-BLE module)
- Hotswap (Both MX and Choc profile keys compatible)
- Trackpad Module support
- Rotary Encoders
- Buzzer
- Haptics
- Support for through hole and smd profile for diodes
Keeping in consideration the number of digital pins available in XIAO-BLE, I created a key matrix as shown below
With 4 pins for rows and 5 pins for cols, we get a total possible number of 20 keys out of which we are using 19 (18 switches + 1 encoder button) and 2 pins for use with either rotary encoder, oled/trackpad which can be selected by bridging the corresponding jumper on PCB.
The switch footprint is compatible with both MX and Choc based switches which can be used interchangebly.
The PCB contains footprint for OLED 4 pin modules and Trackpad I2C using the pins directly below OLED or the JST 12 pin Connector mounted on PCB.
The PCB is compatible with other pro micro based controllers and could be used in wired configuration as well.
The PCB was created in KiCAD and the routing was done using mix of Autorouting and manual routing.
The final routed PCB looks like this:
And the fabricated PCB:
The PCB is reversible and the side can be identified by jumper name on the PCB. The left half has "Jumper for L" and vice versa for the right side.
Having never used CAD, I searched for OSS CAD software and found FreeCAD and OpenSCAD interesting.
Out of these two, FreeCAD was more suitable for the kind of case design I required and also the ability to import KiCAD files directly was a major plus point. So I followed some tutorials on case design, which was sufficient for me to design my own case.
I decided to use M2 and M3 screw size so that it was easier to mount PCB on case. However, any of these two screw sizes can be used exclusively.
The final case design in FreeCAD looks like this:
The 3D printed case with PLA looks like this:
The case and switchplate was of accurate dimensions and fit the PCB nicely, the friction screw holes are also quite sturdy. The trackpad assembly needs some further modification, which will be done later.
Assembled case:
I have known about ZMK bluetooth keyboard firmware for a long time but haven't used it, so this was a good opportunity to try it on a new design.
The documentation is great and all that was required was to follow the writeup from here top to bottom and it worked after a few iterations.
Currently the firmware has support for keys and encoder. The oled and trackpad firmware support will be added later.
The firmware is available here, the kicad files and stl for case are on this repo.
PCB Fab and Seeed Fusion PCBAThe PCB design along with assembly instructions were sent to the Seeed Fusion. The fusion team were very responsive in pointing out design corrections which I rectified and resent the files. They were also helpful regarding the queries I had about the modification and correction of PCB design.
The finished products were sent within a month and were of of excellent quality. Overall, I had a very good experience using Seeed Fusion PCBA and can wholeheartedly recommend their service.
Comments