Skip to the content
2 layers90 × 55 mmS3.1-before repack, the printed circuit board in 3D

S3.1-before repack

puji4810/coffe-scale

USB-C J5 ──► U8 ESD ──► R19/R20 22R ──► U4 IO19/IO20 (native USB-Serial/JTAG) │VBUS ├─► U5 TP4057 充电 ──► J6 1S Li-ion └─► D1/Q1 负载切换 ──► VSYS ──► U6 XC6220 3V3 1A ──► VCC3V3 ──► U4/外设 └──► U7 HT7533 ──► VDDADC ──► U1/U3…

Size
90 × 55 mm
Copper layers
2
Thickness
1.6 mm
Parts
96
Nets
81
Pads
329
Tracks, vias
940, 159
Pours
4
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
15 Sep 2026
Updated
18 Oct 2026

Overview

S3.1-before repack is an open-source printed circuit board by puji4810, from the puji4810/coffe-scale repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 90 × 55 mm with 96 parts on 81 nets, routed with 940 tracks and 159 vias.

It is built around the ESP32-S3-WROOM-1-N16R8, NAU7802SGI and HT7533-1, with the LIS2DW12, TMP 10212 and USBLC6-2SC6 among its other parts. Its parts include 31 resistors, 29 capacitors, 8 ICs, 7 connectors and 3 diodes. It belongs with the ESP32 boards of this library.

Main components

12

README

pcb/s3.1/README.md

s3.1 — 双用途控制板 (rev s3.1)

一块 ESP32-S3 + NAU7802 主控板,同时服务两个产品形态:

  1. 独立咖啡秤——沿用 scale-adc-s3 的全部功能:称重前端、SPI LCD、 双按键、蜂鸣器、USB-C 供电 / 单节锂电充放电、温度与倾斜传感。
  2. 自动手冲机控制器——同一块板通过 J10 扩展口驱动独立的 电源/电机板(水泵、加热、流量/温度传感、喷嘴运动)。高压与功率 驱动电路留在功率板上,本板只做控制。

本目录是 pcb/scale-adc-s3/ 的改版。与 rev C 的差异: 90×55 规矩板框、MCU 居中、四角 M2 安装孔;新增 J10 2×10 南缘扩展口 与 J11 1×4 称重通道 2(VIN2)接口;NAU7802 VIN2 不再接地; 原 J9 扩展尝试在本版落地为 J10;测试点列移至板南侧。

目标

  • 130×30×22 mm 单点称重传感器(ZEMIC L6D-C3-3kg 或兼容),量程 2–3 kg
  • 稳定显示 0.1 g;探索 0.01 g 显示/低量程模式
  • TMP102 测传感器附近温度做漂移分析;LIS2DW12 做水平/振动/敲击检测
  • 第二称重通道:NAU7802 ch2 (VIN2) 经 J11 外接第二传感器/PT1000, 咖啡秤形态可不贴,机器形态接流量或第二称重
  • J10 扩展口:8× GPIO(100R 串阻)+ 2× 直连 GPIO + 电源/总线排, 对接机器电源/驱动板;R32 10k 下拉保证 XIO15(HEATER_EN 语义) 默认安全态——裸板/未插扩展时加热线永不会被置位

系统结构

text
USB-C J5 ──► U8 ESD ──► R19/R20 22R ──► U4 IO19/IO20 (native USB-Serial/JTAG)
   │VBUS
   ├─► U5 TP4057 充电 ──► J6 1S Li-ion
   └─► D1/Q1 负载切换 ──► VSYS ──► U6 XC6220 3V3 1A ──► VCC_3V3 ──► U4/外设
                                  └──► U7 HT7533 ──► VDD_ADC ──► U1/U3 (安静电源轨)

L6D 3kg ──J2──► R1/R2 1k + C5/C10/C11 EMI 滤波 ──► U1 NAU7802 ch1 (I2C 0x2A)
J11 ch2 ──► C27 100n 差模电容 ──► U1 VIN2 (不再接地)
U2 LIS2DW12 (0x18)   U3 TMP102 (0x48)   共享 I2C: SDA=IO10, SCL=IO11
J7 SPI LCD          J8 按键 (TARE/MODE)          BZ1 蜂鸣器 (Q2 2N7002 驱动)
J10 2×10 ──► 机器电源/驱动板(泵/加热/流量/喷嘴)

接口

  • J2 → 称重传感器 ch1:1=E+ (AVDD 激励), 2=E- (GND), 3=S-, 4=S+, 5=SHLD(GND)

  • J5 → USB-C:USB 2.0,VBUS 充电/供电

  • J6 → 电池:1=BAT+, 2=GND(JST PH 2.0)

  • J7 → LCD:1=GND, 2=3V3, 3=SCK, 4=MOSI, 5=CS, 6=DC, 7=RST(局部 RC 上电复位), 8=BL

  • J8 → 按键/触摸:1=GND, 2=TARE, 3=MODE, 4=3V3(4P JST PH;供 TTP223 触摸模块,老 3P 按键线仍兼容)

  • J11 → 称重通道 2 / VIN2:1=E+, 2=E-, 3=S2-, 4=S2+; rev C 把 VIN2 接地作废,本版经 C27 100n 差模电容后直连 NAU7802 ch2, 可接第二称重传感器或 PT1000(比率测量)

  • J10 → 机器电源/驱动板(2×10 PTH,南缘居中):

    pin信号pin信号
    1XIO38 (经 R24 100R)11EXP_5V
    2XIO39 (R25)123V3
    3XIO40 (R26)13–15GND
    4XIO41 (R27)16SDA
    5XIO42 (R28)17SCL
    6XIO14 (R29)18TXD (UART0)
    7XIO15 (R30, R32 10k 下拉)19RXD (UART0)
    8XIO17 (R31)20EN
    9XIO1 (直连)
    10XIO47 (直连)

    A 排(1–10)= GPIO,其中 pin1–8 各经 100R 串阻限流/保护; B 排(11–20)= 电源 + 总线。pin20 EN 可让功率板复位主控; pin18/19 是 UART0,兼作烧录/调试兜底。

  • D3 (DNP) → EXP_5V→VBUS 注入:功率板 5V 反灌选项。贴 B5819W = 二极管 OR(防 USB 反灌,~0.3 V 压降仍可经 TP4057 充电); 或 0R/飞线直通。纯秤 BOM 永不贴。

U4 (ESP32-S3-WROOM-1-N16R8) 引脚映射

信号GPIO备注
LCD_SCK/MOSI/CS/DCIO4/IO5/IO6/IO7SPI
CHRG_STATIO8TP4057 开漏充电指示
VBAT_SENSEIO9R13/R14 100k 分压
SDA / SCLIO10 / IO11I2C 总线,并上 J10.16/17
DRDYIO12NAU7802 数据就绪
INT1IO13LIS2DW12 中断(唤醒/敲击/就绪)
EXP_IO14 / EXP_IO15IO14 / IO15J10 pin6/pin7(经 R29/R30);IO15 原 LCD_RST 改局部 RC POR 后释放
LCD_BLIO16
EXP_IO17IO17J10 pin8(经 R31)
BTN_MODEIO18
USB D-/D+IO19 / IO20原生 USB,经 R19/R20 22R + U8 ESD
BUZZIO21Q2 低侧开关 + D2 续流
EXP_IO38–42IO38–IO42J10 pin1–5(经 R24–R28)
EXP_IO47IO47J10 pin10 直连
EXP_IO1IO1J10 pin9 直连(原 UART1 候选脚,strapping 无关)
BTN_TAREIO48非 strapping 脚(rev C.1 从 IO46 改来)
UART0 TXD/RXDTXD0 / RXD0TP5/TP6 + J10.18/19
BOOTIO0R6 10k 上拉;TP4 短接 GND = 下载模式
ENENR5 10k + C14 1u RC;TP3 复位 + J10.20
NCIO2/IO3, IO45/46IO35–37 被八线 PSRAM 占用;IO45/46 strapping 脚留空

关键设计决策

  • NAU7802 外部 AVDD = VDD_ADC 3.3 V:AVDD_LDO/REFP/DVDD 与 ch1/ch2 传感器激励 E+ 全部挂 U7 HT7533 安静轨,比率测量中激励波动抵消。 固件必须保持 AVDDS=0(AVDD 引脚作电源输入,内部 LDO 关闭、 VLDO 无效)。AVDD 上电即有 ~3.3 V,空板可直接量到(TP8)。
  • VIN2 解地 + J11:rev C 把 NAU7802 ch2 输入接地作废;本版经 C27 差模电容引出到 J11 1×4(E+/E-/S2-/S2+)。机器形态接第二称重 或 PT1000;纯秤 BOM 可不贴 J11/C27,固件忽略 ch2。
  • J10 扩展口 = 唯一新增对外接口:机器形态下功率板只做 电源分配与功率驱动(泵/加热/电机驱动),所有控制、传感 I2C、 UART、GPIO 都经 J10 进出。100R 串阻在排针侧限流保护 IO; R32 下拉确保 HEATER_EN 语义的 XIO15 默认低。
  • EXP_5V 供电选项(DNP):机器形态下功率板可经 D3 向 VBUS 侧 反灌 5V,省掉 USB 供电线;纯秤不贴。
  • 规矩板框 + 居中 MCU:90×55 mm,MH1–MH4 M2 NPTH 四角安装孔 (4,4)/(86,4)/(4,51)/(86,51);U4 模组顶部居中(天线伸北缘外), 模拟簇留西北,电源簇东南,J10 南缘居中——后续加东西走线都规整。
  • 模拟岛:西北角模拟 GND 经缝合过孔单点接主地,两层铺铜 island_removal 开启;模拟 keepout 只挡 tracks 不挡 vias, 北界 y24(只护 U1/U3/信号列簇)。
  • LCD_RST 局部 RC 上电复位:沿用 rev C 方案(R21+C26 在 J7 旁)。
  • 主 LDO 热预算:U6 XC6220 1 A 指标仅指电流能力;Wi-Fi+背光+ 蜂鸣器全开须实测温升。机器形态下若贴 D3 走 EXP_5V,热预算重算。
  • 电池:J6 直挂 VSYS,无独立过放/过流切断——必须使用带保护板 的 1S 电池包;机器形态可不贴电池,由 EXP_5V/USB 供电。

BOM 变体

位号纯秤 BOM机器 BOM
J10, R24–R32, D3J10+R24–R31 可贴可省(调试用);R32 贴(安全下拉);D3 不贴全贴,D3 按供电方案选 B5819W 或 0R
J11, C27可不贴(ch2 不用)贴(第二称重/PT1000)
J6, 电池贴可不贴
J7/J8/BZ1/LCD贴按需(机器形态可用板载 LCD 做状态屏,也可不贴走 J10 远程显示)

文件

  • s3.1.kicad_sch / s3.1.kicad_pcb — KiCad 10 工程
  • s3.1.pretty/ — 项目内自包含封装库(含 PinHeader_2x10_P2.54mm_Vertical 等新封装)
  • tools/gen_sch.py, tools/gen_pcb.py, tools/gen_cpl.py — 生成脚本
  • tools/autoroute.py — FreeRouting 自动布线(DSN/SES 往返 + 合并 + relock + DRC/rip-up 循环)
  • tools/route_check.py — 候选走线几何校验器(候选路径落地前必过)
  • tools/net_islands.py, tools/region_dump.py — 连通性/区域铜皮审计
  • s3.1-erc.txt / s3.1-drc.txt — 验证报告

验证(kicad-cli 10.0)

text
kicad-cli sch erc --format report --output s3.1-erc.txt \
    --severity-all s3.1.kicad_sch
kicad-cli pcb drc --format report --output s3.1-drc.txt \
    --severity-all --refill-zones s3.1.kicad_pcb

布线流程:gen_pcb.py 只布模拟区与关键电源的手布走线并打 (locked yes); 其余交 autoroute.py(FreeRouting)全局布线,手工修补一律先过 route_check.py 校验再落地并加锁。

当前状态见 s3.1-drc.txt;布线收敛过程见 git 历史与 tools/fix_routes*.py。

Bring-up 顺序

  1. 断电先量 3V3/GND、VBUS/GND、BAT/GND 无短路;上电后量 VBUS、VSYS、 VCC_3V3、VDD_ADC。AVDD 由外部 VDD_ADC 供电(TP8),上电即应量到 ~3.3 V,不再依赖固件使能 NAU7802 内部 LDO。
  2. USB 插电脑:原生 USB-Serial/JTAG 应直接枚举;否则 TP4 短 GND + TP3 复位进下载模式,用 UART0(TP5/TP6 或 J10.18/19)兜底烧录。
  3. I2C 扫描应见 0x18 / 0x2A / 0x48;J10.16/17 与板内 I2C 同总线, 机器侧挂传感时注意总线负载与上拉。
  4. 挂 ch1 传感器采 10/80 SPS 记录噪声/零点/重复性/温漂; 贴 J11 时同样方法验证 ch2。
  5. LIS2DW12 验证 INT1;TMP102 与传感器温漂对比。
  6. 对比 LCD/背光/蜂鸣器/Wi-Fi 与 USB/电池/EXP_5V 供电下的称重读数。
  7. 机器形态:先不接功率板验证 XIO* 逻辑电平与 HEATER_EN 默认低 (R32 下拉),再对接功率板做泵/加热的低压联调,最后上高压。

Parts

96
QtyValueFootprintReferences
8100Rs3-1:SMD_0805_VR24, R25, R26, R27, R28, R29, R30, R31
7100ns3-1:SMD_0805C1, C2, C7, C17, C18, C19, C26
710ks3-1:SMD_0805R5, R6, R11, R15, R16, R21, R32
710us3-1:SMD_0805C9, C13, C15, C16, C20, C21, C22
4100ks3-1:SMD_0805R12, R13, R14, R18
4M2s3-1:MountingHole_M2_NPTHMH1, MH2, MH3, MH4
3100ns3-1:SMD_0805_VRC4, C5, C27
31ks3-1:SMD_0805R17, R22, R23
21ks3-1:SMD_0805_VRR1, R2
21ns3-1:SMD_0805C28, C29
21ns3-1:SMD_0805_FC10, C11
21us3-1:SMD_0805C3, C25
222Rs3-1:SMD_0805_FR19, R20
24k7s3-1:SMD_0805R3, R4
25k1s3-1:SMD_0805_VRR8, R9
2B5819Ws3-1:D_SOD-123D1, D3
2DNPs3-1:SMD_0805_VC23, C24
1100ns3-1:SMD_0805_FC12
1100ns3-1:SMD_0805_VC6
11N4148Ws3-1:D_SOD-123D2
11us3-1:SMD_0805_VC14
12N7002s3-1:SOT-23Q2
12k7s3-1:SMD_0805R10
14u7s3-1:SMD_0805C8
1AO3401As3-1:SOT-23Q1
1BATs3-1:JST_PH_B2B-PH-K_1x02_P2.00mm_VerticalJ6
1BTNs3-1:JST_PH_B3B-PH-K_1x03_P2.00mm_VerticalJ8
1CH2s3-1:PinHeader_1x04_P2.54mmJ11
1ESP32-S3-WROOM-1-N16R8s3-1:ESP32-S3-WROOM-1U4
1EXPs3-1:PinHeader_2x10_P2.54mm_VerticalJ10
1HT7533-1s3-1:SOT-89-3U7
1LCDs3-1:JST_PH_B8B-PH-K_1x08_P2.00mm_VerticalJ7
1LIS2DW12s3-1:LGA-12_2x2mm_P0.5mm_LIS2DW12U2
1LOADCELLs3-1:PinHeader_1x05_P2.54mm_HJ2
1MLT-8530s3-1:MagneticBuzzer_CUI_CMT-8540S-SMTBZ1
1NAU7802SGIs3-1:SOIC-16_3.9x9.9mm_P1.27mmU1
1TMP102s3-1:SOT-563_1.6x1.6mm_P0.5mmU3
1TP4057-42s3-1:SOT-23-6U5
1TP_3V3s3-1:TestPoint_1.2mmTP10
1TP_AVDDs3-1:TestPoint_1.2mmTP8
1TP_BOOTs3-1:TestPoint_1.2mmTP4
1TP_ENs3-1:TestPoint_1.2mmTP3
1TP_GNDs3-1:TestPoint_1.2mmTP11
1TP_RXDs3-1:TestPoint_1.2mmTP6
1TP_SCLs3-1:TestPoint_1.2mmTP13
1TP_SDAs3-1:TestPoint_1.2mmTP12
1TP_TXDs3-1:TestPoint_1.2mmTP5
1TP_VBGs3-1:TestPoint_1.2mmTP7
1TP_VBUSs3-1:TestPoint_1.2mmTP9
1TYPE-C-31-M-12s3-1:USB_C_Receptacle_HRO_TYPE-C-31-M-12J5
1USBLC6-2SC6s3-1:SOT-23-6U8
1XC6220B331MR-Gs3-1:SOT-23-5U6

Similar boards

  • 2 layers96 × 50 mmPager, the printed circuit board in 3D

    Pager

    justinlindh/bramble

    Privacy-first LoRa mesh networking for ESP32-S3, built with ESP-IDF

    97 parts2MIT
  • 2 layers80 × 54 mmPl60c dmx, the printed circuit board in 3D

    Pl60c dmx

    tsmiltonAgents/pl60c-dmx-wakeup

    A small ESP32-S3 board that drives the wired DMX512 input of a Neewer PL60C panel light so the light can be ramped up slowly in the morning (sunrise alarm). Rev A, 2026-09-02.

    40 parts
  • 2 layers64 × 46 mmWeatherframe, the printed circuit board in 3D

    Weatherframe

    amselgesang/weatherframe_v01

    My weather station hardver

    50 partsMIT
  • 2 layers87.9 × 87.5 mmCreative controller, the printed circuit board in 3D

    Creative controller

    ZMGID/grokbot-home

    Grok Bot account migration home (secrets encrypted)

    59 parts
  • 2 layersEphemerkey, the printed circuit board in 3D

    Ephemerkey

    ephemerkey/ephemerkey

    The consumer half of the ephemerkey system, and the second PCB in this repo (alongside hardware/ephemerkey/, sharing the same scripts/kschgen.py engine, Makefile, and lib tables — the multi-project layout used by…

    70 parts
  • 4 layers84 × 41 mmWormControl Relay15x5t15-ControlBoard, the printed circuit board in 3D

    WormControl Relay15x5t15-ControlBoard

    makerspacelt/WormControl-Relay15x5t15-ControlBoard

    Dev NOTE: before commit, run ./kibot.sh to regenerate documentation, bom, gerbers and other assets.

    93 partsCERN-OHL-S-2.0
  • 2 layers24.5 × 53.4 mmEsp32 bno085, the printed circuit board in 3D

    Esp32 bno085

    nemonamo/esp32_bno085

    ESP32 + BNO085 KiCad hardware design project

    39 parts
  • 4 layers76 × 100 mmChlorine revD, the printed circuit board in 3D

    Chlorine revD

    kanengomibako/Chlorine

    206 parts11Unlicense

Questions

How big is the S3.1-before repack PCB?

It measures 90 × 55 mm and has 2 copper layers, 1.6 mm thick.

What parts does the S3.1-before repack use?

96 parts, built around the ESP32-S3-WROOM-1-N16R8, NAU7802SGI, HT7533-1 and LIS2DW12. 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 S3.1-before repack KiCad files?

From the puji4810/coffe-scale repository on GitHub, at the commit this page was made from: the board is pcb/s3.1/s3.1-before-repack.kicad_pcb and its schematic pcb/s3.1/s3.1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the S3.1-before repack design in my own project?

Its repository publishes it under the Apache-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).