m4 2x2 in lego¶
an ortholinear keyboard set in lego 2x2 with optional encoder and oled. this uses seed studio xiao rp2040 or seed studio xiao nrf52840... these are test beds for something else. xiao boards are nice since they are small but the do not have a lot of pins... so i used two chained shift registers for columns... this is simply a playground for porting the 5x13 to xiao. Another consequence since qmk does not support xiao yet, firmware is zmk.
in the xiao family there are other boards samd21, sense and esp32c3... I do not have them so I did not test them that means they may work or not. Feel free to send me one of them if you want me to test.
this is part of a bigger family of ortholinear keyboards in lego see for reference https://mlego.elena.space
Please note that I am aware of the xiao contest for mechanical keyboards and their fusion pcb assembly service. while none was used for this project, seeed studio kindly agreed to sponsor 5x13 version with pcbs and MCUs.
status: all ok
- gerbers designed
- breadboard tested
- gerbers printed
- board tested
- 1 encoder, optional
- oled, optional
- 5 pins
- seeduino xiao nrf52840 or xiao rp2040, others too probably but not tested
- firmware zmk
- kicad pcb
- 1 seeed studio xiao nrf52840 or seeed studio xiao rp2040 pins
- 4 signal diodes 1N4148 , do 35 or sod-123
- 1 encoders
- 2x7 pin DIL/DIP sockets whatever you prefer
- 2x7 pin male headers, rounded or straight to match the socket
- 5 pin MX switches 4
- 2 HC595 shift registers... surface mount
- lego 8x12 plate for bottom, and bricks as you please
lego... 8x12 for plate... you can use 2x(4x12) plates with the normal legos as described here
case information can be found here
this is a very rushed assembly guide but shall give you the main idea.
gerbers ready to be printed at jlcpcb are available
at the moment only zmk.
source available here
source available here
since rp2040 is supported in qmk
source is here to build it, just follow
git clone --recurse-submodules -b mlego https://github.com/alinelena/qmk_firmware.git qmk-alin cd qmk-alin qmk compile -kb mlego/m4/rev2 -km default #or make mlego/m4/rev2:default # copy the resulting uf2 on the mcu as per instructions.
rows: 1 - D0, 4 - D3
c0: shift register 1 - QA
- c1: shift register 2 - QA
** 74HC595N **
- data: 11 - D10
- latch: 8 - D7
- clock: 9 - D8
- Pad_A: 2 - D1
- Pad_B: 3 - D2
- SDA: 5 -D4
- SCL/SCK: 6 - D5