Skip to the content
2 layers133.4 × 113.9 mmNukleon Keyboard, the printed circuit board in 3D

Wireless Ergonomic Mechanical Keybard

Size
133.4 × 113.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
87
Nets
90
Pads
912
Tracks, vias
1,752, 114
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
22 Jun 2020
Updated
4 Feb 2021

Overview

Nukleon Keyboard is an open-source printed circuit board by Slavfot, from the Slavfot/gallium-keyboard repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 133.4 × 113.9 mm with 87 parts on 90 nets, routed with 1,752 tracks and 114 vias.

Its parts include 31 diodes and 31 switches. It belongs with the keyboards and input boards of this library.

README

README.md

Gallium Keyboard

The Gallium Keyboard is a Wireless Ergonomical Split Keyboard.

DISCLAIMER

I have a problem with the keyboard that i have opened an issue at the redox Github. https://github.com/mattdibi/redox-keyboard/issues/55 The problem is interference making it hard to use in some environments. I use it daily at work and it works really good except sometimes i have to replug the usb receiver at startup to get a good connection. At home it is almost unusable because of interference. Missing key presses and high latency. I'm trying to solve this and will post an update when i find a stable solution for the wireless communication.

Future

At the moment I'm working on a micro pro version wich will make it possible to use the nice!nano bluetooth module with it instead. My goal is to stock these and sell as kits togehter with 3D printed case. And even aluminium cases in GB.

Summary

Bill of materials

Transmitters
QtyItemNotes
62Cherry MX compatible switches
62Kailh MX hot swap sockets (optional)
2Gallium Wireless PCBs
2YJ-14015 modules (Core51822B clones)aliexpress or ebay
621N4148 diodesSMD 1N4148 SOD-123 diodes can also be used
2Keystone 3034 SMT battery holdersdigikey
2PCM12SMTR SMT slide switchesdigikey
2Right angle 0.1" header (1x4pin)
Receiver
QtyItemNotes
1Redox receiver PCB
1YJ-14015 module (Core51822B clone)aliexpress or ebay
1Arduino 5v 16MHz Pro Micro compatible microcontroller[aliexpress or ebay]
11117 3.3v regulator in SOT223digikey
2330 Ohm 0805(2012 metric) SMD resistorsDefault configuration. Values depends on LED color, see below
2220 Ohm 0805(2012 metric) SMD resistorsDefault configuration. Values depends on LED color, see below
31.5k Ohm 0805(2012 metric) SMD resistorsDefault configuration. See below
1Red 0805(2012 metric) SMD standard LEDDefault configuration.
1Blue 0805(2012 metric) SMD standard LEDDefault configuration.
1Green 0805(2012 metric) SMD standard LEDDefault configuration.
1White 0805(2012 metric) SMD standard LEDDefault configuration.
1Through hole momentary switchDimensions 6mm x 6mm x 4.3mm
1Right angle 0.1" header (1x4pin)
2Straight hot swap 0.1" header (1x6pin)Use wire from diods as legs

:information_source: You can also use the Mitosis receiver since it's almost identical, or you can build a receiver on your own.

:warning: To program the YJ-14015 MCUs you need an ST-Link v2 programmer, these can be found on eBay or Aliexpress for as little as 2$ shipped. See picture below.

Resistor values

If you want to customize your LEDs color or save a few bucks by ordering the LED all the same color you can refer to this section for choosing the correct resistor values. Otherwise you can refer to the default configuration.

There are two sets of resistor that you need for the receiver.

  • The voltage divider resistors (R1, R2 and R3): anything between 1.5k Ohm and 4.7k Ohm is good.
  • The LEDs resistors (R4,R6,R7 and R8): see the following table.
LED colorVfSuggested resistor value
Red1.7V330 Ohm
Yellow2.1V330 Ohm
Blue3.2V220 Ohm
Green2.2V330 Ohm
White3.6V220 Ohm

Depending on the color you choose to use you should use the resistor listed above.

Default configuration

Here you can find the default configuration for the receiver assembly.

LabelComponent
D1Red LED
D2Blue LED
D3Green LED
D4White LED
R4330 Ohm resistor
R6220 Ohm resistor
R7330 Ohm resistor
R8220 Ohm resistor
R11.5k Ohm resistor
R21.5k Ohm resistor
R31.5k Ohm resistor

Transmitters Assembly

Wireless gallium PCBs

Assembly steps:

  • Solder components to PCBs.
    1. Solder slider switch.
    2. Solder the YJ-14015 on the same side as the slider switch.
    3. Solder 1N4148 diodes either SMT or THT (Surface-mount Technology or Through-hole Technology).
    4. Apply insulating tape over the pads surrounding the battery ground pad before soldering the battery holder picture below.
    5. Some solder is needed on the ground pad to contact properly with the battery. See picture below.
    6. Solder the battery holders.
    7. If you use the onboard CR2032 battery holder then bridge the jumper JP_BAT1 to either R or L depending on wich side the battery is located on. See picture below. (This is not needed if you use external battery pinout EXT-BAT)
    8. Solder the programming headers.
    9. (Optional) Solder Kailh Hot Swap Sockets
  • Fit the PCBs inside their cases.
  • Add the switches to the plate.
  • Solder switches to the PCB.
  • Add the CR2032 batteries.
  • Program the MCUs.
  • Close the case.
How i solder surface mount components:

Wet one pad with solder. Position the component and hold the component in place with a tweezer. Heat up the wet pad and let cool, this should fix the component. Re-heat and adjust the position if the component isn't placed perfect. Be sure not to heat to long wich may damage the PCB or the component. Solder the rest of the pads like normal.

Programming headers detail:

Programming headers detail

MCUs detail:

MCUs detail

Slider switch detail:

Slider switch detail

Diodes installation detail:

Diode installation detail

SMT on the left and THT on the right.
Battery holder installation detail:

Battery holder installation detail. Ground pad. Battery holder installation detail. Assembled.

Left and right hand completed assembly:

Left and right hand completed assembly

Assembled PCB:

Wireless Redox assembled PCB

Receiver Assembly

The receiver assembly is pretty straightforward i suggest soldering it in this order:

  1. Solder D1, D2, D3 and D4 LEDs. See image for orientation.
  2. Solder R4, R6, R7 and R8 resistors.
  3. Solder R1, R2 and R3 resistors.
  4. Solder the AMS1117.
  5. Solder the programming headers. I suggest you to cut the excess of the header before soldering the headers. You should stay as flush to the PCB surface as possible since the controller will be soldered above the headers. Use some masking tape to help you keep the header in place while soldering.
  6. Solder the Arduino Pro Micro headers.
  7. Solder the YJ-14015. I suggest you to glue it in place or use some masking tape to help you during soldering.
  8. Solder the reset button.
  9. Upload the firmware and you're done.
Assembled PCB, front:

Assembled receiver PCB, front.

Assembled PCB, back:

Assembled receiver PCB, back.

LEDs installation detail:

Assembled receiver PCB, LEDs installation detail.

:information_source: Please note that here I installed 220 Ohm resistors because I used only blue and white LEDs as I only had those laying around. You should use the resistor values suggested here or follow the default configuration.

Firmware

Basics: The Gallium keyboard works similarly to the Mitosis keyboard: we have two transmitters responsible for scanning the two matrices, which then transmit the matrix status through the Gazel protocol to the receiver. The receiver is another YJ-14015 which receives the two matrix scans and send it through serial to the Arduino Pro Micro. The Pro Micro is responsible for running QMK and converting the bytes received by the YJ-14015 into actual keystrokes.

Firmware sources available here: https://github.com/slavfot/gallium-firmware.

You'll need to upload the firmware to the corresponding MCUs as per the following diagram:

Gallium firmware diagram.

Note that you'll need to upload the firmware for the YJ-14015 only once. Everything related to the keymap is handled by the Arduino Pro Micro and QMK Firmware, that's what you will need to modify to update the keymap.

Step-by-step firmware upload guide

Arduino Pro Micro Firmware upload

Let's start by uploading the QMK firmware on the Arduino, this will help us in diagnosing problems early on. The Gallium uses QMK for its firmware, follow the QMK installation instructions here, then compile and burn the firmware as follows:

sh
$ cd path/to/qmk_firmware
$ make gallium:default:avrdude

You can find the code for the Gallium here: QMK - Gallium Wireless keyboard.

In the Gallium Keyboard firmware repository I added some pre-built hex files with the default keymap for testing purpose.

Nordic MCUs Firmware upload

You'll need only to flash the pre-built .hex files to the corresponding MCUs, for this you'll need an STLinkV2 debugger.

ST-Link v2 programmer

Flashing firmware with Windows

Setup the environment

1. Activate Telnet Client in windows:
  • Open the Control Panel - with View By: Category.
  • Click on Programs.
  • Click on Turn Windows features on or off.
  • Click on the checkbox next to Telnet client.
  • Click OK.
2. Download pre-compiled openOCD

https://freddiechopin.info/en/download/category/4-openocd
Unzip anywhere. But for ease of use in CMD i put it in C:\OpenOCD

Flash with CMD

1. Hook up the receiver/keyboard half

Hook up the ST-Link debugger to the receiver/keyboard board you assembled without the Arduino. You need to connect only the VCC, GND, SWDIO and SWCLK pins of the board like this:

ST-Link DebuggerReceiver board
3.3VVCC
GNDGND
SWCLKSWCLK
SWDIOSWDIO

ST-Link debugger wiring.

Then plug in the ST-Link debugger into your PC.

2. Launch CMD.
3. With terminal commands position the CMD in
text
\openOCD\bin

First make sure you are in the right drive. If you need to change drive then type the drive letter only likes this "d:"
after that you can navigate in that drive.

Commands to navigate with:

  • cd (change directory)
  • cd .. (go back one directory)
  • dir (show all the directorys in the folder you are located in)

Tips: Press the tab button to automaticaly complete the directorys name while typing the cd command.

4. Download Gallium-keyboard repository

Download Gallium-keyboard master zip and unzip anywhere but for ease of use put it in C:
https://github.com/Slavfot/gallium-keyboard/archive/master.zip

5. Launch CMD

Launch an openOCD server session with this command:

sh
openocd -s C:\OpenOCD\scripts\ -f interface/stlink-v2.cfg -f target/nrf51.cfg

This line is written as if the OpenOCD folder is located at C:\
Change accordingly to where you have it located.

It should give you an output ending in:

text
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints

Otherwise you likely have a loose or wrong wire.

6. Launch another CMD window.
7. cd to the location where the hex is located.

Example for the file path if the .hex file is located in C:\Gallium-keyboard\precompiled

/gallium-keyboard/precompiled/

8. Run these commands in the new window, wait for each command to finish until you run the next command.

Connect to the OpenOCD session:

text
telnet localhost 4444

From the factory, these chips need to be erased:

sh
reset halt

nrf51 mass_erase

Write file to wireless-module

Use this command to flash the receiver:

sh
flash write_image /gallium-keyboard/precompiled/precompiled-basic-receiver.hex

For each keyboard half flash with either of these files

sh
flash write_image /gallium-keyboard/precompiled/precompiled-basic-left.hex

or

sh
flash write_image /gallium-keyboard/precompiled/precompiled-basic-right.hex

This is how it should look when you connect to telnet:

flashing-on-windows-1

The whole process should look like this:

flashing-on-windows-2

9. Repeat untill you have flashed all three wireless modules.
10. End openOCD sessionen with ctrl+C in the first CMD window.

Congratulations you have now flashed your Gallium Keyboard!

Firmware upload using Linux

Note: Tested on Ubuntu 16.04 and 18.04 but you should be able to find alternatives on all distros.

Setup
Install OpenOCD (Open On-Chip Debugger)
sh
sudo apt update
sudo apt install openocd
Download the repository

Open a terminal and download this repository wherever you want. We'll need the gallium/firmware folder content.

sh
git clone https://github.com/slavfot/gallium-keyboard.git

or

sh
wget https://github.com/slavfot/gallium-keyboard/archive/master.zip
Install the udev rules
sh
cd path/to/repository/gallium-keyboard/firmware/
sudo cp 49-stlinkv2.rules /etc/udev/rules.d/
Programming the wireless modules Using Linux
Hook up the receiver/keyboard half

Hook up the ST-Link debugger to the receiver/keyboard board you assembled without the Arduino. You need to connect only the VCC, GND, SWDIO and SWCLK pins of the board like this:

ST-Link DebuggerReceiver board
3.3VVCC
GNDGND
SWCLKSWCLK
SWDIOSWDIO

ST-Link debugger wiring.

Then plug in the ST-Link debugger into your PC.

Launch an OpenOCD server session

In a new terminal window launch an OpenOCD server session by issuing the following command:

sh
openocd -s /usr/local/Cellar/open-ocd/0.8.0/share/openocd/scripts/ -f interface/stlink-v2.cfg -f target/nrf51.cfg

This should give the following output:

sh
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints

Leave this terminal window open.

Wireless-module firmware flashing

There are three Wireless modules that need to be flashed with firmware: The receiver, left hand keyboard hand the right hand keyboard.

We can now issue the flashing commands. Open a terminal in the Gallium firmware folder.

sh
cd path/to/repository/gallium-keyboard/firmware/

From the factory, these chips need to be erased:

sh
echo reset halt | telnet localhost 4444
echo nrf51 mass_erase | telnet localhost 4444

You should be seeing some movement in the OpenOCD terminal window, and you desktop should be looking somewhat like this:

Receiver firmware flashing.

Now we can upload the receiver firmware onto the MCU.

sh
echo reset halt | telnet localhost 4444

!Choose one!:
receiver:
echo flash write_image `readlink -f precompiled-basic-receiver.hex` | telnet localhost 4444

Left hand keyboard:
echo flash write_image `readlink -f precompiled-basic-left.hex` | telnet localhost 4444

Right hand keyboard:
echo flash write_image `readlink -f precompiled-basic-right.hex` | telnet localhost 4444

and last:
echo reset | telnet localhost 4444

You should be looking at something like this:

Receiver firmware flashing.

Now close the OpenOCD session (use Ctrl-C) and you're done with the flashing. Repeat these steps for all three modules.

When all three modules have been flash you are done! Congratulations, You flashed the Gallium Keyboard!

Battery usage

mattdibi about the battery consumption:

With a CR2032 with 220mAh we can expect at least 880 hours of continuous typing on the keyboard before needing to change the batteries. Keep in mind that when you're not typing (500ms without key presses is the time interval needed for the keyboard) the transmitters go into deep sleep mode and draw only 2.7uA. So for an everyday use (4 hours a day of continuous typing) you can expect a battery life of at least a year. Obviously your mileage may vary. Source and calculations: https://github.com/mattdibi/redox-keyboard/tree/master/redox-w#battery-usage

Parts

87
QtyValueFootprintReferences
31DAntons_footprints:D_SOD123_axial_both_sidesD0, D1, D2, D10, D11, D12, D13, D14, D15, D16, D20, D21, D22, D23, D24, D25 +15
27KEYSWAntons_footprints:SW_Cherry_MX_1.00u_PCB_Hot_Swap_OptionalK0, K1, K2, K10, K11, K12, K13, K14, K15, K16, K20, K21, K22, K23, K24, K25 +11
9MountingHoleMountingHole:MountingHole_2.2mm_M2_ISO7380_PadH1, H2, H3, H4, H5, H9, H10, H12, H14
5MountingHoleAntons_footprints:Thru_hole_for_M2_standoff_spaceH6, H7, H8, H11, H13
4KEYSWAntons_footprints:PG1350_socket_reversible_MX_HoltiteK43, K44, K45, K46
2Conn_01x02Antons_footprints:PinHeader_1x02_P2.54mm_Horizontal_double_sideEXT_BAT1, EXT_SW1
2SW_SPDTAntons_footprints:SW_SPDT_PCM12SW_L1, SW_R1
2YJ-14015Antons_footprints:MY-YJ-14015-ModuleU_LEFT1, U_RIGHT1
1
1Battery_CellAntons_footprints:BatteryHolder_Keystone_3034_1x20mm_rightBT_RIGHT1
1Battery_CellAntons_footprints:BatteryHolder_Keystone_3034_1x20mm_leftBT_LEFT1
1Conn_01x04_MaleConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_HorizontalJ_PROG_PORT1
1SolderJumper_3_OpenJumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabelsJP_BAT1

Similar boards

  • 2 layers175.8 × 184.8 mmSofleKeyboard, the printed circuit board in 3D

    SofleKeyboard

    josefadamcik/SofleKeyboard

    A split keyboard based on Lily58, Crkbd and Helix keyboards

    87 parts2.6k
  • 2 layers58.2 × 38.1 mmUsb sniffer, the printed circuit board in 3D

    Usb sniffer

    ataradov/usb-sniffer

    Low-cost LS/FS/HS USB sniffer with Wireshark interface

    87 parts1.3kBSD-3-Clause
  • 2 layers65 × 56 mmHat, the printed circuit board in 3D

    Hat

    pa3gsb/Radioberry-2.x

    Ham Radio hat for Raspberry PI

    87 parts678
  • 2 layers57 × 111 mmSIM POWER PANEL, the printed circuit board in 3D

    SIM POWER PANEL

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    87 parts431
  • 2 layers128.2 × 150.3 mmSplit 3x, the printed circuit board in 3D

    Split 3x

    MangoIV/dracuLad

    QMK-powered 34-36 key split keyboard

    87 parts230
  • 2 layers88.9 × 80 mmEdk, the printed circuit board in 3D

    Edk

    ciaa/Hardware

    Hardware de la CIAA

    87 parts216
  • 2 layers68.6 × 53.3 mmArduino UNO R4 Minima, the printed circuit board in 3D

    Arduino UNO R4 Minima

    sabogalc/KiCad-Arduino-Boards

    A collection of Arduino boards recreated from scratch in KiCad. Legacy USB connectors have been replaced with USB-C where applicable.

    87 parts95WTFPL

Questions

How big is the Nukleon Keyboard PCB?

It measures 133.4 × 113.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Nukleon Keyboard use?

87 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Nukleon Keyboard KiCad files?

From the Slavfot/gallium-keyboard repository on GitHub, at the commit this page was made from: the board is Kicad Files/0.1/Nukleon Keyboard.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Nukleon Keyboard design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).