Skip to the content
PCBKitNew board
4 layers374.7 × 151.1 mmStarShield, the printed circuit board in 3D

开源 95 键无线机械键盘(ZMK + BLE Dongle + per-key RGB):设计文档、KiCad 原理图与固件配置

Size
374.7 × 151.1 mm
Copper layers
4
Thickness
1.6 mm
Parts
321
Nets
239
Pads
1,441
Tracks, vias
4,229, 714
Pours
6
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
15 Sep 2026
Updated
20 Sep 2026

Overview

StarShield is an open-source printed circuit board by DankFlumeMister, from the DankFlumeMister/StarShield repository on GitHub, published under the CERN-OHL-S-2.0 licence. It is a 4-layer board of 374.7 × 151.1 mm with 321 parts on 239 nets, routed with 4,229 tracks and 714 vias.

It is built around the 74HC595 and 1N4148W. Its parts include 134 diodes, 31 switches, 9 resistors, 6 capacitors and 3 ICs. It belongs with the radio and wireless boards of this library.

Main components

2

README

README.md

StarShield

Build firmware

一个开源、全自定义、面向新手教程的无线机械键盘。

目标是一把 95 键紧凑全尺寸单体键盘:键盘本体经 BLE 连接一个 USB Dongle, Dongle 插在主机上,从而获得接近 2.4GHz 的无线体验。硬件设计、固件与教程全部开放。

⚠️ 项目仍在设计阶段,尚无硬件实物。 本 README 如实标注每一项的完成度, 未验证的内容不会写成已完成。


目标

  • 95 键紧凑全尺寸单体键盘(含独立小键盘与导航键簇)
  • 无线优先:Body(键盘本体)作为 BLE peripheral,Dongle 作为 BLE central
  • USB-C 有线备用:充电 + 有线模式
  • ZMK Studio 浏览器实时改键
  • Per-key RGB:95 颗独立发光,组合键控制开关/亮度/颜色/灯效
  • 硬件开源,新手可复刻
  • 控制器模块同时兼容 nice!nano v2 与 SuperMini nRF52840(低成本路线)

系统架构

text
┌─────────────────────────────┐        ┌──────────────────┐      ┌────────┐
│        键盘 Body             │        │      Dongle      │      │  主机   │
│                             │        │                  │      │        │
│  nice!nano v2 (peripheral)  │──BLE──▶│ XIAO nRF52840    │─USB─▶│  PC    │
│   ├─ 95 键矩阵 6 行 × 18 列   │        │   (central)      │      │        │
│   │    ├─ 6 行直连 MCU       │        └──────────────────┘      └────────┘
│   │    └─ 18 列由 2×74HC595  │
│   ├─ BQ24072 充电 + 电源路径管理 │
│   ├─ 3000mAh LiPo(无断电开关)  │
│   └─ 95 颗 SK6812MINI-E + 门控   │
└─────────────────────────────┘

关键技术选择(完整理由见 docs/adr/):

主题选择
固件ZMK(基于 Zephyr RTOS)
无线方案BLE Dongle(非原生 2.4GHz,见 ADR-0001)
矩阵驱动2 颗 74HC595 级联驱动 18 列(见 ADR-0008)
充电BQ24072,线性充电 + 电源路径管理,做在主 PCB
RGB 供电电池直供,不加 5V 升压(见 ADR-0007)
许可CERN-OHL-S-2.0

当前状态

模块状态说明
产品与硬件设计决策✅ 已完成11 条 ADR + 完整决策日志
键位几何✅ 已核验95 键、19.50u × 6.25u(371.5 × 119.1 mm)
95 键矩阵分配✅ 已完成6 行 × 18 列,18 列达数学下界
PCB 原理图(矩阵部分)✅ 已完成网表校验 10 项全通过、ERC 0 error
PCB 原理图(电源/RGB/控制板)🔴 未完成拓扑与元件取值已定,待画图
固件配置🟡 已写出shield 全套 + 95 键映射,静态校验通过
固件编译验证✅ 已通过GitHub Actions 用 ZMK v0.3.0 实跑 west build,产出可烧录的 .uf2
PCB 布局 / 外壳 / BOM / 教程🔴 未开始

已产出的设计文档

文档内容
docs/decisions.md完整决策日志
docs/adr/架构决策记录 0001–0011
docs/hardware-geometry.md键位几何基准(含一次错误测量的教训)
docs/matrix-assignment.md95 键矩阵行列分配 + 网表校验
docs/matrix-folding-analysis.md为什么必须用移位寄存器(含引脚预算推导)
docs/zmk-kscan-alternatives.mdZMK 全部 6 个 keyscan 驱动排查
docs/power-architecture.md电源树、电流预算、选型
docs/bq24072-pinout.md充电 IC 引脚与元件取值
docs/controller-and-battery-facts.md控制器/电池/JST 已核实事实
firmware/README.md固件引脚分配权威表 + 踩坑记录

仓库结构

text
.
├── docs/                     设计文档、决策记录、生成/校验脚本
│   ├── adr/                  架构决策记录 0001–0011
│   ├── _tools/               可复现的生成与校验脚本
│   └── _generated/           脚本产物
├── firmware/                 ZMK 固件配置
│   ├── build.yaml            构建矩阵
│   └── boards/shields/starshield/
├── hardware/
│   ├── pcb/
│   │   ├── StarShield/       KiCad 工程(95 键矩阵原理图)
│   │   └── TEST1/            练习工程
│   └── case/                 3D 打印外壳(待开始)
├── research/                 调研报告(结论性,逐条带来源)
├── sketch/                   键盘布局图(KLE 格式,几何唯一权威)
└── tutorials/                新手教程(待开始)

自己跑一遍

本项目全部设计产物由脚本生成,且可复现(重跑不会产生差异)。

bash
# 需要:Node.js、Python 3、KiCad(命令行工具 kicad-cli)
node docs/_tools/matrix-assign.mjs      # 矩阵分配
node docs/_tools/gen_transform.mjs      # 键盘映射表 + 物理布局
node docs/_tools/gen_keymap.mjs         # 键位映射
python docs/_tools/gen_matrix_sch.py    # 生成 KiCad 原理图

# 校验
python docs/_tools/verify_netlist.py    # 网表电气校验(10 项)
python docs/_tools/verify_firmware.py   # 固件静态校验

若 kicad-cli 不在 PATH 上,可用环境变量指定: export KICAD_CLI=/path/to/kicad-cli

KiCad 工程:用 KiCad 打开 hardware/pcb/StarShield/Starshield.kicad_pro。

构建固件

固件由 CI 自动构建(ZMK 版本钉在 firmware/west.yml 的 v0.3.0,上游变更新不会悄悄破坏构建)。 已实测通过,产物为两个可烧录的 UF2:

文件用途
starshield-body.uf2键盘本体固件
starshield-settings-reset.uf2清空设置(刷完再刷本体固件,用于恢复出厂状态)

获取方式:进入 Actions → 选最新一次成功的 run → 页面底部 Artifacts → 下载 starshield-firmware。

⚠️ 这些 UF2 尚未在真实硬件上烧录验证过 —— 能编译不等于能用。 等 PCB 打样后会补上实测记录。

自己触发一次构建:Actions 页面 → Run workflow(工作流带 workflow_dispatch)。


已知限制(重要,请勿误读完成度)

  • 没有任何硬件实物。 所有结论均基于设计推导、厂商 datasheet 与仿真级校验。
  • 固件已能编译出 .uf2,但从未烧进真板子跑过。 编译通过只说明配置自洽, 不代表按键定义、RGB 时序、电源门控在实物上正确 —— 这些都必须等 PCB 打样后实测。
  • 原理图只画了矩阵部分,电源与 RGB 子图尚未绘制。
  • 引脚分配的机械尺寸未用实物核对。 nice!nano 排针的 pitch 与每边引脚数 来自 ZMK 官方设备树定义与 Pro Micro 标准旁证,投板前必须用实物卡尺复核。
  • 外壳必须分件打印:键区宽 371.5 mm,超过常见 256 mm 打印床。
  • 以下三项已有推荐方案但尚未确认(详见 ADR-0009、ADR-0010):
    • 连接模式开关:三档拨片(2.4G / 蓝牙 / 有线),单刀 SP3T。 方案用 ZMK 上游原生机制(toggle-mode + sideband behaviors),键盘侧零自定义固件; 但 Dongle 必须是「BLE HID 主机」形态,其固件不是 ZMK,是一块独立的开发量。
    • 不设电池断电开关:电池始终接通,「关机」= 拨到有线档 + 拔掉 USB 线, 再由 ZMK 深睡接手;长期存放拔电池插头。 这是跟随成熟三模产品(Keychron 等)的做法,也回避了「小开关要扛 2.4 A」的难题。
    • RGB 门控关断拓扑:电池满电时 3.3 V GPIO 无法保证关断源极在 4.2 V 轨的高边 PMOS, 需加一级 NMOS 反相(GPIO_ACTIVE_HIGH)。⚠️ 该失效的量级未经实测,标记为未核实。

参与

项目仍在早期。如果你对以下方向感兴趣,欢迎开 issue 讨论:

  • 95 键布局的定位板/外壳设计
  • 电源子图(BQ24072 充电 + 电源路径)复核
  • 实物打样后的固件实测(矩阵扫描、RGB、电源门控、休眠电流)

许可证

本项目采用 CERN-OHL-S-2.0(强互惠开源硬件许可证),全文见 LICENSE。

任何人可商业使用、修改和分发本设计,但衍生产品必须同样以 CERN-OHL-S-2.0 开源, 并公开完整设计文件。

Parts

321
QtyValueFootprintReferences
951N4148WDiode_SMD:D_SOD-123D1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +79
8M2MountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4, H5, H6, H7, H8
3100nFCapacitor_SMD:C_0603_1608MetricC4, C5, C6
310kResistor_SMD:R_0603_1608MetricR5, R7, R9
374HC595Package_SO:SOIC-16_3.9x9.9mm_P1.27mmU2, U3, U4
24.7uFCapacitor_SMD:C_0603_1608MetricC2, C3
25.1kResistor_SMD:R_0603_1608MetricR1, R2
2CtrlLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED87, LED95
2DeleteLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED16, LED35
2EnterLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED52, LED68
2ShiftLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED72, LED84
1!/1LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED22
1!/1StarShield:SW_MX_Hotswap_Optional_1.00uSW22
1"/'StarShield:SW_MX_Hotswap_Optional_1.00uSW67
1"/'LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED67
1#/3LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED24
1#/3StarShield:SW_MX_Hotswap_Optional_1.00uSW24
1$/4LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED25
1$/4StarShield:SW_MX_Hotswap_Optional_1.00uSW25
1%/5LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED26
1%/5StarShield:SW_MX_Hotswap_Optional_1.00uSW26
1&/7LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED28
1&/7StarShield:SW_MX_Hotswap_Optional_1.00uSW28
1(/9LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED30
1(/9StarShield:SW_MX_Hotswap_Optional_1.00uSW30
1)/0StarShield:SW_MX_Hotswap_Optional_1.00uSW31
1)/0LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED31
1*StarShield:SW_MX_Hotswap_Optional_1.00uSW18
1*LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED18
1*/8StarShield:SW_MX_Hotswap_Optional_1.00uSW29
1*/8LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED29
1+StarShield:SW_MX_Hotswap_Optional_1.00uSW20
1+LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED20
1+/=StarShield:SW_MX_Hotswap_Optional_1.00uSW33
1+/=LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED33
1-LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED19
1-StarShield:SW_MX_Hotswap_Optional_1.00uSW19
1./DelStarShield:SW_MX_Hotswap_Optional_1.50uSW86
1./DelLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED86
1/LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED17
1/StarShield:SW_MX_Hotswap_Optional_1.00uSW17
10/InsLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED85
10/InsStarShield:SW_MX_Hotswap_Optional_1.50uSW85
11.5kResistor_SMD:R_0603_1608MetricR6
11.6kResistor_SMD:R_0603_1608MetricR3
11/EndLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED69
11/EndStarShield:SW_MX_Hotswap_Optional_1.00uSW69
1100Resistor_SMD:R_0603_1608MetricR8
11uFCapacitor_SMD:C_0603_1608MetricC1
12/↓StarShield:SW_MX_Hotswap_Optional_1.00uSW70
12/↓LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED70
12AFuse:Fuse_1812_4532MetricF1
12N7002Package_TO_SOT_SMD:SOT-23Q2
13/PgDnLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED71
13/PgDnStarShield:SW_MX_Hotswap_Optional_1.00uSW71
14/←LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED53
14/←StarShield:SW_MX_Hotswap_Optional_1.00uSW53
15StarShield:SW_MX_Hotswap_Optional_1.00uSW54
15LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED54
16/→StarShield:SW_MX_Hotswap_Optional_1.00uSW55
16/→LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED55
17/HomeStarShield:SW_MX_Hotswap_Optional_1.00uSW36
17/HomeLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED36
18/↑StarShield:SW_MX_Hotswap_Optional_1.00uSW37
18/↑LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED37
1887Resistor_SMD:R_0603_1608MetricR4
19/PgUpLED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED38
19/PgUpStarShield:SW_MX_Hotswap_Optional_1.00uSW38
1:/;StarShield:SW_MX_Hotswap_Optional_1.00uSW66
1:/;LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED66
1</,StarShield:SW_MX_Hotswap_Optional_1.00uSW80
1</,LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED80
1>/.StarShield:SW_MX_Hotswap_Optional_1.00uSW81
1>/.LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED81
1?//StarShield:SW_MX_Hotswap_Optional_1.00uSW82
1?//LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED82
1@/2LED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED23
1@/2StarShield:SW_MX_Hotswap_Optional_1.00uSW23
1ALED_SMD:LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mmLED57
1AStarShield:SW_MX_Hotswap_Optional_1.00uSW57

The 193 most common of 321 parts.

Questions

How big is the StarShield PCB?

It measures 374.7 × 151.1 mm and has 4 copper layers, 1.6 mm thick.

What parts does the StarShield use?

321 parts, built around the 74HC595 and 1N4148W. 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 StarShield KiCad files?

From the DankFlumeMister/StarShield repository on GitHub, at the commit this page was made from: the board is hardware/pcb/StarShield/Starshield.kicad_pcb and its schematic hardware/pcb/StarShield/Starshield.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the StarShield design in my own project?

Its repository publishes it under the CERN-OHL-S-2.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).

Similar boards

  • 2 layers227.8 × 110.4 mmUninarf, the printed circuit board in 3D

    Uninarf

    sebastian-stumpf/uninarf

    Wireless unibody keyboard powered seeed ble

    98 parts31MIT
  • 2 layers121 × 75.5 mmJlctest, the printed circuit board in 3D

    Jlctest

    cjheath/jlcbasic

    JLC Basic parts library for Kicad fetched and converted from EasyEDA

    46 parts5
  • 4 layers71.1 × 99.1 mmQuad adsr, the printed circuit board in 3D

    Quad adsr

    JordanAceto/quad_ADSR_board

    PCB for a quad eurorack ADSR

    197 parts5
  • 4 layers85.6 × 54 mmUSB C DB, the printed circuit board in 3D

    USB C DB

    Rr42/USB-C-DB

    Demo board for testing and evaluating the USB-C interface for Micro-controllers with onboard battery charging.

    202 parts1MIT
  • 2 layers99.1 × 99.1 mmSequencer8x3ch, the printed circuit board in 3D

    Sequencer8x3ch

    aichi-steiner/sequencer8x3ch

    コンピューター教育実習用シーケンサ

    161 partsCERN-OHL-P-2.0
  • 4 layers100 × 100 mmTouchSynth, the printed circuit board in 3D

    TouchSynth

    cpldcpu/TouchSynth

    Analog Monophonic Synthesizer with a touch keyboard. Controller by CH32V00x

    246 partsMIT
  • 2 layers133.5 × 120.5 mmTactile r, the printed circuit board in 3D

    Tactile r

    dazed-16/Tactile

    A modular clean custom split keyboard

    52 parts
  • 2 layers140 × 71 mmOpen game pad classic, the printed circuit board in 3D

    Open game pad classic

    not-forest/open-game-pad

    An open-source, low-cost, DIY Game-Pad

    57 partsMIT