Skip to main content
Version: FILS English

Custom Handwired Rust-BLE Keyboard

A fully custom, 3D-printed, Bluetooth split mechanical keyboard built without a PCB.

info

Author: Constantin Eduard-Andrei
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-Edward-game-scr

Description

This project is a custom-built, wireless split mechanical keyboard based on the ergonomic Corne physical layout. To maximize hardware complexity and avoid prebuilt kits, the keyboard uses no PCB; instead, the switch matrix is entirely handwired. The core of the project is writing a custom embedded Rust firmware from scratch using the embassy-rs framework to handle matrix scanning, key debouncing, and Bluetooth Low Energy (BLE) communication.

Motivation

I chose this project to gain deep, hands-on experience with both bare-metal electronics and modern embedded software. On the hardware side, handwiring the diode matrix forces a complete understanding of how electrical grids operate. On the software side, writing the firmware in Rust provides the opportunity to learn embassy-rs for asynchronous embedded programming and to understand how to implement a BLE HID (Human Interface Device) stack from the ground up. Also I want to some watch movies in the summer on my tv and I need a keyboard to type on the internet so that the search is way faster.

Architecture

  • The system architecture consists of a custom electrical matrix and an asynchronous Rust software stack.

  • The Hardware Matrix: 42 mechanical switches are handwired into a matrix of Rows and Columns. Diodes are soldered to each switch to prevent electrical "ghosting" when multiple keys are pressed.

  • The Microcontroller: An NRF52840 development board acts as the central brain, connected to the matrix rows and columns via its GPIO pins. It is powered by a 3.7V LiPo battery.

  • The Rust Firmware: The software utilizes embassy-rs for async execution. A polling task continuously scans the GPIO matrix to detect state changes.

  • Bluetooth Communication: Using the nrf-softdevice crate, the microcontroller advertises itself as a BLE Keyboard and transmits the processed keystroke data over the air to a host computer.

Log

Week 5 - 11 May

Finalized component research and ordered all necessary hardware (microcontrollers, switches, batteries, keycaps) -> Waiting for their delievery.

Week 12 - 18 May

Week 19 - 25 May

Hardware

The hardware relies on a 3D-printed chassis to hold the switches, eliminating the need for a PCB. The logic is handled by NRF52840 chips due to their low power consumption and excellent Bluetooth capabilities.

Schematics

KiCad

Bill of Materials

DeviceUsagePrice
SuperMini NRF52840The microcontroller45 RON
Liter Energy 120mAh 3.7V LiPo (401230)Power supply100 RON
Gateron Milky Yellow ProMechanical linear keyboard switches125 RON
1N4148 High-speed DiodesPrevents "ghosting" in the keyboard matrix16 RON
24AWG Solid Core Copper WireRouting the rows and columns24 RON
PBT XDA Blank 1U KeycapsThe physical key profiles58 RON
SS12F15VG4 4MM Slide SwitchesPhysical power toggle for the batteries36 RON

Software

LibraryDescriptionUsage
embassy-rsAsync embedded framework for RustThe core framework used to run asynchronous tasks (like matrix scanning and Bluetooth handling) without blocking the CPU
embassy-nrfHardware Abstraction Layer (HAL)Used to safely interact with the NRF52840's physical GPIO pins and timers
nrf-softdeviceRust bindings for Nordic's Bluetooth stackUsed to configure the BLE radio and implement the HID protocol to talk to the PC
defmtHighly efficient logging frameworkUsed for debugging the matrix scanning logic over a USB connection
  1. Embassy-rs Documentation
  2. Rust Embedded Book
  3. NRF52840 Product Specification