Skip to the content
4 layers38 × 36.2 mmPen mixer, the printed circuit board in 3D

Pen-mounted motion controller: prototype and production firmware, laptop audio stack, and the production PCB as a KiCad project

Size
38 × 36.2 mm
Copper layers
4
Thickness
0.8 mm
Parts
32
Nets
18
Pads
182
Tracks, vias
377, 28
Pours
5
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
29 Aug 2026
Updated
28 Sep 2026

Overview

Pen mixer is an open-source printed circuit board by Brillar0101, from the Brillar0101/pen-mixer repository on GitHub, published under the MIT licence. It is a 4-layer board of 38 × 36.2 mm with 32 parts on 18 nets, routed with 377 tracks and 28 vias.

It is built around the ISP1807-LR-RS, LSM6DS3TR-C and MCP73831T-2ACI/OT-HXY, with the TPS7A0533PDBV and EVQP7C01P among its other parts. Its parts include 10 capacitors, 8 resistors, 4 ICs, 3 diodes and 2 connectors. It belongs with the audio and music and computers and single-board computers boards of this library.

Main components

5

README

README.md

Pen Mixer

Pen Mixer is a small motion controller that clips onto the top of an ordinary pen and turns handwriting gestures into live audio control. An IMU on the board reads tilt and twist, an nRF52840 sends the motion to a laptop over Bluetooth, and the laptop shapes whatever track is playing: tilt the pen and a filter sweeps, twist it and the level moves. The better your pen control gets, the better your mix sounds.

Pen Mixer v2.1 in its clear case, from five angles

The v2.1 board (13 × 35 mm) in its clear case

This repo holds the whole project: prototype firmware, production firmware and laptop stack, and the production PCB as a KiCad project.

mermaid
flowchart LR
    HAND["Hand<br>tilt, twist"] --> FW

    subgraph pen["Pen Mixer board: on the pen"]
        FW["LSM6DS3TR-C IMU<br>+ ISP1807 nRF52840"]
    end

    FW -->|"BLE, Nordic UART"| BR
    FW -.->|"USB-C, serial"| BR

    subgraph laptop["Laptop"]
        BR["bridge.py<br>smooth, map"] -->|"UDP"| PD["Pure Data<br>filter + gain"]
        BR -->|"SSE"| DASH["dashboard<br>localhost:8080"]
    end

    PD --> SPK["Speakers"]

    classDef pfBlue fill:#E7F1FA,stroke:#0066CC,color:#151515
    classDef pfGold fill:#FDF7E7,stroke:#F0AB00,color:#151515
    classDef pfGreen fill:#F3FAF2,stroke:#3E8635,color:#151515
    classDef pfGray fill:#F0F0F0,stroke:#6A6E73,color:#151515
    class HAND,SPK pfBlue
    class FW pfGreen
    class BR pfGold
    class PD,DASH pfGray

The hardware

Two production board shapes exist. v2.1 is a 13 x 35 mm bar (frozen in production/kicad/v2/). v3, the current design in production/kicad/, is a regular five-point star 40 mm tip to tip with a vertical, top-entry USB-C (G-Switch GT-USB-7055E) in the body so all five prongs are identical, the antenna at the top tip, LEDs out on the left arm and the button in the right arm; otherwise the same parts and the same four-layer 0.8 mm stack. The v2.1 board is a 13 x 35 mm, four-layer, 0.8 mm PCB, all SMD, designed to ride on a pen barrel with a 401230 LiPo at the back of the pen.

RefPartRole
U1ISP1807nRF52840 with integrated antenna, pre-certified
U2LSM6DS3TR-C6-axis IMU
U3MCP73831LiPo charger, 50 mA
U4TPS7A023.3 V LDO, 200 nA quiescent
J1USB-C 16Pcharge, programming, serial
J2pads on B.Cuoff-board LiPo, 401230

The KiCad project lives in production/. Schematic PDF, board plots, a render and the BOM are in production/output/.

The board is fully routed and fabrication-ready: 0 unrouted connections, ground pours on all four layers, and a clean DRC. U1 sits on the official JLCPCB land pattern with part-for-part verified pad geometry, and every component carries the 3D model of the exact part being ordered.

Every pinout came from a primary datasheet, kept in production/datasheets/. The one that would have cost a board spin: ISP1807 pin 20 (OUT_ANT) must be tied to pin 22 (OUT_MOD) on the application PCB, or the radio has no antenna.

The firmware and laptop stack

prototype/ runs on the Seeed XIAO nRF52840 Sense today and targets the custom board unchanged, since both are an nRF52840 with an ST IMU on I2C.

text
prototype/
  bridge.py           serial or BLE, then smoothing, mapping, UDP, dashboard
  ble_source.py       laptop-side BLE client for --ble
  dashboard.py        live web view on :8080
  firmware/
    code.py           IMU over USB serial
    code_ble.py       IMU over BLE, advertises as PenMixer-Lexy
  patches/            Pure Data: track playback, manual sliders, live input

How to run all of it, from firmware to Pure Data to the dashboard, lives in docs/RUNNING.md.

Run the desktop app

The Qt app in app/ is the laptop side: it EQs whatever the computer is playing, driven by the pen over Bluetooth. Full detail, Docker, and troubleshooting are in app/README.md; the short version:

macOS

bash
brew install blackhole-2ch switchaudio-osx       # first time only
git clone https://github.com/Brillar0101/pen-mixer.git
cd pen-mixer/app
python3 -m venv venv
venv/bin/pip install -r requirements.txt -e .    # first time only
venv/bin/python -m penmixer.app                  # every time

In the window: click "Route system audio here", set Source to "Bluetooth (pen board)" or use "Scan Bluetooth", play music, move the pen. Closing the app restores your speakers.

Windows

First time only, in an administrator PowerShell, then reboot (VB-CABLE is the Windows loopback device):

powershell
curl.exe -L -o $env:TEMP\vbcable.zip https://download.vb-audio.com/Download_CABLE/VBCABLE_Driver_Pack45.zip
Expand-Archive $env:TEMP\vbcable.zip $env:TEMP\vbcable -Force
& $env:TEMP\vbcable\VBCABLE_Setup_x64.exe
shutdown /r /t 0

Then in a normal PowerShell:

powershell
git clone https://github.com/Brillar0101/pen-mixer.git
cd pen-mixer\app
python -m venv venv
venv\Scripts\pip install -r requirements.txt -e .   # first time only
venv\Scripts\python -m penmixer.app                 # every time

Set Settings > System > Sound > Output to "CABLE Input", then in the window click "Hear music here", set Source to "Bluetooth (pen board)", play music, move the pen. Set the output back to your speakers when done.

No board? Set Source to "Simulate (no board)".

Measured, not estimated

WhatNumber
Frame rate over USB197 Hz against a 250 Hz target
Frames in the soak run105,872, 0 malformed
Smoother settling, alpha 0.424 ms to 95% of a step
End-to-end budget32 ms, against ~20 ms where feel degrades
BLE vs USB link cost~10 ms vs 1 ms

Layout

text
prototype/            nRF52840 Sense build: real IMU, USB or BLE, laptop stack
app/                  Qt desktop app: 3-band EQ, visualizer, one-window stack
                      (start instructions for macOS and Windows: app/README.md)
production/           the production board
  kicad/              KiCad 10 project, footprints, 3D models
  datasheets/         primary sources for every pinout
  output/             schematic PDF, board plots, render, BOM, DRC report
docs/                 architecture, run guide, requirements (PRD)
ARCHITECTURE.md       how it all fits together, with diagrams

License

MIT. See LICENSE.

Built by Barakaeli (Brillar0101) and Lexy (vnllagoldfish).

Parts

32
QtyValueFootprintReferences
5100nC_0402_1005MetricC5, C7, C8, C10, C11
21MR_0402_1005MetricR8, R9
21uC_0402_1005MetricC3, C4
24k7R_0402_1005MetricR6, R7
24u7C_0402_1005MetricC1, C2
25k1R_0402_1005MetricR1, R2
2XL-1010RGBCLED-SMD_4P-L1.0-W1.0-TL_XL-1010RGBC-WS2812BLED1, LED2
1+3V3TestPad_1.0mmTP5
110uC_0402_1005MetricC6
11kR_0402_1005MetricR4
120kR_0402_1005MetricR3
1BATSolderPad_1.2x2.0mmJ2
1EVQP7C01PSW-SMD_EVQP7C01PSW1
1GNDTestPad_1.0mmTP4
1GRNLED_0402_1005MetricD1
1ISP1807-LRBULETM-SMD_ISP1807U1
1LSM6DS3TR-CLGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4yU2
1MCP73831T-2ACI/OTSOT-23-5U3
1SWDCLKTestPad_1.0mmTP2
1SWDIOTestPad_1.0mmTP1
1TPS7A0533PDBVSOT-23-5U4
1USB-C 16Ppen-mixer:GT-USB-7010ASVJ1

More from Brillar0101/pen-mixer

1
  • 4 layers11 × 42 mmPen mixer, the printed circuit board in 3D

    Pen mixer

    Brillar0101/pen-mixer

    Pen-mounted motion controller: prototype and production firmware, laptop audio stack, and the production PCB as a KiCad project

    28 partsMIT

Similar boards

  • 4 layers52 × 52 mmMoto gps rev a1, the printed circuit board in 3D

    Moto gps rev a1

    mx3353672833-debug/moto-gps-waveshare

    MOTO GPS · Waveshare ESP32-S3 1.75C 圆屏导航 + iPhone App | Author: Maler X | Noncommercial, attribution required | Experimental

    112 parts529
  • 2 layers32 × 61.5 mmFM3 mainboard, the printed circuit board in 3D

    FM3 mainboard

    asterics/FLipMouse

    The repository for FLipMouse (Finger and LipMouse)

    54 parts44
  • 2 layers19.1 × 21.8 mmEsp32c5-airunit nano, the printed circuit board in 3D

    Esp32c5-airunit nano

    us3r-d0e5nt-3x1st/esp32c5-airunit-nano

    air-unit based on esp32c5-wroom-1u and ov5640, made for the hx-esp32-cam-fpv project, supports both digital video with osd and rc control

    24 parts3
  • 4 layers40 × 40 mmTouchpadAdapter, the printed circuit board in 3D

    TouchpadAdapter

    Michael-Lloyd/fw13-touchpad-bridge

    Framework 13 Touchpad to USB bridge

    74 parts1
  • 8 layersRound pendant, the printed circuit board in 3D

    Round pendant

    sequoia-hope/ultraroute

    PCB autorouting experiments around copperroute: route jobs, leaderboards, board morphing

    342 parts1MIT
  • 4 layers54.6 × 61 mmSapphineMinimal, the printed circuit board in 3D

    SapphineMinimal

    ChrisHayward-dev/SapphireKicad

    See the LastProduction branch for the most current revision

    159 parts
  • 2 layers264 × 34 mmVindor, the printed circuit board in 3D

    Vindor

    ftrias/vindormusic

    Electronic saxophone firmware and PCB

    100 parts19
  • 2 layers110 × 97.2 mmPcbBot, the printed circuit board in 3D

    PcbBot

    BerkeleyHCI/PolymorphicBlocks

    A Python-based hardware description language for PCBs for higher-level (block-diagram / system-architecture level) PCB design through libraries of directly reusable subcircuit generators.

    109 parts94BSD-3-Clause

Questions

How big is the Pen mixer PCB?

It measures 38 × 36.2 mm and has 4 copper layers, 0.8 mm thick.

What parts does the Pen mixer use?

32 parts, built around the ISP1807-LR-RS, LSM6DS3TR-C, MCP73831T-2ACI/OT-HXY and TPS7A0533PDBV. 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 Pen mixer KiCad files?

From the Brillar0101/pen-mixer repository on GitHub, at the commit this page was made from: the board is production/kicad/pen-mixer.kicad_pcb and its schematic production/kicad/pen-mixer.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pen mixer design in my own project?

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