- Soldering iron. Conical tip is recommended.
- Solder wire. Thin solder wire with less than 0.03 inch diameter is recommended.
- Tweezer.
- Wire cutter to remove diode pins.
- Tape or hot glue gun.
- Key switches.
- Key caps.
- Stablizers.
- Diodes
- Hotswap sockets
- Resisters
- Capacitors
- Pi Pico
- 5 pin female header + DIP swtich + slide switch
- Rotary encoder
- Pi Zero + 2x20 pin header
-
Secure Pi Zero to the PCB using two pairs of male-female and female-female standoffs, as such:
-
Tape down the pin header
You can also use hot glue. Just be careful not to cover the small components on Pi Zero. Remove the tape when soldering the pins it covers. The pins can conduct the heat and melt the tape.
-
Solder the pin with the keyboard PCB and the Pi Zero:
Bring in the soldering iron vertically, and press the tip againt the pin, the keyboard PCB and the Pi Zero PCB. Hold for half a second to a second to heat up the pads. Then feed in the solder wire from the left, touching the pin and the pads:
Tip: use thin solder wire with less than 0.03 inch diameter.
-
Remove the standoffs.
Make sure the cathode band is aligned with the square pad:
-
Tin one of the pads:
-
Place the socket, and solder the tinned pin:
Place the tip of the soldering iron as shown and press down. You might also want to use a tweezer to press down on the other pin.
-
Solder the other pin.
The process is similar to the hotswap socket. Capacitor doesn't have any polarity.
- Tin one of the pads.
- Use the tip of the soldering iron to melt the tin, and slide in the capacitor.
- Solder the other end.
This video is a nice demonstrateion.
Install the standoffs to the bottom panel. All the screws used here are M2.5x5mm. There are 7 M2.5x5 male-female standoffs for the top part of the panel, and 7 M2.5x5 female-female standoffs for the lower part. There's 1 M2.5x10mm standoff at the very bottom.
Align the PCB to the standoffs.
Screw down the PCB with 7 M2.5x4mm screws.
Install the top bar standoffs with 7 M2.5x6mm standoffs. For the ones not over the Pi Zero, add a 1.5mm washer.
Install the top bar and the plate.
Tip: Add the switches, at least the ones on the edge, to the plate before installing the plate.
Install build dependencies:
Arch Linux:
pacman -S git cmake arm-none-eabi-gcc
For other distros or OS, see https://github.com/zli117/PicoMK#get-the-code
Check out the code:
git clone https://github.com/zli117/PicoMK.git
cd PicoMK
git submodule update --init && git -C pico-sdk submodule update --init
The hardware configuration for this keyboard is defined in configs/cyberkeeb_2040
dir in PicoMK
. You can take a look at the layout.cc
for the details on the keymap.
Build the firmware:
mkdir build
cd build
cmake -DBOARD_CONFIG=cyberkeeb_2040 ..
make -j 4
If successful, you can find the firmware.uf2
file in the build dir. Now, hold down the flash button on the Pico and plug it in. It will show up as a USB drive. Just copy the firmware.uf2
file to the drive.
To send the keycodes to the Pi Zero, a kernel module is needed on the Pi Zero side, as it uses a custom protocol defined over SPI.
For this you'll need an external keyboard.
- Install kernel headers:
sudo apt install raspberrypi-kernel-headers
- Checkout PicoMK
git clone https://github.com/zli117/PicoMK.git
. - Build the driver and device tree overlay:
cd PicoMK/linux
make -j
make device_tree
- Install the driver:
sudo -E make install
sudo depmod -a
- Copy over the device tree overlay:
sudo cp spi1-picomk.dtbo /boot/overlays
. - Add this line to the
/boot/config.txt
. Make sure SPI1 is not enabled.
dtoverlay=spi1-picomk
- Add this line to the
/etc/modules
file:
spi_picomk
If you update the Raspberry Pi OS, especially with kernel updates, you'll need to rebuild the kernel module (rerun step 4).
If you want to use the 3.5 inch GPIO TFT screen, and you're on Pi Zero, install the driver from https://github.com/juj/fbcp-ili9341. If you're on Pi Zero 2, install the driver from https://github.com/goodtft/LCD-show.