This is rev4.1 of the Flatbox. In this version the PCB includes the microcontroller - everything is built in, you only have to add the switches (and flash the firmware). It has a USB Type A host port that you can use to plug in authentication dongles or other devices if the firmware you use supports that.
There are two variants of the case, version A uses flaps for the option buttons, version B has holes so that you can use buttoncaps on the tact switches:
To make one you will need:
- 3D printed case parts - top and bottom
- the PCB
- 12x Kailh low profile (choc v1) switches of your choice
- (optionally) 12x Kailh low profile hotswap sockets
- buttoncaps for the action buttons, either 3D printed or (preferably) injection molded (make sure they're the correct size: 22.5mm and 28.5mm)
- for case variant A:
- 6x 6x6x5mm tact switches
- for case variant B:
- 6x 6x6x7mm tact switches
- 6x silicone buttoncaps (like these or search for "silicone button caps" on AliExpress; or you can use other caps as long as they fit, the hole diameter is 7.5mm)
- 7x M3x6 flat head (countersunk) screws
- 5x M2x4 screws to secure the PCB to the case
- some kind of rubber feet or non-slip padding for the bottom
- a soldering iron
I printed the case at 0.20mm layer height. The top part should be printed upside-down, the bottom part should be printed as-is. They don't require supports.
I used JLCPCB to make the PCB and assemble the SMD parts. The included files can be used with JLCPCB directly. If you want to use some other service, check the file formats that they expect. When ordering from JLCPCB, upload the Gerber zip, leave all the settings at default (you can choose the PCB color), then enable "PCB Assembly" and upload the BOM and CPL files in the next step. PCB thickness should be 1.6mm.
The PCB you get from JLCPCB will look something like this:
The switches can be soldered in directly to the PCB or you can use hotswap sockets.
For the firmware you probably want to use GP2040-CE. Go to the GP2040-CE downloads page and get the UF2 file for Flatbox rev4.
To flash the firmware, connect the PCB to a computer with a USB cable, then press the RESET button while holding the BOOT button on the PCB. A drive named "RPI-RP2" should appear. Copy the UF2 file you downloaded to that drive. That's it.
(Of course you can also use any other RP2040-compatible firmware if you want.)
If you want to use the USB host port and you need to configure it in your firmware, D+ is connected to GPIO20 and D- to GPIO21.
If you want to modify the case or the PCB, check out the files in the extras folder.
PCB design licensed under CC BY-SA 4.0.
PCB design uses the following libraries:
- keyswitches.pretty by daprice (CC BY-SA 4.0)
- Type-C.pretty by ai03-2725
- RP2040 library from the minimal design example from the Hardware design with RP2040 document