Skip to content

MacroBoard – Design and Assembly

  • PROJECT

On early July Seeed Studio launched the Seeed Fusion DIY XIAO Mechanical Keyboard Contest, the main goal of the contest is to allow people to design and assembly their own mechanical keyboards using the PCB manufacturing and assembly service provided by Seeed Studio. They also want people to use any of their XIAO boards (SAMD21, RP2040, nRF52840 and ESP32C3) in the design. Without hesitation I started to gather information about the keyboards, and to evaluate the right microcontroller for the task. Instead of thinking about a complex full keyboard, I just wanted to make something with a few keys that would work as a macropad with some key combinations.

The design is a PCB that uses the XIAO RP2040, this board is based on the Raspberry Pi’s microcontroller; the circuit has nine MX keys, the keys are arranged as a 3×3 matrix and allowed me to save some IO pins to setup more functions on the keyboard. The design includes a rotary encoder that could be used for volume control. Each key is backlit with a WS2812 RGB LED. Having in mind that there are many switch types, and that each type fit to personal preferences, I decided to use hot-swap sockets instead of soldering the switches directly onto the board. I also added the design of some Truchet tiles to the board.

The instructions of the contest mention that I should generate the Gerber files for manufacturing, also other assembly files with the position of the components and the BOM to assemble the board. Once I generated all the files I uploaded everything on the Seeed Studio Fusion webpage; when I got the confirmation that the files were reviewed I sent an email to Seeed Studio’s support to let them know about the order. Then Seeed Studio’s support sent me a discount coupon for the whole price of the PCBs and the assembly, so the PCBs and the assembly would be free of charge. It’s important to clarify some things, for the PCB assembly, Seeed Studio recommend using the parts from the Open Parts Library as these parts could be sourced in short time, improving the assembly times. Particularly, on my design I used the SK6812 MINI-E LEDs for reverse mounting, but the LEDs aren’t on the Open Parts Library. So, with the part number and reference PDF, the people from Seeed Studio found and added the parts to the assembly. Another important thing to clarify is that even if 10 PCBs are manufactured, only two copies will be assembled for free, the other PCBs will arrive without parts.

While I was waiting for the PCBs to be manufactured, assembled and to arrive at my home, I ordered the other parts hoping they arrive on time to finish the keyboard assembly. The switches, keycaps and hot-swap sockets were difficult to get on small quantities. I leave some links that may be useful if someone wants the get the parts.

During that waiting time I also worked on the design of a case for the keyboard. Using Eagle’s tool to generate and export 3D models from the circuits, I exported the design to Fusion 360, and started working on a case using the PCB model as the starting point. The case has a base where the PCB can be fixed using 3mm screws, the base also includes a hole for the XIAO’s USB C port and two small holes to press the RESET and BOOT buttons. The case’s cover has the holes to pressure fit the switches, and to protect the keyboard internals from dust or any other small objects that could damage it. The parts were 3D printed in resin, which gives they a better resolution, a better finish, and the option to make transparent cases to show the circuit and the RGB LEDs.

Fortunately, the PCBs, switches, and printed parts arrived on time. I was impressed by the quality and detail of the assembled PCBs. After soldering the hot-swap switches, and the encoder, I tested the keyboard. I plugged the XIAO RP2040 to the computer and downloaded a basic MicroPython program to turn on the LEDs and to detect the key presses.

After checking that the circuit was working fine, I fixed it on the 3D printed base being careful to not break the resin while putting the screws. Then I placed the cover and started to press fit the switches, making sure the pins made contact with the hot-swap switches. The base and the cover aren’t fixed directly with screws or something similar but by pressure between the two pieces and the switches connections. The rest of the project is about writing the final program for the XIAO RP2040 and setting up the function of each key.

The schematic, 3D models, firmware and other project files can be found on the GitHub repository.

GitHub: MacroBoard

More information:
Seeed Fusion DIY XIAO Mechanical Keyboard Contest
Seeed Studio XIAO Series
Seeed Studio XIAO RP2040 – Wiki

If you have any question, feel free to ask.

📢 This post is an entry for the Seeed Fusion DIY XIAO Mechanical Keyboard Contest and is partially sponsored by Seeed Studio.

Leave a Reply

%d bloggers like this: