Skip to the content
2 layersLight bicycle, the printed circuit board in 3D

存放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

1

README

README.md

N32project

基于 Nations N32G430 微控制器 (ARM Cortex-M4) 的嵌入式开发项目,包含固件开发和硬件设计。

目录结构

text
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 -> 硬件
  • 状态管理和闪烁控制
  • 平台无关设计

技术栈

类别技术
MCUNations 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 (可选)

构建方法

bash
cd N32G430_HEX/Software/N32G430_gcc_buffer
make          # 编译
make flash    # 下载到开发板
make clean    # 清理

编译配置:

  • CPU: Cortex-M4
  • FPU: fpv4-sp-d16 (硬件浮点)
  • 优化: -Os

测试

Python测试脚本位于 test/ 目录:

bash
python test/modbus_slave_test.py   # Modbus从机测试
python test/modbus_vars_test.py    # 变量表测试
python test/serial_test.py         # 串口测试

硬件项目

项目说明
BLDC电机控制器无刷直流电机驱动板
自行车灯控制器基于N32G430CBT7
N32G430开发板含Gerber制造文件

许可证

本项目仅供学习和参考使用。

Parts

79
QtyValueFootprintReferences
60.75mmSparkFun-Connector:TestPoint-0.75mmTP1, TP2, TP3, TP4, TP5, TP6
6100nFSparkFun-Capacitor:C_0805_2012MetricC18, C20, C29, C31, C32, C33
50.1uFSparkFun-Capacitor:C_0603_1608MetricC2, C3, C5, C10, C11
41uFSparkFun-Capacitor:C_0603_1608MetricC4, C12, C13, C16
45.1kSparkFun-Resistor:R_0603_1608MetricR1, R6, R18, R19
310uFSparkFun-Capacitor:C_0805_2012MetricC17, C28, C30
322uFSparkFun-Capacitor:C_0805_2012MetricC22, C23, C24
3SMD_4.2x3.2mm_h2.5mmSparkFun-Switch:Push_SMD_4.2x3.2mmSW1, SW2, SW3
2100kSparkFun-Resistor:R_0603_1608MetricR3, R12
2100nFSparkFun-Capacitor:C_0603_1608MetricC14, C15
210kSparkFun-Resistor:R_0603_1608MetricR4, R16
212pFSparkFun-Capacitor:C_0603_1608MetricC8, C9
21kSparkFun-Resistor:R_0603_1608MetricR5, R7
22kSparkFun-Resistor:R_0603_1608MetricR15, R17
29pFSparkFun-Capacitor:C_0603_1608MetricC6, C7
2RedSparkFun-LED:LED_0603_1608Metric_RedD1, D3
2SWDSparkFun-Connector:1x04J3, J4
10SparkFun-Resistor:R_0603_1608MetricR2
10.2RSparkFun-Resistor:R_1206_3216MetricR14
11.5kSparkFun-Resistor:R_0603_1608MetricR10
11.5uHSparkFun-Coil:Inductor_7.3x6.6mmL1
110nFSparkFun-Capacitor:C_0603_1608MetricC34
110pFSparkFun-Capacitor:C_0603_1608MetricC27
11uFSparkFun-Capacitor:C_0805_2012MetricC25
12.2uFSparkFun-Capacitor:C_0603_1608MetricC19
1220SparkFun-Resistor:R_0603_1608MetricR8
1269kSparkFun-Resistor:R_0603_1608MetricR13
13.3nFSparkFun-Capacitor:C_0603_1608MetricC26
132.768kHzSparkFun-Clock:Crystal_SMD_3.2x1.5mmY2
14.7kSparkFun-Resistor:R_0603_1608MetricR11
14.7uFSparkFun-Capacitor:C_0603_1608MetricC1
147nFSparkFun-Capacitor:C_0603_1608MetricC21
162kSparkFun-Resistor:R_0603_1608MetricR9
18MHzSparkFun-Clock:Crystal_SMD_3.2x2.5mmY1
1BlueSparkFun-LED:LED_0603_1608Metric_BlueD2
1GreenSparkFun-LED:LED_0603_1608Metric_RedD4
1TP4056-42-ESOP8Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalViasU4
1USART1SparkFun-Connector:JST_SMD_1.25mm-3_LockingJ1
1USB_C_ReceptacleSparkFun-Connector:USB-C_16J5
1~BrookDawn_Library:TPS61088RHLRU3
1~BrookDawn_Library:MPU6500U5
1~Power_BrookDawn:SGM2019U2
1~N32:QFP-48_8.35x8.35_Pitch0.5mmU1
1电池SparkFun-Connector:1x02J2

More from BrookDawn/N32_Project

2

Similar boards

  • 2 layers60 × 111.3 mmSilkscreen pcb, the printed circuit board in 3D

    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 mmInkbadge, the printed circuit board in 3D

    Inkbadge

    cheyao/inkbadge

    Undercity eink PCB badges controlled by a rp2350

    98 parts22
  • 2 layers51 × 21 mmFOX JACK EXT BOARD TOP, the printed circuit board in 3D

    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 mmRPBoard², the printed circuit board in 3D

    RPBoard²

    euvalennn/rpboard-squared

    Simple RP2350-based devboard

    63 parts9
  • 4 layers88 × 58 mmECG V-0.2, the printed circuit board in 3D

    ECG V-0.2

    Doenec/ecg-esp32

    open source project ecg with esp32 and ad8232

    115 parts8
  • 2 layers210 × 31 mmTrhw, the printed circuit board in 3D

    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 mmBt nes advantage pcb, the printed circuit board in 3D

    Bt nes advantage pcb

    cajunpanda/bluetooth-nes-advantage

    A bluetooth mod for the NES Advantage classic controller.

    45 parts7MIT
  • 2 layers61 × 61 mmESP32 FC, the printed circuit board in 3D

    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.