Skip to the content
4 layers70 × 90 mmTruecolors driver, the printed circuit board in 3D

Truecolors driver

whosmatt/truecolors

110% BT.2020 Mood Light based on the Nichia NUMB12 RGB Laser Array

Size
70 × 90 mm
Copper layers
4
Thickness
1.64 mm
Parts
110
Nets
76
Pads
418
Tracks, vias
441, 106
Pours
14
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
13 Jun 2026
Updated
23 Oct 2026

Overview

Truecolors driver is an open-source printed circuit board by whosmatt, from the whosmatt/truecolors repository on GitHub, published under the MIT licence. It is a 4-layer board of 70 × 90 mm with 110 parts on 76 nets, routed with 441 tracks and 106 vias.

It is built around the AMS1117-3.3, CH224A and 3296W-1-254LF, with the AOD413A(UMW), APH1265T220M and SBR8U60P5-13D among its other parts. Its parts include 43 capacitors, 27 resistors, 7 ICs, 4 diodes and 4 transistors. It belongs with the ESP32 boards of this library.

Main components

12

README

README.md

[!CAUTION] This is not a manual! This repository serves as documentation only, use at your own risk.

truecolors

This project captures a lot of embedded approaches I have picked up over the years and serves as my main ESP-IDF reference template for new projects that involve an embedded web UI w/ provisioning and OTA.

Wide color gamut RGB Laser Mood Light

I designed this light after growing fascinated with wide color gamut (110% BT.2020) rgb laser projectors. The colors are more vibrant and saturated than anything else. Even the best OLED screens look orange in comparison to the deep red produced by the almost monochromatic lasers.
I got my hands on a Nichia NUMB12 Laser module, a very common module used in low to mid-tier RGB laser projectors.
Unfortunately, the module is challenging to drive:

  • Common cathode rules out most buck drivers which rely on a cathode shunt
  • Forward voltage is very different between the green and red/blue channels
  • Laser diodes are much more sensitive to overcurrent than LEDs
  • The common cathode has a lower rating than the combined maximum currents, so staggered PWM is required to stay within the ratings

Beyond color gamut, this project also focuses on advanced audio reactive effects. Frustrated with RMS multiband effects, I trained a model to predict the presence and offset of beats in live audio, along with tagging drum hits.
This allows effects to be completely locked into the tempo of a track rather than responding to volume changes. truecolors-ml repo

Safety warning

The laser module used is a class 4 laser, with the output wavelength fully in the visible range. This means that the light has maximum eye damage potential and requires a robust safety protocol to be used safely. Use rated laser safety glasses and a shuttered room when testing without diffusers.

Diffuser safety

I extensively tested the PLEXIGLAS® LED, Clear 0M200 SC diffuser material to ensure that it doesn't degrade under the intense laser light. Other diffuser materials did degrade and even slowly deform under the heat. High transmission is a must to minimize local heating, and the diffuser particles need to be the right size to ensure even diffusion across all three channels. Cheap diffusers may have a insufficient particle size, leading to a partially undiffused red beam passing straight through. Don't assume anything, test everything!

The diffuser design must include redundancy to ensure that the detachment/failure of a single diffuser does not compromise eye safety.

All fasteners relevant to eye safety must be secured with thread locker. Consider an additional hardware interlock.

Hardware design

PCB

A 4-Layer PCB was designed using Kicad 10. 4 layers were chosed to simplify USB 2.0 impedance and reduce laser driver EMI. Hierarchical design was used to keep the project organized, with Kicad's multichannel feature duplicating the laser driver layout.

MCU

An ESP32-S3 was chosen as the main controller for this project. It has plenty of power and the USB2.0 capability simplifies the design.

ESP-IDF was used as the firmware framework, utilizing the rich scheduling and real-time capabilities of FreeRTOS.
While most of my other projects rely on PlatformIO for toolchain management, I chose to use the official Espressif path for this to have more direct control over the build process.

Power supply

USB C PD is used to power the design, with active negotiation to 20V/3A (bootstrapped by hardware and controlled by firmware).

Laser driver

This design uses a customized constant off-time buck driver using the LM3409 switching converter IC. The design is common for all three channels and current is tuned by a multiturn potentiometer.
COFT ensures known ripple amplitude, allowing the design to use minimal capacitance while staying safely within the laser's ratings.

Staggered PWM using the ESP32's MCPWM peripheral ensures that no two channels are on at the same time. An optional stretch parameters allows the channels to grow into the unused off time up to 100% combined duty with any color. This allows far higher brightness than with traditional staggered PWM.
No gap was configured since the common cathode constraint is a thermal one, not an electrical one.

Temperature management

A heatpipe based server CPU cooler is used in conjunction with a Honeywell PTM7950 phase change thermal pad to keep the laser module cool.

A fine-adjustable 4-pin PWM server fan allows silent cooling with fine temperature control. This is important because the red laser diode array has a derating both above and below 45°C. The fan is PID controlled via the NTC thermistor located on the laser module.
The tach signal is fed back to the MCU for fault monitoring.

Audio

A MSM261DGT003 PDM MEMS microphone is included for audio reactive effects. Connected to the ESP32's I2S peripheral in PDM mode.

A short recording was analyzed for coil whine cancellation: A single comb filter at the MCPWM frequency as well as a ~48db/oct 4kHz lowpass provided good results and leaves plenty of signal for audio reactive effects.

The first design was quite noisy, these mitigations have been tested and are already in the files:

  • Lower noise inductors
    • C22396364 is footprint compatible and advertised as "ultra low buzz noise"
    • Small impact, because MLCC noise is dominant
  • No output caps
    • With no output caps noise is reduced to a minimum Noise is still significantly audible at 240, 480 Hz. 120 Hz recommended
    • Requires carefully trimming to peak current via scope instead of average current
    • degraded EMI

The following hasn't been tested but is recommended:

  • Low noise input caps
    • Murata ZRB: Drop in replacement with ~15dB reduction
    • Next board revision should allow for KRM series with ~25dB reduction

Software design

Audio

Core 1 is reserved for audio (including inference) and effect rendering.

Audio pipeline diagram
mermaid
flowchart TD
    MIC["PDM mic<br/>I2S RX, 48 kHz"] --> BLK["512-sample block<br/>93.75 blocks/s"]

    subgraph CORE1A["audio task: core 1, prio 5"]
        BLK --> FE["fe_block (frontend v2)<br/>DC block → 4 kHz hi-cut<br/>→ band split → multiband AGC"]
        BLK --> MEL["melflux_block<br/>1024 Hann (previous + current block)<br/>→ FFT → 16 mel bands 150 Hz - 4 kHz<br/>→ log10 → positive flux"]
        FE --> FEOUT["fe_out_t: 12 floats<br/>level, bands[3], rms, flux[3],<br/>fund_rms, mid_flux, treble_flux, spl_db"]
        FEOUT & MEL --> X["x: 28 floats"]

        X --> PA["stage A projection<br/>28 → 12, float"]
        PA --> RA["ring A: 272 blocks × 12"]
        RA --> WA["window: 528 floats<br/>16 fine + 16 mid + 12 coarse<br/>+2 block lookahead"]
        WA --> NNA[["TFLM + esp-nn, int8<br/>stage A 528→128→64 → beat<br/>76k MAC"]]
        NNA --> FB["stage A beat of the<br/>previous block: a[n-3]"]

        X & FB --> PB["stage B projection<br/>29 → 12, float"]
        PB --> RB["ring B: 272 blocks × 12"]
        RB --> WB["window: 528 floats"]
        WB --> NNB[["TFLM + esp-nn, int8<br/>stage B 528→64→32<br/>36k MAC"]]
        NNB --> HEADS["beat, beat_offset, hit[4], music"]

        HEADS -- beat --> TRACK["beattrack<br/>phase accumulator, latches each observation<br/>unlocked: fires on activation ≥ 0.5"]
        HEADS -- beat --> ABUF["tempo ringbuffer: 750 blocks / 8 s"]
        HEADS -- music --> GATE["musicgate<br/>median over ~2 s @ 0.7<br/>+ 3 s hold-off"]

Web UI

The Web UI is based on Svelte 5 and vite, and served as a gzipped static bundle. It is baked into the app partition via CMake's target_add_binary_data.
A websocket endpoint is used to sync the UI state with the firmware, and events are propagated to other connected clients, making the UI multi-user capable.

Development Environment & Build Instructions

The official Espressif dev container is used and should automatically be detected in VS Code. Build via the status bar, the command palette or just idf.py build.
Build contains all stages, including web.

Generating the signing key

OTA updates are signed and require a key to be present in the project directory as ota_signing_key.pem.

bash
source /opt/esp/idf/export.sh
espsecure generate-signing-key --version 2 --scheme rsa3072 ota_signing_key.pem

The signature is only checked during OTA updates (wifi). Secure boot is disabled, no fuses are written. USB flashing/recovery is unaffected.

Tests

Critical components have unit tests via Unity, run them via cd test/host && idf.py build && ./build/truecolors_host_tests.elf.

Flashing & Debugging

Access to USB devices from the dev container is a little tricky on windows. Refer to the Espressif documentation for (partially out of date) instructions.
WSL2 distros commonly don't have USB drivers loaded, so load them via sudo modprobe cp210x; sudo modprobe ch341; sudo modprobe cdc_acm in WSL. The dev container is set up to get access to all ttyACM and ttyUSB class devices.

Flashing via OTA: curl -X POST --data-binary @build/truecolors.bin http://truecolors.local/api/ota

Parts

110
QtyValueFootprintReferences
244.7uF 35VCapacitor_SMD:C_0603_1608MetricC10, C11, C12, C13, C14, C15, C16, C19, C20, C21, C22, C23, C24, C25, C26, C29 +8
810uF 25VCapacitor_SMD:C_0603_1608MetricC2, C3, C34, C36, C37, C38, C39, C42
710kResistor_SMD:R_0603_1608MetricR16, R17, R18, R19, R20, R25, R27
5M3MountingHole:MountingHole_3.2mm_M3_DIN965_PadH1, H2, H3, H4, H5
4100nF 16VCapacitor_SMD:C_0603_1608MetricC35, C40, C41, C43
41uF 50VCapacitor_SMD:C_0603_1608MetricC1, C7, C17, C27
314kResistor_SMD:R_0603_1608MetricR4, R9, R14
33296W-1-254LFLibrary:RES-ADJ-TH_3296W-cleanR3, R8, R13
3470pF 50VCapacitor_SMD:C_0603_1608MetricC8, C18, C28
350kResistor_SMD:R_0603_1608MetricR1, R6, R11
36k8Resistor_SMD:R_0603_1608MetricR2, R7, R12
375m 675mWResistor_SMD:R_1206_3216MetricR5, R10, R15
3AOD413A(UMW)Library:TO-252-3_L6.6-W6.1-P4.57-LS9.9-BR-CW-thermalQ1, Q2, Q3
3APH1265T220Measyeda2kicad:IND-SMD_L13.5-W12.8_APH1265TL1, L2, L3
3GNDTestPoint:TestPoint_Keystone_5019_MiniatureTP4, TP6, TP8
3LM3409MY/NOPBLibrary:HVSSOP-10_L3.0-W3.0-P0.50-LS4.9-BL-EP-thermalU5, U6, U7
3SBR8U60P5-13Library:POWERDI-5_L5.4-W4.0-LS6.5-RD-thermalD1, D2, D3
2120kResistor_SMD:R_0603_1608MetricR24, R26
22k2Resistor_SMD:R_0603_1608MetricR22, R23
11.0-3PWTEasyEDA:CONN-SMD_3P-P1.00_C3029342CN1
14.7uHEasyEDA:IND-SMD_L4.4-W4.2L4
147053-1000EasyEDA:CONN-TH_47053-1000CN2
15VTestPoint:TestPoint_Pad_D2.0mmTP10
168kResistor_SMD:R_0603_1608MetricR21
1AMS1117-3.3easyeda2kicad:SOT-223-3_L6.5-W3.4-P2.30-LS7.0-BRU4
1AP63205WU-7EasyEDA:TSOT-23-6_L2.9-W1.6-P0.95-LS2.8-BLU1
1B+TestPoint:TestPoint_Keystone_5019_MiniatureTP7
1BSS138Package_TO_SOT_SMD:SOT-23Q4
1CH224Aeasyeda2kicad:ESSOP-10_L4.9-W3.9-P1.0-LS6.0-TL-EPU2
1DTestPoint:TestPoint_Pad_D2.0mmTP11
1ESP32-S3-WROOM-1(N8R8)easyeda2kicad:WIRELM-SMD_ESP32-S3-WROOM-1U3
1G+TestPoint:TestPoint_Keystone_5019_MiniatureTP5
1GNDTestPoint:TestPoint_Pad_D2.0mmTP9
1MSM261DGT003EasyEDA:MIC-SMD_6P-L4.0-W2.0_LMD4020T261-OC3MIC1
1NTC+TestPoint:TestPoint_Keystone_5019_MiniatureTP1
1NTC-TestPoint:TestPoint_Keystone_5019_MiniatureTP2
1R+TestPoint:TestPoint_Keystone_5019_MiniatureTP3
1TS-1088-AR02016EasyEDA:SW-SMD_L3.9-W3.0-P4.45SW1
1TYPE-C-31-M-12easyeda2kicad:USB-C_SMD-TYPE-C-31-M-12_1USBC1
1WS2812B-BEasyEDA:LED-SMD_4P-L5.0-W5.0-BL_TC5050RGBLED1

Similar boards

  • 4 layers55 × 55 mmAI Pocket, the printed circuit board in 3D

    AI Pocket

    zycero/AiPocket-Kicad-ESP32-P4-seconde

    164 parts1
  • 4 layers136.6 × 54.6 mmBitcart, the printed circuit board in 3D

    Bitcart

    skot/bitcart-node

    Raspberry Pi CM4 based Bitcoin node with PoE and M.2 NVMe

    78 parts1
  • 6 layers90 × 92.5 mmPower, the printed circuit board in 3D

    Power

    SSL-A-Team/electrical

    circuit board design files, gerbers, and circuit analysis

    203 parts6MIT
  • 4 layers30.5 × 30.5 mmMerlyn435, the printed circuit board in 3D

    Merlyn435

    YeetTheAnson/Merlyn435-Flight-Stack

    Successor to the Merlyn411 25mm flight controller. The flight stack includes a 3in1 20mm flight controller and a 20mm ESC.

    106 parts6
  • 2 layers44.7 × 93.6 mmUltisense, the printed circuit board in 3D

    Ultisense

    darshg321/Ultisense

    an esp32-s3 devboard made to sense as many things as possible

    94 parts3
  • 4 layers44.5 × 50.6 mmKompic Mk1b, the printed circuit board in 3D

    Kompic Mk1b

    porupski/kompic-wearable

    Compact Open Multi-sensor Platform & Apparat.

    149 parts3GPL-3.0
  • 4 layers45 × 45 mmESP32-P4-CAM MAIN, the printed circuit board in 3D

    ESP32-P4-CAM MAIN

    momszx/esp32-p4-cam

    ESP32-P4 compact WiFi streaming camera - KiCad 10 hardware (MAIN rev A, 4-layer 45x45 mm) and design docs

    120 parts

Questions

How big is the Truecolors driver PCB?

It measures 70 × 90 mm and has 4 copper layers, 1.64 mm thick.

What parts does the Truecolors driver use?

110 parts, built around the AMS1117-3.3, CH224A, 3296W-1-254LF and AOD413A(UMW). 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 Truecolors driver KiCad files?

From the whosmatt/truecolors repository on GitHub, at the commit this page was made from: the board is pcb/truecolors_driver.kicad_pcb and its schematic pcb/numb12_driver.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Truecolors driver design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).