Skip to the content
2 layers14 × 57 mmUsb c traffic light board, the printed circuit board in 3D

Usb c traffic light board

lemonhall/usb-c-traffic-light-board

这是一个用于替换原红绿灯小板的项目。目标是做一块新的 57mm x 14mm 电路板,通过 USB-C 供电,并让电脑通过 USB 串口控制红、黄、绿三颗灯。

Size
14 × 57 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
16
Pads
67
Tracks, vias
81, 17
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
25 May 2026
Updated
25 May 2026

Overview

Usb c traffic light board is an open-source printed circuit board by lemonhall, from the lemonhall/usb-c-traffic-light-board repository on GitHub. It is a 2-layer board of 14 × 57 mm with 18 parts on 16 nets, routed with 81 tracks and 17 vias.

It is built around the CH552G. Its parts include 7 resistors, 3 capacitors, 3 diodes, 1 IC and 1 connector. It belongs with the 8051 (CH55x, STC, AT89) boards of this library.

Main components

1

README

README.md

USB-C 红绿灯控制板

这是一个用于替换原红绿灯小板的项目。目标是做一块新的 57mm x 14mm 电路板,通过 USB-C 供电,并让电脑通过 USB 串口控制红、黄、绿三颗灯。

目标

  • 完全替换原来的小电路板。
  • 使用 USB-C 供电。
  • 通过 USB-C 连接电脑,由电脑控制三颗灯。
  • 电脑端识别为虚拟串口,方便脚本控制。
  • 尽量避免飞线,最终装配时只使用这一块新板。

当前机械假设

  • 板长:57mm
  • 板宽:14mm
  • 当前板框已经按原板照片改成上下梯形端部和左右半圆避让槽。
  • 三颗灯从上到下为:绿、黄、红;灯中心按从板底往上约 50mm、28mm、7mm 复核。
  • 上螺丝孔直径 2mm,孔边离上端梯形窄边约 1mm。
  • 下螺丝孔直径 2mm,孔中心离板顶约 33mm,位于板子左侧、靠近从下往上第二组避让槽。
  • USB-C 目标位置对应原拨动开关穿出后壳的位置;原开关伸出背面约 10mm,开口宽度约 10mm。
  • 注意:当前 KiCad 里 USB_C_Receptacle_G-Switch_GT-USB-7025 是 right-angle 占位封装,不是最终可下单的立式背出 USB-C;最终必须按实物型号替换封装和 3D 机械模型。

下一步顺序

  1. 机械复核:量原板孔位、缺口、圆角、灯中心坐标、USB-C 后壳开口位置,把板框从当前矩形改成更贴原壳的形状。
  2. USB-C 完整性复核:按最终采购的连接器封装,复核 VBUS、GND、CC1、CC2、D+、D-,确认正反插都能稳定供电和通信。
  3. 生成生产文件:用 KiCad CLI 导出 Gerber 和钻孔文件,再用 Gerber 预览检查铜层、板框、孔、阻焊和丝印。
  4. 小批打样前审查:逐项核对 BOM、封装方向、LED 极性、USB-C 型号、CH552G 供电和下载方式。

当前建议先做第 1 步和第 2 步。它们决定这块板能不能真的塞回外壳,以及插上电脑后能不能稳定识别。

电气方案

  • 主控:沁恒 CH552G,小封装、带原生 USB。
  • USB-C:
    • 电脑 USB-C 默认 VBUS 提供 5V。
    • 本板只作为普通受电设备,不做 USB PD 高压协商。
    • D+ / D- 接到主控 USB 引脚。
    • CC1 / CC2 各接一个 5.1k 下拉电阻到地,只做受电设备。
  • 三颗灯:
    • 每颗灯单独串限流电阻。
    • 每颗灯由一个主控 GPIO 控制。
    • 固件可用 PWM 分别控制三颗灯亮度,也可以控制任意组合同时亮、闪烁或呼吸。
    • 第一版按低亮度指示灯设计,目标电流约 2-5mA。
  • 调试:
    • 预留 5V、GND、D+、D-、复位、三路灯控制测试焊盘。

串口协议草案

电脑通过虚拟串口发送一行文本命令:

text
R 1
R 0
Y 1
Y 0
G 1
G 0
A 0
A 1
S 1 0 1
?

返回示例:

text
OK
ERR 1
S R=1 Y=0 G=1

文件说明

  • docs/hardware/requirements.md:需求和边界。
  • docs/hardware/bom.md:第一版物料清单。
  • docs/hardware/pinout.md:引脚和网络分配。
  • docs/hardware/mechanical-measurement-guide.md:原板外轮廓和孔位测量指南。
  • docs/hardware/serial-protocol.md:电脑控制协议。
  • docs/hardware/schematic.md:完整原理图连接说明。
  • docs/hardware/schematic.svg:可直接打开查看的完整原理图。
  • docs/hardware/pcb-layout.svg:第一版 PCB 顶层布局草案。
  • references/original-board-photo.md:原板照片观察记录。
  • kicad/:KiCad 工程骨架和第一版板框。
  • firmware/README.md:固件设计说明。
  • pc-control/traffic_light.py:电脑端串口控制小脚本。

已查资料

Parts

18
QtyValueFootprintReferences
31kR_0603_1608MetricR1, R2, R3
2100nFC_0603_1608MetricC2, C3
222RR_0603_1608MetricR4, R5
25.1kR_0603_1608MetricR6, R7
110uFC_0805_2012MetricC1
1CH552GSOIC-16_3.9x9.9mm_P1.27mmU1
1RSTTestPoint_Pad_D1.0mmTP1
1上螺丝孔MountingHole_2mmH1
1下螺丝孔MountingHole_2mmH2
1橙灯LED_1206_3216MetricD2
1红灯LED_1206_3216MetricD3
1绿灯LED_1206_3216MetricD1
1背面USB-CUSB_C_Receptacle_G-Switch_GT-USB-7025J1

Similar boards

  • 2 layers30.4 × 12.7 mmDaplink CH552P, the printed circuit board in 3D

    Daplink CH552P

    abgelehnt/Tiny-DAPLink

    小巧的使用CH552实现的DAPLink

    21 parts41GPL-3.0
  • 2 layers40.6 × 27.9 mmCH552, the printed circuit board in 3D

    CH552

    nicola-strappazzon/CH552

    Basic projects with CH552G

    23 parts37LGPL-2.1
  • 2 layers40 × 40 mmBottom, the printed circuit board in 3D

    Bottom

    Noteolvides/CubeTouch

    CubeTouch Docs

    35 parts14MIT
  • 2 layers38.6 × 15.7 mmLIPS V3.2, the printed circuit board in 3D

    LIPS V3.2

    milar111/L.I.P.S.

    OpenSource Affordable SipAndPuff device: Linear Interface for Paralysis Support

    21 parts13
  • 2 layers28.4 × 15.9 mmCH552-devkit, the printed circuit board in 3D

    CH552-devkit

    hexeguitar/CH552-devkit

    CH552 dev board with HW reboot into bootloader

    25 parts6MIT
  • 2 layers51 × 44 mmCh552g devbrd, the printed circuit board in 3D

    Ch552g devbrd

    eddyem/ch55x

    Some usefull things for working with ch55x chips

    19 parts5GPL-3.0
  • 2 layers105.9 × 83.1 mmBSidesDFW 2019, the printed circuit board in 3D

    BSidesDFW 2019

    gowenrw/BSidesDFW_2019_Badge

    This is where all the files for the BSidesDFW 2019 Badge will be stored. This includes code and art and cab and fab files. All the things.

    30 parts5MIT
  • 2 layers43.2 × 24.9 mmPip, the printed circuit board in 3D

    Pip

    jnthas/pinch

    Password storage for nerds

    37 parts5MIT

Questions

How big is the Usb c traffic light board PCB?

It measures 14 × 57 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Usb c traffic light board use?

18 parts, built around the CH552G. 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 Usb c traffic light board KiCad files?

From the lemonhall/usb-c-traffic-light-board repository on GitHub, at the commit this page was made from: the board is kicad/usb_c_traffic_light_board.kicad_pcb and its schematic kicad/usb_c_traffic_light_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Usb c traffic light board design in my own project?

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