Skip to the content
2 layers96 × 74 mmMacroController, the printed circuit board in 3D

Custom nRF52840 productivity controller for digital artists — PCB, BLE/USB firmware, OLED, haptics, RGB, and enclosure CAD.

Size
96 × 74 mm
Copper layers
2
Thickness
1.6 mm
Parts
78
Nets
97
Pads
340
Tracks, vias
460, 90
Pours
17
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
11 Aug 2026
Updated
13 Aug 2026

Overview

MacroController is an open-source printed circuit board by alex1klimovich, from the alex1klimovich/nrf52840-macro-controller repository on GitHub. It is a 2-layer board of 96 × 74 mm with 78 parts on 97 nets, routed with 460 tracks and 90 vias.

It is built around the MDBT50Q-1MV2, DRV2605LDGS and MT3608, with the TP4056-42-ESOP8, 1N4148WT and SK6812MINI-E among its other parts. Its parts include 19 diodes, 14 capacitors, 14 resistors, 13 switches and 4 ICs. It belongs with the radio and wireless and lEDs and displays boards and the nRF52 and nRF5x boards of this library.

Main components

12

README

README.md

nRF52840 Productivity Controller for Digital Artists

A custom wireless/wired productivity controller designed for digital artists who repeatedly use keyboard shortcuts, brush controls, tool switching, and other workflow actions.

I designed the PCB, wrote the firmware, brought up the first board, and modeled the enclosure. The current prototype combines an nRF52840 module, eight hot-swap mechanical keys, a rotary encoder, OLED interface, per-key RGB, haptic feedback, battery monitoring, and USB/Bluetooth HID.

The goal is to make frequently used creative controls accessible through a compact physical interface that can be customized for different applications and workflows.

Working exposed prototype with illuminated keys and OLED UI

Design goal

The controller was designed around the workflow of digital artists rather than as a generic macro pad.

Creative applications often require repeated keyboard shortcuts and parameter adjustments while the user's other hand remains focused on a mouse, stylus, or drawing tablet. The controller provides a compact set of tactile, programmable inputs intended to reduce those repetitive interactions.

The rotary encoder is suited to continuously adjusted parameters such as brush size, zoom, timeline position, or other application-specific controls. The mechanical keys can be assigned to frequently used tools, shortcuts, and multi-step actions.

Multiple profiles and three remembered Bluetooth hosts allow the same hardware to adapt to different applications and devices without rebuilding the firmware for each workflow.

Prototype user testing

The current prototype is being evaluated by an animation student at San José State University as an early real-world user.

Testing is focused on:

  • Control placement and ergonomics
  • Which actions are most useful on physical keys versus the rotary encoder
  • Workflow interruption when moving between a keyboard, drawing tablet, and controller
  • Profile and shortcut organization
  • Enclosure size and physical accessibility
  • Feedback from the OLED, RGB indicators, and haptics

Feedback from this testing is being used to guide revisions to the control layout, enclosure, and software configuration experience. This is an ongoing prototype rather than a finished commercial product; the purpose of the testing stage is to identify usability problems before another hardware revision.

What is in the prototype

  • Product requirements translated into custom electronics, firmware behavior, and mechanical constraints
  • A two-layer embedded system: custom hardware plus event-driven C++ firmware
  • USB and BLE HID routing with three remembered Bluetooth slots
  • A 2×4 key matrix, dual-role tap/hold actions, macros, media keys, mouse actions, and MIDI actions
  • Profile and settings persistence in internal flash using JSON
  • Rotary-encoder acceleration and multiple encoder modes per profile
  • An SSD1306 interface for profiles, settings, pairing, and battery state
  • DRV2605L haptics, eight addressable LEDs, LiPo charging, and VBUS sensing
  • A browser-based serial configuration interface in firmware/NRFMacroController/site.html

System architecture

mermaid
flowchart LR
    A["2×4 key matrix"] --> I["InputEngine"]
    B["Encoder + side buttons"] --> I
    I --> Q["RTOS event queue"]
    Q --> S["StateManager"]
    S --> F["LittleFS profiles + settings"]
    Q --> O["OutputEngine"]
    O --> U["USB HID"]
    O --> L["BLE HID"]
    O --> H["DRV2605L haptics"]
    S --> D["OLED + RGB UI"]
    C["Browser configurator"] <--> S

Hardware

The PCB is built around a Raytac MDBT50Q nRF52840 module and includes:

  • Eight Kailh hot-swap switch sockets and SK6812-compatible LEDs
  • EC11 rotary encoder and two side buttons
  • USB-C, battery connector, charging and power circuitry, and test points
  • OLED and haptic-driver connections on I²C
  • Battery-level and VBUS-sense inputs for power-aware UI behavior

Populated custom PCB

Current nRF52840 schematic

The schematic below is exported from the checked-in KiCad source. It shows the Raytac MDBT50Q nRF52840 module, USB interface, battery charging and protection, haptic driver, key matrix, RGB LEDs, OLED I²C interface, rotary encoder, and side buttons.

nRF52840 controller schematic

The original project directory retained an older ESP32_MCU-KEYBOARD_1.0 filename, but the current electrical design is the nRF52840 board shown above. The repository uses the clearer MacroController filenames for the editable KiCad sources.

Firmware

The firmware separates input scanning, persistent state, output routing, and UI work. Input events move through an RTOS queue, while the state manager owns profiles and settings and the output engine handles HID, BLE, and haptic behavior.

Implemented behavior includes:

  • USB and Bluetooth keyboard, mouse, media, and MIDI actions
  • Tap/hold layers and macros with up to eight steps
  • Profile discovery and JSON persistence in internal flash
  • Three Bluetooth device slots with pairing and bond management
  • Encoder modes with pace-based acceleration
  • OLED menus, profile carousel, pairing UI, and battery display
  • Configurable RGB feedback, haptic strength, OS mode, and low-power behavior

Build

The checked-in firmware was compiled with Arduino CLI, Seeed nRF52 core 1.1.12, and the xiaonRF52840 target used by this project. The installed variant needs the low-frequency crystal selection supplied explicitly:

bash
arduino-cli compile \
  --fqbn Seeeduino:nrf52:xiaonRF52840 \
  --build-property 'compiler.c.extra_flags=-DUSE_LFXO' \
  --build-property 'compiler.cpp.extra_flags=-DUSE_LFXO' \
  firmware/NRFMacroController

Verified build: 223,536 bytes of flash (27%) and 21,572 bytes of RAM (9%).

Required Arduino libraries include Adafruit TinyUSB, Adafruit Bluefruit nRF52, Adafruit GFX, Adafruit SSD1306, Adafruit NeoPixel, Adafruit DRV2605, ArduinoJson, and RotaryEncoder.

PCB and manufacturing

The repository includes editable KiCad schematic and board sources as well as the fabrication package used for the prototype: Gerbers, BOM, and component placement data.

Current nRF52840 top assemblyCurrent nRF52840 bottom assembly
Top assembly view with encoder, OLED, and eight switchesBottom assembly view with Raytac module, USB-C, power circuitry, RGB LEDs, and hot-swap sockets
Front copper and placementBack copper and placement
Front routing viewBack routing view

Before ordering another revision, KiCad ERC/DRC should be rerun and the generated manufacturing files reviewed against the selected component revisions. A historical DRC report was intentionally omitted because it predates the latest board edit and is not evidence of the current design state.

Mechanical design

The mechanical folder contains the Blender enclosure model and STEP assembly developed around the PCB, switches, encoder, display, and connector access. The photographed unit is an exposed functional prototype; the current enclosure CAD has not yet been integrated into the pictured test unit.

Enclosure CAD around the current nRF52840 PCB assembly

Hardware bring-up and debugging

The custom board did not initially produce the expected MCU response during bring-up. Debugging required revisiting both the programming assumptions and the boundary between the board design and its firmware/toolchain configuration.

The recovery process included:

  1. Checking the programming and firmware assumptions rather than treating the board as a known-good development kit.
  2. Using a Raspberry Pi Zero as a temporary programming/debugging tool for the custom hardware.
  3. Correcting the board/toolchain configuration used for the nRF52840 target.
  4. Verifying the physical-to-firmware pin mapping for the key matrix and peripherals.
  5. Bringing subsystems up incrementally before exercising the complete interface.

That process led to successful firmware execution on the custom board and informed the explicit pin map and build configuration now documented in the repository.

Engineering status

The photographed board is a functional exposed prototype. Input scanning, OLED UI, LEDs, haptics, USB/BLE routing, persistent profiles, and device switching are implemented in the published firmware.

Current work is focused on findings from digital-art workflow testing, enclosure integration, and a simpler configuration experience. I have not recorded a workflow video yet, so the repository shows the hardware, source, and verified build without presenting a staged demo as completed testing.

Bluetooth device-selection screen

Repository map

PathContents
firmware/nRF52840 Arduino firmware and browser configurator
hardware/kicad/KiCad schematic, PCB, local footprints, and board STEP export
hardware/production/Fabrication Gerbers, BOM, and component placement file
mechanical/Blender enclosure model and STEP assembly
docs/images/Prototype photos, current nRF52840 schematic preview, PCB views, and enclosure CAD
docs/schematics/Readable PDF export of the current nRF52840 schematic

Use

This is a personal hardware project. No license is granted for commercial manufacture or redistribution.

Parts

78
QtyValueFootprintReferences
81N4148WTDiode_SMD:D_SOD-323D4, D5, D6, D7, D8, D9, D10, D11
8Kailh Hotswap Switchkeyswitches.pretty-2.1:Kailh_socket_PG1350SW1, SW2, SW3, SW4, SW5, SW6, SW7, SW8
8SK6812MINI-EPCM_marbastlib-various:LED_6028RLED1, LED2, LED3, LED4, LED5, LED6, LED7, LED8
41uFCapacitor_SMD:C_0402_1005MetricC1, C7, C11, C20
4Hole_PadMountingHole:MountingHole_3.2mm_M3_DIN965_PadH1, H2, H3, H4
3100nFCapacitor_SMD:C_0402_1005MetricC2, C6, C15
310KResistor_SMD:R_0805_2012MetricR4, R5, R10
322uFCapacitor_SMD:C_1206_3216MetricC4, C8, C10
35K1Resistor_SMD:R_0805_2012MetricR1, R2, R22
2100k 1%Resistor_SMD:R_1206_3216MetricR11, R12
24K7Resistor_SMD:R_0805_2012MetricR29, R30
2PolyfuseFuse:Fuse_1206_3216MetricF1, F3
2SS34Diode_SMD:D_SOD-123D1, D3
2SW_PushButton_Switch_THT:SW_PUSH_6mm_H4.3mmSW12, SW13
2TestPointTestPoint:TestPoint_Pad_1.5x1.5mmTP1, TP2
110nFCapacitor_SMD:C_0402_1005MetricC17
110uFCapacitor_SMD:C_0603_1608MetricC5
11K2Resistor_SMD:R_0805_2012MetricR8
11MResistor_SMD:R_0805_2012MetricR24
11nFCapacitor_SMD:C_0603_1608MetricC18
1220RResistor_SMD:R_0805_2012MetricR23
122uH 2AInductor_SMD:L_Sunlord_SWPA6045SL2
133KResistor_SMD:R_0805_2012MetricR21
14.7uFCapacitor_SMD:C_0805_2012MetricC3
1BLM21PG221Ferrite_SMD_AKL:Ferrite_0805_2012MetricFB1
1Conn_01x02Connector_JST:JST_PH_B2B-PH-K_1x02_P2.00mm_VerticalJ5
1Conn_01x02_PinConnector_Wire:SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mmJ2
1Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3
1DRV2605LDGSPackage_SO:VSSOP-10_3x3mm_P0.5mmU2
1ENButton_Switch_SMD:SW_Push_SPST_NO_Alps_SKRKSW10
1MDBT50Q-1MV2RF_Module:Raytac_MDBT50QU3
1MT3608Package_TO_SOT_SMD:SOT-23-6U16
1PESD5V0L4UGPackage_TO_SOT_SMD:SOT-353_SC-70-5D12
1RotaryEncoder_SwitchKeebio-Parts:RotaryEncoder_EC11SW11
1SW_SPDTButton_Switch_THT:SW_Slide_SPDT_Angled_CK_OS102011MA1QSW9
1TP4056-42-ESOP8Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalViasU5
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_G-Switch_GT-USB-7010ASVJ1

Similar boards

  • 4 layers78 × 89 mmZbook, the printed circuit board in 3D

    Zbook

    VinnieT1/zbook

    170 parts
  • 2 layers135.3 × 78.4 mmMseq, the printed circuit board in 3D

    Mseq

    MF-Room/mseq_pcb

    KiCad 10 hardware design for MSeq embedded, the microcontroller implementation of the MSeq MIDI sequencer.

    93 parts1CERN-OHL-S-2.0
  • 4 layers62 × 49.8 mmIsoSwitch, the printed circuit board in 3D

    IsoSwitch

    lilltroll77/IsoSwitch

    Globally scalable mesh networking

    133 partsGPL-3.0
  • 2 layers104 × 66 mmVallox rs485-controller, the printed circuit board in 3D

    Vallox rs485-controller

    Miroeilola/vallox-rs485-controller

    Replacement control panel for legacy Vallox SE ventilation units. Vallox DIGIT RS-485 protocol, bus-powered, ESP32, Home Assistant.

    65 parts
  • 2 layers33 × 12.5 mmUSB PD CH224K, the printed circuit board in 3D

    USB PD CH224K

    zOnlyKroks/pcb-consortium

    21 partsCC0-1.0
  • 4 layers52 × 74 mmFRC Sensor CAN, the printed circuit board in 3D

    FRC Sensor CAN

    barkinvar/sugerCANe

    A compact interface for three NPN, PNP or logic sensors on an FRC robot. Each port has a removable 5 V / 12 V power jumper; input type is configured in software.

    144 parts1
  • 4 layers60 × 110 mmNucula v2, the printed circuit board in 3D

    Nucula v2

    zeugmaster/nucula-board

    Nucula Board: an ESP32-C3 hardware prototype with USB-C, PN7160 NFC, OLED and detachable keyboard. KiCad sources and manufacturing files.

    138 parts1CERN-OHL-S-2.0
  • 4 layers150 × 100 mmPower profiler carrier, the printed circuit board in 3D

    Power profiler carrier

    Guiimartinho/open-power-profiler

    Open-source PPK2-class power profiler built on the Raspberry Pi Pico 2: 100 kSPS, 100 nA to 1 A auto-ranging, source meter and ampere meter modes, USB stream.

    425 partsMIT

Questions

How big is the MacroController PCB?

It measures 96 × 74 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MacroController use?

78 parts, built around the MDBT50Q-1MV2, DRV2605LDGS, MT3608 and TP4056-42-ESOP8. 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 MacroController KiCad files?

From the alex1klimovich/nrf52840-macro-controller repository on GitHub, at the commit this page was made from: the board is hardware/kicad/MacroController.kicad_pcb and its schematic hardware/kicad/MacroController.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MacroController design in my own project?

Its repository states no licence, so its author keeps all rights: ask alex1klimovich before reusing the design.