Skip to the content
4 layers28.4 × 22.1 mmLed bage sample, the printed circuit board in 3D

The badge to end all badges, cutomizable functions, crazy tight led matrix

Size
28.4 × 22.1 mm
Copper layers
4
Thickness
1.6 mm
Parts
136
Nets
110
Pads
490
Tracks, vias
470, 213
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
4 Feb 2026
Updated
30 Oct 2026

Overview

Led bage sample is an open-source printed circuit board by caesarakalaeii, from the caesarakalaeii/rgb-badge repository on GitHub, published under the AGPL-3.0 licence. It is a 4-layer board of 28.4 × 22.1 mm with 136 parts on 110 nets, routed with 470 tracks and 213 vias.

It is built around the 74AHCT1G125SE, XL-1010RGBC-WS2812B-DZ and CL21B105KAFNNNE, with the AO4407A, CL21A106KAYNNNE and RCT02100KFLF among its other parts. Its parts include 100 diodes, 28 capacitors, 4 resistors, 2 ICs and 1 transistor. It belongs with the lEDs and displays boards of this library.

Main components

7

README

README.md

Ultra-High-Density RGB Matrix Badge

A wearable RGB matrix badge featuring 2560 individually addressable LEDs on a 71 × 150 mm board with a 62.5 × 104 mm portrait display area.

Project Overview

This project implements an ultra-dense LED matrix badge designed for human viewing (not camera-optimized) with parallel data lanes to achieve smooth 60+ FPS refresh rates. The design uses a two-board architecture separating the dense LED matrix from controller/power electronics for improved manufacturability and maintainability.

Key Specifications

ParameterValue
Display Area62.5 mm × 104 mm (portrait)
Resolution40 × 64 pixels (2560 total)
Board Size71 mm × 150 mm, 5 mm corner radius
Pixel Pitch1.5625 mm (X) × 1.625 mm (Y)
Target Refresh Rate60+ FPS
Power SourceUSB-C PD Powerbank
Quantity~10 boards
PCB ToolKiCad

Resolution Preview

A quick browser-based mockup of the 40 × 64 LED grid lives in mockup/. It cycles through 11 test animations (rainbow, plasma, sparkle, scrolling text, rings, matrix rain, A* snake, thumbs-up, pride flag, a multi-scene cat, and a video-driven Bad Apple) so you can sanity-check what 2560 LEDs at this pitch can actually display before writing firmware.

Run from the repo root:

bash
python3 -m http.server -d mockup 8000
# then open http://localhost:8000/

Cycle with ← / → arrow keys or the on-screen buttons; space pauses.

Development Environment

nix develop provides KiCad (with import pcbnew working from plain Python), PlatformIO, ffmpeg and the linters. nix flake show lists the available commands.

Board layout changes are scripted in cad/ and checked end to end (outline, lanyard holes, power-entry wiring, silkscreen art, fab minimums, fab outputs, JLCPCB assembly files, DRC with schematic parity) by:

bash
python3 cad/test_board.py

Fab outputs (6-layer Gerbers + drill and their zip, BOM, centroid, and the JLCPCB BOM/CPL with LCSC parts and placement corrections, ADR 0004) are regenerated into cad/fab/ by:

bash
python3 cad/export_fab.py

Design decisions are recorded in docs/adr/.

Hardware Architecture

Two-Board Design

1. Matrix PCB (cad/led_bage.*)

Matrix PCB layout: 71 × 150 mm board, lanyard holes and J2 in the top band, LED field, bulk caps along the bottom

  • Dense 64×40 LED array, 8 chains of 320 LEDs (refs DA1..DH320)
  • 6-layer stackup: F.Cu | GND | VDD_S | VDD_S | GND | B.Cu, two fanout vias per LED
  • Input protection on board: reverse-polarity P-FET (Si7145DP, drain on the input) + SMBJ6.0CA TVS, copper pours for the ~30 A input path (ADR 0002)
  • Connectors: J1 data (Molex CLIK-Mate 8-pin), J2 power (JST VH 10-pin, back side, cable exits the top edge)
  • Rounded-rectangle outline with two 5 mm plated lanyard holes in a top band beside J2 (ADR 0001)
  • Silkscreen artwork in the top-right corner (front view) of both sides, traced from cad/art/front.png / back.png (1-bit exports of the artist's PSD layers, canvas = board outline) by cad/add_silkscreen_art.py
  • Design rules sized for PCBWay standard capability: 0.1 mm track/space floor, data nets in a 0.1 mm Data netclass (ADR 0003)
  • Optimized for minimal rework risk

A 100-LED sample board (cad/led_bage_sample/) has been fabricated as a reference.

2. Controller/Power PCB
  • ESP32-S3 microcontroller
  • USB-C Power Delivery circuitry
  • Buck converter (PD voltage → 5V)
  • 3.3V regulator for MCU
  • Level shifters (3.3V → 5V for LED data)
  • Power switch and protection
  • Easy to iterate/upgrade without risking LED matrix

Rationale: Separating control from display allows safe iteration on USB/PD/MCU without risking the expensive, dense LED field.

Component Selection

LED: XINGLIGHT XL-1010RGBC-2812B

Why this LED:

  • Cost: ~€0.03/pixel at volume (extremely competitive)
  • Package: 1.0×1.0×0.8 mm (1010 SMD)
  • Protocol: WS2812B-compatible (1-wire smart RGB)
  • Supply: 3.5–5.5V (100% functional at 4.5–5.5V)
  • PWM: ~1.0 kHz, 256 grayscale steps per channel
  • Timing: ~1.2 µs per bit (~800 kbps class)

Electrical Characteristics:

  • VDD: 3.5–5.5V (running at 5V)
  • DIN VIH (min): 2.8V, VIL (max): 1.6V
  • Optimized current: ~5 mA/channel → ~15 mA/pixel at full white
  • Full array theoretical max: 2560 × 15 mA = 38.4A @ 5V (192W)

Footprint Details:

  • 4× corner pads, 0.40 mm × 0.40 mm each
  • Body-to-body clearance: ~0.56–0.63 mm at chosen pitch
  • Minimal courtyard required for dense packing

Microcontroller: ESP32-S3

Selection criteria:

  • Sufficient GPIO for 8+ parallel data lanes
  • DMA-capable for smooth LED updates
  • Good headroom for complex animations
  • 3.3V I/O (requires level shifting to 5V LEDs)
  • Well-supported by Arduino/ESP-IDF ecosystems

Power Architecture

Strategy: PD Negotiation → Buck Conversion
text
USB-C PD Powerbank (25000mAh, 145W class)
    ↓ (negotiated at 9V baseline, 12V/15V/20V optional)
Buck Converter
    ↓ (5V rail for LEDs)
LED Matrix (capped brightness in firmware)
    +
    ↓ (3.3V regulator)
ESP32-S3 + Logic

PD Voltage Selection:

  • Baseline: 9V PD (maximum compatibility)
  • Higher voltages (12V/15V/20V) reduce cable current but may not be universally available
  • Buck converter sized for 8–12A continuous @ 5V (40–60W with safety margin)

Rationale:

  • Reduces cable/connector current stress
  • Provides stable 5V rail despite powerbank voltage
  • Allows brightness capping in firmware to manage realistic power draw

Data Distribution Architecture

8-Lane Parallel Design

Mapping:

  • 8 data lanes, each driving 320 pixels
  • Each lane: 8 rows × 40 columns, serpentine
  • Lanes arranged as horizontal bands down the 64-row display

Refresh Math (per lane):

text
1 pixel = 24 bits × 1.2 µs ≈ 28.8 µs
320 pixels ≈ 9.22 ms
+ Reset time (>200 µs) ≈ 9.4–9.8 ms total
→ Max refresh ≈ 100+ FPS per lane

Actual target: 60 FPS with comfortable headroom

Signal Integrity

Level Shifting
  • ESP32 outputs: 3.3V logic
  • LED inputs: require high VIH @ 5V supply
  • Solution: Fast 3.3V→5V level shifters, one per lane
Series Resistors (Multi-Purpose Protection)

At level shifter output:

  • 33–68Ω close to shifter
  • Purpose: Signal integrity, prevent overshoot/ringing on short traces

Optional at matrix connector:

  • 220–500Ω (stuff if needed)
  • Purpose: Protection against live-plug transients, cable inductance
  • Datasheet recommends "protective resistors" and mentions 20Ω–2kΩ range

PCB Design Considerations (KiCad)

Matrix PCB Layout

LED Footprint Settings
text
Pads: 4× corner pads, 0.40mm × 0.40mm
Courtyard: Minimal (allow overlap for dense packing)
Soldermask: Conservative expansion per fab limits
Pitch: 1.5625mm (X) × 1.625mm (Y)
Placement Strategy
  1. Create LED footprint with tight courtyard
  2. Place first LED
  3. Use Rectangular Array Placement for 64×40 grid
  4. Disable clearance outline visualization in Appearance panel if needed
  5. Verify soldermask web meets fab minimums
Decoupling Strategy

Datasheet requirement: "Decoupling capacitance between each LED is essential"

Implemented:

  • 640× 1 µF 0603 on B.Cu, one per 2×2 LED block, rotated 45° between fanout vias
  • 10× 100 µF polymer bulk caps in 5 front/back pairs along the bottom edge of the grid

Power Distribution

Primary concern: Transients and current steps, not just average power

Design for:

  • Fast load steps as LEDs switch between frames
  • Large bulk capacitance on 5V rail near buck converter
  • Low-impedance power distribution across matrix
  • Star or mesh power routing to minimize voltage drop

Enforcement: Global brightness limiting in firmware to prevent exceeding powerbank capability

Manufacturing Constraints

Reflow Profile (from LED datasheet)

  • Peak temperature: 260°C for 6 seconds maximum
  • Maximum reflow cycles: 2
  • Implication: Don't risk matrix board with unnecessary rework

Hand Soldering (rework only)

  • Iron: <30W, <300°C
  • Contact time: <3 seconds per terminal
  • One touch per terminal maximum

Moisture Sensitivity

  • Store sealed with desiccant
  • After opening: use quickly in low humidity
  • If compromised: bake at 60°C for 24 hours before use

Recommendation: Order LEDs in moisture-barrier bags, open only when ready for assembly, and complete assembly quickly.

Development Roadmap

Current Status: Matrix PCB Layout

Completed
  • LED selection and validation
  • Architecture decisions (two-board, 8-lane)
  • Power strategy (PD negotiation + buck)
  • LED footprint and 64×40 grid placement
  • 100-LED sample board fabricated
  • Matrix PCB: fanout vias, decoupling, bulk caps, 6-layer power planes
  • Matrix PCB: all 8 data chains routed (0 unconnected items in DRC)
  • Matrix PCB: input protection and J1/J2 connectors
  • Matrix PCB: rounded-rectangle outline and lanyard holes
  • Matrix PCB: front and back silkscreen artwork
Next Steps
  1. Matrix PCB Finish

    • Clear DRC and schematic-parity warnings
    • Order 5 boards with turnkey assembly from PCBWay or JLCPCB (Gerbers, BOM, centroid in cad/fab/)
  2. Controller/Power PCB

    • Define brightness cap (e.g., max 20W from bank)
    • Size buck converter and output capacitors
    • Schematic and layout, mating to J1/J2 on the matrix board
  3. Firmware Architecture

    • ESP32-S3 parallel output driver using DMA
    • Brightness limiting enforcement
    • Animation framework
    • USB power negotiation handling
  4. Prototype & Test

    • Order small batch (1-2 sets)
    • Validate assembly process
    • Test refresh rates and power consumption
    • Iterate before production run

Bill of Materials (Estimated)

ComponentQuantityUnit CostTotal
XL-1010RGBC-2812B LED2560€0.03€76.80
ESP32-S3 Module1~€5€5
Buck Converter IC + passives1~€2-5€3.50
Level Shifters (8ch)1-2~€1€2
PCBs (Matrix + Controller)2~€30-50€40
Connectors, passives, misc--€10-20
Total per badge (estimate)~€140-150

Note: Costs are rough estimates and will vary with supplier, quantity, and shipping.

References

  • LED Datasheet: XINGLIGHT XL-1010RGBC-2812B (WS2812B protocol)
  • MCU: ESP32-S3 Technical Reference Manual
  • Target Powerbank: UGREEN Nexode 145W Max 25000mAh (or equivalent USB-C PD)

Design Philosophy

Key Principles:

  1. Human-optimized, not camera-optimized – No special PWM requirements for video compatibility
  2. Maintainability over integration – Two-board design allows safe iteration
  3. Parallel over serial – 8 data lanes enable smooth refresh without exotic protocols
  4. Design for manufacturing – Minimize rework risk on dense LED matrix
  5. Power awareness – Design for transients and steps, enforce limits in firmware

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.

Contributors


Project Status: Active Development Last Updated: 2026-10-17

Parts

136
QtyValueFootprintReferences
100XL-1010RGBC-WS2812BLED_SMD:LED_WS2812B-1010_PLCC4_1.0x1.0mmD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D100 +84
25CL21B105KAFNNNECapacitor_SMD:C_0603_1608MetricC1, C2, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23 +9
20.1uF_0603_16VCapacitor_SMD:C_0603_1608MetricC26, C27
274AHCT1G125JLCPCB:SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BLU1, U2
2RCT02330RFLFResistor_SMD:R_0402_1005MetricR1, R2
1AO4407AAO4407A:SOIC127P600X175-8NQ2
1CL21A106KAYNNNECapacitor_SMD:C_0805_2012MetricC28
1Conn_01x06Connector_JST:JST_SH_BM06B-SRSS-TB_1x06-1MP_P1.00mm_VerticalJ1
1RCT02100KFLFResistor_SMD:R_0402_1005MetricR3
1RCT0210KFLFResistor_SMD:R_0402_1005MetricR4

More from caesarakalaeii/rgb-badge

1
  • 6 layers71.1 × 150.1 mmLed bage, the printed circuit board in 3D

    Led bage

    caesarakalaeii/rgb-badge

    The badge to end all badges, cutomizable functions, crazy tight led matrix

    3,235 partsAGPL-3.0

Similar boards

  • 2 layers52.8 × 55 mmILDAWaveX16, the printed circuit board in 3D

    ILDAWaveX16

    stanleyondrus/ILDAWaveX16

    ILDAWaveX16 is an open-source, high-resolution, wireless laser DAC with SD-card playback, network control, and ILDA output.

    95 parts42
  • 2 layers62 × 6 mmTableLight, the printed circuit board in 3D

    TableLight

    jonny190/TableLight

    A 3D-printable, battery-powered, USB-C rechargeable table lamp in the classic "Poldina" shape - honeycomb disc base, thin stem, down-firing cone shade with a white top - running WLED on an ESP32, with a capacitive touch…

    72 partsMIT
  • 2 layers58 × 42 mmAquarium mine ctrl, the printed circuit board in 3D

    Aquarium mine ctrl

    develmusa/Thermomine

    Thermomine is a 3D-printed naval mine that sits on the gravel of your tank. A sealed LED inside glows blue when the water is too cold, green when it's just right, and red when it's too warm.

    25 parts
  • 2 layers131.2 × 132.5 mmMacropad, the printed circuit board in 3D

    Macropad

    earthtojake/text-to-cad

    Design physical products with AI

    73 parts26kMIT
  • 4 layers110 × 64 mmSYCL Badge 2024, the printed circuit board in 3D

    SYCL Badge 2024

    ZigEmbeddedGroup/sycl-badge

    The badge for the SYCL conference! https://zigembeddedgroup.github.io/sycl-badge/

    145 parts39
  • 2 layers38 × 16.6 mmMeeprom, the printed circuit board in 3D

    Meeprom

    bkw777/Teeprom

    These are all virtual UV EPROMS / virtual mask roms, using electrically programmable EEPROM, FRAM, or FLASH with the pinout adapted to work in place of 27Cxx UV/OTP EPROMS or standard mask roms, on a specially shaped…

    8 parts7CC-BY-SA-4.0
  • 4 layers74.4 × 50.2 mmRoadster charger, the printed circuit board in 3D

    Roadster charger

    zainahm3d/roadster-charger

    USB-C PD bike charger

    109 parts7

Questions

How big is the Led bage sample PCB?

It measures 28.4 × 22.1 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Led bage sample use?

136 parts, built around the 74AHCT1G125SE, XL-1010RGBC-WS2812B-DZ, CL21B105KAFNNNE and AO4407A. 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 Led bage sample KiCad files?

From the caesarakalaeii/rgb-badge repository on GitHub, at the commit this page was made from: the board is cad/led_bage_sample/led_bage_sample.kicad_pcb and its schematic cad/led_bage.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Led bage sample design in my own project?

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