Skip to the content
PCBKitNew board
2 layers52 × 38.5 mmKnob v2, the printed circuit board in 3D

(最初计划走标准 BLE HID 键盘 + 无障碍服务捕获按键,实测目标车机没有暴露无障碍服务开关入口、这条路走不通,现已替换为上面这套自定义 GATT 方案,详见 docs/项目历程与架构.md。)

Size
52 × 38.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
30
Nets
53
Pads
181
Tracks, vias
403, 114
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
28 Aug 2026
Updated
1 Nov 2026

Overview

Knob v2 is an open-source printed circuit board by 1carusX, from the 1carusX/Knob repository on GitHub. It is a 2-layer board of 52 × 38.5 mm with 30 parts on 53 nets, routed with 403 tracks and 114 vias.

It is built around the ESP32-S3-MINI-1-N8, AP2112K-3.3 and USBLC6-2SC6, with the 0.5K-AS-12PWB and AO3400A among its other parts. Its parts include 12 resistors, 10 capacitors, 3 ICs, 2 connectors and 2 switches. It belongs with the ESP32 boards of this library.

Main components

5

README

README.md

Knob — 车机蓝牙旋钮配件

目标车机的「蓝牙物理旋钮配件」DIY 项目。

硬件端:ESP32-S3 + 圆形屏 + 旋转编码器,通过自定义 BLE GATT 服务上报单击/双击/长按事件(转动只在旋钮本地生效),同时接收车况显示数据,并支持经蓝牙升级固件(OTA)。 车机端:Android App(壳 + DEX 热加载插件),解析旋钮事件并翻译成车控动作(空调 / 座椅通风加热),同时把车况回显给旋钮屏幕。

核心思路

mermaid
flowchart LR
    HW["硬件配件<br/>ESP32-S3 + 编码器 + 圆形屏"]
    subgraph CAR["车机"]
        SHELL["壳 App<br/>车机厂商签名,只签一次"]
        DEX["plugin.dex<br/>全部车控/业务逻辑,可热更新"]
        SHELL -- DexClassLoader --> DEX
    end
    HW <-- "自定义 BLE GATT<br/>双向:事件 / 回显 / 固件 OTA" --> DEX
  • 硬件 = 旋钮,不知道也不关心自己在控制什么,只管上报事件、显示手机推来的数据。
  • App = 大脑,负责事件→动作映射,执行车控,并把结果回显给旋钮屏幕。
  • 壳只签名一次,只负责加载插件、日志和权限申请;BLE 连接、车控、界面全在插件里,后续所有代码更新通过下发插件完成,避免反复"上传→签名→装车"。
  • 插件包顺带升级旋钮:插件和旋钮固件打成一个 zip 分发,插件连上旋钮发现固件版本不一样就自动 OTA,旋钮装在车上不用再拆下来插电脑。

(最初计划走标准 BLE HID 键盘 + 无障碍服务捕获按键,实测目标车机没有暴露无障碍服务开关入口、这条路走不通,现已替换为上面这套自定义 GATT 方案,详见 docs/项目历程与架构.md。)

目录结构

text
├── app/                 # 壳 App(Android 工程,cn.icarus.knob)
│   ├── 使用与验证指南.md  # App 用法 / 实车验证步骤说明书
│   └── app/src/
│       ├── byd/ · generic/  # 按平台分的 flavor:权限声明 + PlatformConfig
│       └── main/java/cn/icarus/knob/
│           ├── api/          # 壳↔DEX 契约:KnobPlugin / KnobHost / Ui
│           ├── plugin/       # PluginLoader:导入并加载 plugin.dex
│           ├── host/         # KnobHostImpl:壳向插件提供的能力(只剩日志)
│           ├── util/         # 日志(LogSink)/ CrashHandler
│           └── KnobActivity / KnobApp / BootReceiver / RuntimePerm
├── plugin/               # 插件工程(编译产出 output/plugin.dex,可反复更新)
│   └── src/main/
│       ├── flags-real/ · flags-simulate/  # BuildFlags.kt:真实车控 / 模拟两个变体
│       └── kotlin/cn/icarus/knob/
│           ├── api/               # 与壳完全相同的契约副本(改动须两边同步)
│           └── plugin/
│               ├── MainPlugin.kt      # KnobPlugin 接口实现(入口 + 停靠点状态机 + 页面路由)
│               ├── page/              # 触屏页面,一个页面一个文件
│               ├── CarCommands.kt     # onCommand / onQuery 命令清单
│               ├── CarActions.kt      # 停靠点的车控读写(空调、座椅)
│               ├── CarPermissions.kt  # 车控运行时权限(只在用户点按钮时申请)
│               ├── StartupCheck.kt    # 启动自检(通过才连旋钮)
│               ├── KnobOta.kt         # 旋钮固件自动升级
│               ├── DriveFeed.kt       # 旋钮驾驶页的数据源

快速开始

bash
# 壳 App(比亚迪车机)→ app/app/build/outputs/apk/bydRelease/app-byd-release-unsigned.apk
cd app && ./gradlew assembleBydRelease

# 插件包(插件 + 旋钮固件)→ plugin/output/knob-plugin-<板子>-<固件版本>.zip
# 板子:Pcb(V1)/ PcbV2 / Devkit;需要 PlatformIO(pio)
cd plugin && ./gradlew pluginPackagePcb

# 只要插件、不带固件 → plugin/output/plugin.dex(SDK 版本见根目录 gradle/libs.versions.toml,SDK 路径自动探测)
cd plugin && ./gradlew pluginDex

装车流程:U 盘安装壳 APK(需车机厂商签名版)→ 打开壳点「📥 选择插件」,用文件选择器选中插件包 zip 或 plugin.dex(自动拷进 App 私有目录,之后每次启动自动加载)→ 右半边出现插件页面即成功。导入的是插件包时,插件连上旋钮会自动给旋钮升级固件。更多构建变体(generic 壳、模拟版插件)见 AGENTS.md §4,装车细节见 app/使用与验证指南.md。

关键事实(已验证)

  • 无 root、无 adb,只能 U 盘装 APK。
  • BYDAUTO_AC_GET/SET、BYDAUTO_SETTING_GET/SET 是 signature 级权限(protectionLevel=2),普通签名 App 车机不授予 → 直接 HAL 车控被挡死(实测,见 docs/验证结论.md)。
  • 能直接控车的应用都持有车机厂商签发的签名,且不存在额外的包名白名单——拿到签名即获得对应权限。本项目已通过官方开发者认证流程申请到车机厂商签名,只用官方 SDK 声明的接口(未声明的方法通过反射调用,见 docs/项目历程与架构.md)。
  • 无障碍服务方案已弃用:最初计划用无障碍服务捕获蓝牙 HID 按键,实测目标车机没有暴露无障碍服务开关入口,无法启用,已替换为自定义 BLE GATT 双向通道,无障碍服务在本项目中不再使用。

文档导航

所有知识文档的索引见 docs/INDEX.md;工具/代理请先读 AGENTS.md。

Parts

30
QtyValueFootprintReferences
5100nFCapacitor_SMD:C_0402_1005MetricC4, C6, C7, C8, C10
510kResistor_SMD:R_0402_1005MetricR3, R4, R5, R7, R9
3100Resistor_SMD:R_0402_1005MetricR6, R8, R10
210uFCapacitor_SMD:C_0603_1608MetricC1, C2
21uFCapacitor_SMD:C_0402_1005MetricC5, C9
25.1kResistor_SMD:R_0402_1005MetricR1, R2
10.5K-AS-12PWBknob-v2:FPC_HDGC_0.5K-AS-12PWB_1x12-1MP_P0.50mm_HorizontalJ2
1100kResistor_SMD:R_0402_1005MetricR11
122uFCapacitor_SMD:C_0805_2012MetricC3
151Resistor_SMD:R_0805_2012MetricR12
1AO3400APackage_TO_SOT_SMD:SOT-23Q1
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U2
1BOOTknob-v2:SW_Alps_SKRTLAE010_KeepoutSW2
1EC11E_Switchknob-v2:RotaryEncoder_EC11C01V01-0027_Switch_VerticalSW3
1ESP32-S3-MINI-1-N8RF_Module:ESP32-S2-MINI-1U1
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U3
1USB_C_16PConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1

Questions

How big is the Knob v2 PCB?

It measures 52 × 38.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Knob v2 use?

30 parts, built around the ESP32-S3-MINI-1-N8, AP2112K-3.3, USBLC6-2SC6 and 0.5K-AS-12PWB. 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 Knob v2 KiCad files?

From the 1carusX/Knob repository on GitHub, at the commit this page was made from: the board is hardware/V2/knob-v2.kicad_pcb and its schematic hardware/V2/knob-v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Knob v2 design in my own project?

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

Similar boards

  • 4 layers62 × 42 mmHybrid Controller, the printed circuit board in 3D

    Hybrid Controller

    DesignStraub/ringwheel-hybrid-drone

    A 5-inch FPV drone whose prop ducts fold down and become wheels. Design study in Fusion 360 and KiCad, CC BY-NC-SA 4.0.

    103 parts
  • 4 layers66 × 36 mmGas sensor, the printed circuit board in 3D

    Gas sensor

    JamesTwallin/gas_sensor

    A tiny plug-in board for the rev E phone-companion board. It stands upright in a notch in rev E's sensor end, between the two gas sensor cans, and pokes 4.5 mm out through a slot in the case face, so its tip sits in the…

    81 parts7MIT
  • 2 layers29 × 62.2 mmSteer32, the printed circuit board in 3D

    Steer32

    jpt1729/Steer32

    Steer32 is an ESP32 Devboard with support for a lipo battery and a 1.9" IPS Screen

    58 parts
  • 2 layers40 × 55 mmMiniBit, the printed circuit board in 3D

    MiniBit

    nikolasbtks/BitSeries-PCB

    An open-source hardware design series for embedded and IoT development applications, built using Altium Designer and KiCad and based on STM32 and ESP32 microcontrollers.

    28 parts
  • 2 layers44 × 31 mmNoisemeter, the printed circuit board in 3D

    Noisemeter

    CivicTechTO/tRacket-sensor

    Design files and source code for the tRacket noise sensor

    30 parts11
  • 2 layers84 × 98 mmFalloutbadge, the printed circuit board in 3D

    Falloutbadge

    sophiayduan/badges

    hackathon pcb badges

    93 parts3Unlicense
  • 4 layers64 × 43 mmDalws, the printed circuit board in 3D

    Dalws

    anhldptit2610/dalws

    This project is my attempt to learn about microcontroller and PCB design. Now I realize that making a full, complete electronic project is super hard.

    83 parts2MIT