

Light bicycle
存放N32工程项目
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 79
- Nets
- 105
- Pads
- 292
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 11 Jun 2025
- Updated
- 24 Dec 2025
Overview
Light bicycle is an open-source printed circuit board by BrookDawn, from the BrookDawn/N32_Project repository on GitHub. It is a 2-layer board with 79 parts on 105 nets.
It is built around the TP4056-42-ESOP8. Its parts include 34 capacitors, 19 resistors, 5 ICs, 5 connectors and 4 diodes.
Main components
1README
README.mdN32project
基于 Nations N32G430 微控制器 (ARM Cortex-M4) 的嵌入式开发项目,包含固件开发和硬件设计。
目录结构
N32project/
├── BLDC/ # BLDC电机控制器硬件设计 (KiCad)
├── Light_bicycle/ # 自行车灯硬件设计 (KiCad)
└── N32G430_HEX/ # N32G430主项目
├── Hardware/ # 开发板硬件设计
└── Software/ # 软件项目
├── N32G430_gcc_buffer/ # Modbus主从机项目
├── N32G430_gcc_buffer_rtthread/ # RT-Thread集成版本
├── N32G430_gcc_example/ # OLED驱动示例
├── N32G430_gcc_example_oled/ # OLED多屏幕适配
└── N32G430_g++/ # C++版本 (LED抽象层)主要功能模块
Modbus RTU 协议栈
完整的 Modbus RTU 主从机实现:
从机功能 (modbus_slave.c):
- 功能码: 0x01/0x02 (读线圈/离散输入), 0x03/0x04 (读保持/输入寄存器), 0x05/0x06 (写单个线圈/寄存器), 0x0F/0x10 (写多个线圈/寄存器)
- 256个保持寄存器, 64个输入寄存器, 64个线圈, 64个离散输入
- USART1 DMA中断通信
- CRC16校验和异常码响应
主机功能 (modbus_master.c):
- 寄存器轮询读取和写请求队列
- 支持功能码 0x03, 0x06, 0x10
- USART2 DMA通信
全局变量表 (modbus_vars.c):
- 预定义变量索引 (系统参数、PID参数、模拟量等)
- EEPROM保存支持
OLED 显示驱动
- 多屏幕支持: SSD1306 (0.96", 0.91"), SH1106 (1.3")
- 分辨率: 128x64, 128x32
- I2C DMA传输
- U8G2风格绘图API
- 分区刷新 (脏矩形跟踪)
- 动画系统和UI组件
LED 控制系统 (C++)
- 分层架构: 应用层 -> 抽象层 -> 适配层 -> BSP -> 硬件
- 状态管理和闪烁控制
- 平台无关设计
技术栈
| 类别 | 技术 |
|---|---|
| MCU | Nations N32G430 (ARM Cortex-M4, 128MHz, FPU) |
| 编译器 | ARM GCC (arm-none-eabi-gcc) |
| 调试器 | J-Link + SEGGER RTT |
| PCB设计 | KiCad |
| 通信协议 | Modbus RTU, I2C, USART (DMA) |
| 操作系统 | 裸机 / RT-Thread (可选) |
构建方法
cd N32G430_HEX/Software/N32G430_gcc_buffer
make # 编译
make flash # 下载到开发板
make clean # 清理编译配置:
- CPU: Cortex-M4
- FPU: fpv4-sp-d16 (硬件浮点)
- 优化: -Os
测试
Python测试脚本位于 test/ 目录:
python test/modbus_slave_test.py # Modbus从机测试
python test/modbus_vars_test.py # 变量表测试
python test/serial_test.py # 串口测试硬件项目
| 项目 | 说明 |
|---|---|
| BLDC电机控制器 | 无刷直流电机驱动板 |
| 自行车灯控制器 | 基于N32G430CBT7 |
| N32G430开发板 | 含Gerber制造文件 |
许可证
本项目仅供学习和参考使用。
Parts
79| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 0.75mm | SparkFun-Connector:TestPoint-0.75mm | TP1, TP2, TP3, TP4, TP5, TP6 |
| 6 | 100nF | SparkFun-Capacitor:C_0805_2012Metric | C18, C20, C29, C31, C32, C33 |
| 5 | 0.1uF | SparkFun-Capacitor:C_0603_1608Metric | C2, C3, C5, C10, C11 |
| 4 | 1uF | SparkFun-Capacitor:C_0603_1608Metric | C4, C12, C13, C16 |
| 4 | 5.1k | SparkFun-Resistor:R_0603_1608Metric | R1, R6, R18, R19 |
| 3 | 10uF | SparkFun-Capacitor:C_0805_2012Metric | C17, C28, C30 |
| 3 | 22uF | SparkFun-Capacitor:C_0805_2012Metric | C22, C23, C24 |
| 3 | SMD_4.2x3.2mm_h2.5mm | SparkFun-Switch:Push_SMD_4.2x3.2mm | SW1, SW2, SW3 |
| 2 | 100k | SparkFun-Resistor:R_0603_1608Metric | R3, R12 |
| 2 | 100nF | SparkFun-Capacitor:C_0603_1608Metric | C14, C15 |
| 2 | 10k | SparkFun-Resistor:R_0603_1608Metric | R4, R16 |
| 2 | 12pF | SparkFun-Capacitor:C_0603_1608Metric | C8, C9 |
| 2 | 1k | SparkFun-Resistor:R_0603_1608Metric | R5, R7 |
| 2 | 2k | SparkFun-Resistor:R_0603_1608Metric | R15, R17 |
| 2 | 9pF | SparkFun-Capacitor:C_0603_1608Metric | C6, C7 |
| 2 | Red | SparkFun-LED:LED_0603_1608Metric_Red | D1, D3 |
| 2 | SWD | SparkFun-Connector:1x04 | J3, J4 |
| 1 | 0 | SparkFun-Resistor:R_0603_1608Metric | R2 |
| 1 | 0.2R | SparkFun-Resistor:R_1206_3216Metric | R14 |
| 1 | 1.5k | SparkFun-Resistor:R_0603_1608Metric | R10 |
| 1 | 1.5uH | SparkFun-Coil:Inductor_7.3x6.6mm | L1 |
| 1 | 10nF | SparkFun-Capacitor:C_0603_1608Metric | C34 |
| 1 | 10pF | SparkFun-Capacitor:C_0603_1608Metric | C27 |
| 1 | 1uF | SparkFun-Capacitor:C_0805_2012Metric | C25 |
| 1 | 2.2uF | SparkFun-Capacitor:C_0603_1608Metric | C19 |
| 1 | 220 | SparkFun-Resistor:R_0603_1608Metric | R8 |
| 1 | 269k | SparkFun-Resistor:R_0603_1608Metric | R13 |
| 1 | 3.3nF | SparkFun-Capacitor:C_0603_1608Metric | C26 |
| 1 | 32.768kHz | SparkFun-Clock:Crystal_SMD_3.2x1.5mm | Y2 |
| 1 | 4.7k | SparkFun-Resistor:R_0603_1608Metric | R11 |
| 1 | 4.7uF | SparkFun-Capacitor:C_0603_1608Metric | C1 |
| 1 | 47nF | SparkFun-Capacitor:C_0603_1608Metric | C21 |
| 1 | 62k | SparkFun-Resistor:R_0603_1608Metric | R9 |
| 1 | 8MHz | SparkFun-Clock:Crystal_SMD_3.2x2.5mm | Y1 |
| 1 | Blue | SparkFun-LED:LED_0603_1608Metric_Blue | D2 |
| 1 | Green | SparkFun-LED:LED_0603_1608Metric_Red | D4 |
| 1 | TP4056-42-ESOP8 | Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalVias | U4 |
| 1 | USART1 | SparkFun-Connector:JST_SMD_1.25mm-3_Locking | J1 |
| 1 | USB_C_Receptacle | SparkFun-Connector:USB-C_16 | J5 |
| 1 | ~ | BrookDawn_Library:TPS61088RHLR | U3 |
| 1 | ~ | BrookDawn_Library:MPU6500 | U5 |
| 1 | ~ | Power_BrookDawn:SGM2019 | U2 |
| 1 | ~ | N32:QFP-48_8.35x8.35_Pitch0.5mm | U1 |
| 1 | 电池 | SparkFun-Connector:1x02 | J2 |
More from BrookDawn/N32_Project
2- 4 layers30.3 × 25 mm

- 2 layers52.8 × 20.8 mm

Similar boards
- 2 layers60 × 111.3 mm

Silkscreen pcb
iandchasse/silkscreen-pcb
Silkscreen: open-hardware ESP32-S3 e-paper reader mainboard (KiCad 9). Formerly the de-link hub.
189 parts589CERN-OHL-S-2.0 - 2 layers96.8 × 91.4 mm

- 2 layers51 × 21 mm

FOX JACK EXT BOARD TOP
KaliAssistant/Fox-Jack
Portable social-engineering LAN tool for automated payloads and wired audits — based on Luckfox Pico Max
35 parts22GPL-3.0 - 2 layers31.3 × 67 mm

- 4 layers88 × 58 mm

- 2 layers210 × 31 mm

Trhw
nimitvijayvargee/trhw
This is an RP2040 ruler that implements wifi, bluetooth, BLE along with a 4MB Flash storage, LEDs, Input buttons and some cool units and lengths!
59 parts8 - 2 layers78 × 36 mm

Bt nes advantage pcb
cajunpanda/bluetooth-nes-advantage
A bluetooth mod for the NES Advantage classic controller.
45 parts7MIT - 2 layers61 × 61 mm

ESP32 FC
MAATHES-THILAK-K/ESP32-S3_FLIGHT_CONTROLLER
A custom-designed flight controller based on the ESP32-S3 module, built for compatibility with the esp-fc firmware and Betaflight-like configuration.
69 parts7Apache-2.0
Questions
What parts does the Light bicycle use?
79 parts, built around the TP4056-42-ESOP8. 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 Light bicycle KiCad files?
From the BrookDawn/N32_Project repository on GitHub, at the commit this page was made from: the board is Light_bicycle/Hareware/light_bicycle/light_bicycle.kicad_pcb and its schematic BLDC/ProPrj_BLDCcontroller_2025-09-27/ProPrj_BLDCcontroller_2025-09-27.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Light bicycle design in my own project?
Its repository states no licence, so its author keeps all rights: ask BrookDawn before reusing the design.