
Board b
ruckusmattster/xtm-led-driver
A HDR LED driver with ESPHome integration focused on driving a 36V 1.4A LED

A HDR LED driver with ESPHome integration focused on driving a 36V 1.4A LED
Board a is an open-source printed circuit board by ruckusmattster, from the ruckusmattster/xtm-led-driver repository on GitHub, published under the MIT licence. It is a 4-layer board of 90 × 60 mm with 206 parts on 96 nets, routed with 1,518 tracks and 545 vias.
It is built around the STM32G431CBU6, OPA4388IPWR(UMW) and LDL1117S33R, with the TPS7A2050PDBVR, 2N7002BK and BAV199 among its other parts. Its parts include 79 resistors, 63 capacitors, 8 transistors, 7 ICs and 4 diodes. It belongs with the STM32 boards of this library.
A flicker-free, four-decade DC LED driver for theatrical fixtures.
1.4 A down to 5 µA as pure DC: no PWM anywhere, nothing for a camera to catch.
Build guide · Design process · Hardware · Firmware · Design record
I'm building four stage fixtures around the Xicato XTM19803050CCA (19 mm LES, 3000 K, about 5000 lm at 1.4 A). Off-the-shelf drivers either dim with PWM, which rolling-shutter cameras turn into bands, or bottom out around 1%, which makes the end of every fade snap to black. This project is a two-board driver that does neither: the LED current is DC at every level from full output down to 5 µA (0.0004%), fades are smooth enough to film in 240 fps slow motion, and each fixture is a normal dimmable light in Home Assistant with a knob on the back and a sync button that makes the others follow it.
Everything is here: the schematics (as code), the design calculations and simulations, scripted KiCad 9 layouts that come out DRC-clean, Gerbers and placement files, BOMs with verified part numbers, firmware for both boards with its tests, and the procedures to bring it up, calibrate it and prove it doesn't flicker.
flowchart TB
mains(["Mains"]) --> psu["Mean Well LRS-100-48<br/>isolated 48 V, off-board"]
subgraph A["Board A · driver · 90 × 60 mm, 4 layers"]
fuse["Fuse + TVS"] --> buck["Tracking buck<br/>LMR38020, forced PWM"]
fuse --> aux["Aux buck + LDOs<br/>5.5 V · 5 V · 3.3 V"]
mcu["STM32G431<br/>4 kHz control loop"] -->|SPI| dac["DAC80504<br/>4 × 16-bit"]
dac --> sinks["OPA4388 + 4 linear sinks<br/>0.1 Ω · 1 Ω · 10 Ω · 100 Ω"]
mcu -->|"DAC → feedback"| buck
sinks -.->|"cathode tap<br/>fast trip"| mcu
end
subgraph L["LED"]
led(["Xicato XTM<br/>up to 1.4 A"])
end
subgraph B["Board B · controller · 60 × 45 mm"]
knob["Encoder · push · sync"] --> esp["ESP32-S3-Zero<br/>ESPHome"]
end
ha(["Home Assistant"])
other(["Other fixtures"])
psu -->|"48 V DC"| fuse
buck -->|"LED+"| led
led -->|"LED−"| sinks
mcu ---|"10-way ribbon<br/>UART · 5.5 V · reset"| esp
esp -.-|"Wi-Fi"| ha
esp -.-|"ESP-NOW"| otherThe sinks set the LED current; the buck only supplies the voltage they need. Board A's MCU knows the LED's forward voltage at every current (it learns it as it runs), so on a rising cue it raises the buck first and then the current, and on a falling cue the reverse. Only a level, a fade time and status cross the ribbon to Board B.
Brightness is exponential in the setting, so every step looks the same size: 1% of the scale is about 13% more light, from 5 µA at the bottom to 1.4 A at the top.
| Board A: driver | Board B: controller | |
|---|---|---|
| Top | ![]() | ![]() |
| Bottom | ![]() | ![]() |
| Size | 90 × 60 mm, 4 layers, ENIG | 60 × 45 mm, 2 layers, ENIG |
| Parts | 206 on 96 nets | 42 on 32 nets |
| Does | 48 V in, tracking buck, four sinks, protection, fades, calibration | Wi-Fi and Home Assistant, knob, sync, status LED |
| Key parts | STM32G431CBU6, DAC80504, OPA4388, 2 × LMR38020, NDT3055L, WSK2512 | Waveshare ESP32-S3-Zero-M on sockets, Bourns PEC11R encoder |
| Layout result | 0 DRC errors, 0 unconnected | 0 DRC errors, 0 unconnected |
Renders are bare boards from KiCad (no 3D models for the parts). The ESP32-S3-Zero plugs into two sockets on Board B's back, so it can be pulled out and flashed over its own USB-C.
Design values from the calculations and simulations in design/. None of this has
been measured on hardware yet.
| Parameter | Design value |
|---|---|
| Output | 5 µA to 1.4 A DC (1.5 A with tolerance), four ranges plus a calibrated tail |
| Brightness curve | Exponential: 0–100% → 5 µA–1.4 A, about 13% more light per 1% step |
| Flicker target | Under 1% at any frequency from 100 Hz to 20 kHz, at every level and during fades |
| Accuracy after calibration | ±0.09–0.11% RSS in each range; ±0.6% at 14 µA and ±1.6% at 5 µA |
| Crossover smoothness | 0.11–0.14% on a 10 s full-range fade, 0.9–1.5% on a 1 s fade (simulated) |
| Response | Snaps within 5 ms; fades updated at 4 kHz, from instant to 10 minutes |
| Input | 48 V DC (43.2–52.8 V) from a Mean Well LRS-100-48; about 45 W at full output |
| LED voltage | 3.5 V floor to 38 V usable, 40.4 V hard ceiling |
| Protection | Shorted LED (every sink clamped within 50–100 µs), open LED, undervoltage, four temperature sensors with derating, DAC read-back, watchdog, 3 A fuse, TVS on input and output |
| Link loss | Board A blinks twice and settles at 20% if Board B goes quiet; planned restarts hold the level |
| Control | Home Assistant (ESPHome native API), encoder with push, sync button and a header for a panel-mount button |
| Group sync | ESP-NOW broadcast, fixture to fixture, HMAC-SHA256 authenticated; no router or HA in the path |
| Stage | State |
|---|---|
| ✅ Circuit design, calculations, crossover simulation | Done; design/calc.py asserts the limits that matter |
| ✅ Schematics (as code) with connectivity check | Done; 0 ERC errors on both boards |
| ✅ Part numbers | Every numbered part checked against a distributor or manufacturer page (29 Sep 2026) |
| ✅ PCB layout | Done by script; both boards 0 DRC errors, 0 unconnected |
| ✅ Board A firmware | Builds (50–58 KB of 126 KB, depending on the toolchain); 97,146 host-test checks pass |
| ✅ Board B firmware | ESPHome config validates; 89 unit checks and a 43-check end-to-end test on ESPHome's Linux build pass |
| ⏳ ESP32-S3 build | Not yet run; the CI workflow in .github/workflows/ runs it on every push |
| ⏳ Fabrication, assembly, bring-up, flicker measurements | Not started |
| ⚠️ Known firmware issue | Board A detects an open LED only near full output, and learns a bad correction while the LED is disconnected; see known issues |
If you build one before I do, I'd love to hear how it went.
xtm-led-driver/
├── design/ schematics as code, calculations, simulation
│ ├── board_a.py every Board A part and pin-to-net connection
│ ├── board_b.py the same for Board B
│ ├── catalog.py part data: MPNs, LCSC numbers, footprints, verification notes
│ ├── build.py regenerates hardware/ and runs the connectivity check (ERC)
│ ├── calc.py every design number; prints calc_output.txt
│ ├── sim/handover.c time-domain model of a crossover between two sinks
│ ├── compare_netlists.py checks your own KiCad schematic against the generated netlist
│ └── kicad_pos_to_jlc_cpl.py KiCad position file → JLCPCB CPL, with rotation fixes
├── hardware/ generated from design/: per board, sheet tables, netlist, BOMs
│ ├── board_a/ board_b/
│ ├── board_a.kicad_dru custom DRC rules (48 V spacing, precision-island clearance)
│ └── LAYOUT.md the layout rules the scripts follow and you review against
├── layout/ scripted KiCad 9 layout + Freerouting
│ ├── run_layout.bat Windows launcher (double-click)
│ ├── make_board.py stages: place, route, pour, stitch, DRC, export
│ ├── board_a_layout.py Board A placement, hand-drawn copper, pours, rules
│ ├── board_b_layout.py Board B the same
│ ├── lib/XTM.pretty/ this project's ESP32-S3-Zero socket footprint
│ └── out/ the finished boards: KiCad projects, Gerbers, CPL, DRC reports
├── firmware/
│ ├── board-a/ STM32G431 firmware in C (CMake), host tests, calibrate.py, flicker.py
│ └── board-b/ ESPHome configs + the xtm_driver external component, testsJust want the boards? The finished layouts are in layout/out/: upload
board_a-gerbers.zip and board_b-gerbers.zip to JLCPCB with the settings in
the build guide, and order parts from the
hand-assembly BOMs in hardware/. Read section 5
first.
Want to check or change the design?
python3 design/build.py # regenerate netlists and BOMs, run the connectivity check
python3 design/calc.py # every design number (needs numpy, and gcc for the simulation)
make -C firmware/board-a/tests # Board A host tests
make -C firmware/board-b/tests # Board B unit tests
layout\run_layout.bat # both layouts, on Windows with KiCad 9 and Java 21Building the firmware?
cd firmware/board-a
cmake -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/arm-none-eabi.cmake && cmake --build build
cd ../board-b
cp secrets.yaml.example secrets.yaml # fill in Wi-Fi and keys
esphome run xtm-1.yamlThe build guide walks through all of it, from installing the tools to a calibrated, flicker-tested fixture.
| Document | What's in it |
|---|---|
| Build guide | Every step to make one yourself: tools, files, ordering, assembly, flashing, bring-up, calibration, flicker testing, use, troubleshooting, pinouts |
| Design process | From a 0–10 V dimmer idea to this: the requirements, the reviews, the decisions and what changed them |
| Hardware reference | Both boards block by block, with values and the reasoning behind them |
| Firmware reference | Board A's control loop, the link protocol, the ESPHome component |
| Layout scripts | Running and changing the automated layout |
| Layout rules | Stackup, floorplan, power and sense routing, clearances |
| Design record | The Phase 1 review and the Phase 2 detailed design, complete, as written |
The first plan used PWM for the bottom decade and handed the current between ranges with a simple crossfade. Working through the dynamics showed the crossfade would dip the light by up to 17% on a fast fade, because the incoming channel starts from a wound-down integrator. Priming it with a keep-alive current and blending in the log domain fixed it:
That story, and the others like it, are in the design process.
Board A runs from 48 V and can put 38 V on the LED connector. Neither board carries mains: the 48 V comes from a separate, certified, isolated supply (Mean Well LRS-100-48) with its own fused inlet. Wire and enclose the mains side of that supply properly, or have someone qualified do it. Never plug or unplug the LED while the output is on.
firmware/board-a/third_party/ carries Arm's CMSIS (Apache-2.0) and ST's STM32G4 device files
(Apache-2.0) and LL drivers (BSD-3-Clause), under their own licences.Not chosen yet. Until a LICENSE file is added, the default applies: all rights reserved,
except the third-party files under their own licences.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 19 | TP | TestPoint:TestPoint_Pad_D1.0mm | TP1, TP2, TP3, TP4, TP5, TP6, TP10, TP11, TP12, TP13, TP14, TP15, TP16, TP17, TP18, TP19 +3 |
| 17 | 100k | Resistor_SMD:R_0603_1608Metric | R1, R6, R10, R16, R72, R73, R74, R75, R76, R77, R78, R79, R80, R81, R82, R123 +1 |
| 15 | 100nF | Capacitor_SMD:C_0603_1608Metric | C3, C11, C14, C16, C23, C41, C43, C50, C70, C71, C72, C73, C76, C77, C78 |
| 11 | 10R 0.1% | Resistor_SMD:R_0805_2012Metric | R90, R91, R92, R93, R94, R95, R96, R97, R98, R99, R100 |
| 8 | 10k | Resistor_SMD:R_0603_1608Metric | R4, R44, R53, R120, R126, R127, R128, R129 |
| 7 | 4.7uF 100V | Capacitor_SMD:C_1210_3225Metric | C4, C20, C21, C24, C25, C26, C27 |
| 6 | 10nF | Capacitor_SMD:C_0603_1608Metric | C2, C31, C80, C81, C82, C83 |
| 6 | 1k | Resistor_SMD:R_0603_1608Metric | R54, R60, R61, R62, R63, R125 |
| 6 | 1uF | Capacitor_SMD:C_0603_1608Metric | C9, C15, C42, C48, C51, C75 |
| 6 | NetTie | NetTie:NetTie-2_SMD_Pad0.5mm | NT1, NT2, NT3, NT4, NT5, NT6 |
| 5 | 1nF C0G | Capacitor_SMD:C_0603_1608Metric | C56, C57, C58, C59, C61 |
| 5 | 2N7002BK | Package_TO_SOT_SMD:SOT-23 | Q2, Q5, Q6, Q7, Q8 |
| 4 | 1.00k 0.1% | Resistor_SMD:R_0805_2012Metric | R46, R48, R50, R52 |
| 4 | 1.82M | Resistor_SMD:R_0603_1608Metric | R64, R65, R66, R67 |
| 4 | 10k NTC | Resistor_SMD:R_0603_1608Metric | RT1, RT2, RT3, RT4 |
| 4 | 10nF C0G | Capacitor_SMD:C_0805_2012Metric | C44, C45, C46, C47 |
| 4 | 12.0k 0.1% | Resistor_SMD:R_0805_2012Metric | R45, R47, R49, R51 |
| 4 | 2.2nF C0G | Capacitor_SMD:C_0603_1608Metric | C52, C53, C54, C55 |
| 4 | 220R | Resistor_SMD:R_0603_1608Metric | R68, R69, R70, R71 |
| 4 | 22R | Resistor_SMD:R_0603_1608Metric | R40, R41, R42, R43 |
| 4 | M3 | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 3 | 100R | Resistor_SMD:R_0603_1608Metric | R121, R122, R124 |
| 3 | 100nF 100V | Capacitor_SMD:C_0603_1608Metric | C5, C22, C28 |
| 3 | 22uF | Capacitor_SMD:C_1206_3216Metric | C6, C7, C8 |
| 3 | 4.7uF | Capacitor_SMD:C_0805_2012Metric | C10, C12, C74 |
| 3 | FID | Fiducial:Fiducial_1mm_Mask2mm | FID1, FID2, FID3 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric | C13, C79 |
| 2 | 1M | Resistor_SMD:R_0603_1608Metric | R17, R110 |
| 2 | 2N7002 | Package_TO_SOT_SMD:SOT-23 | Q3, Q4 |
| 2 | 8.25k | Resistor_SMD:R_0603_1608Metric | R14, R15 |
| 2 | LMR38020FDDAR | Package_SO:HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.1mm_ThermalVias | U2, U3 |
| 2 | MSTBA 2,5/2-G-5,08 | Connector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_Horizontal | J1, J2 |
| 1 | 0.1R 4T | Resistor_SMD:R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm | R102 |
| 1 | 100R 0.1% | Resistor_SMD:R_0805_2012Metric | R101 |
| 1 | 15uH | Inductor_SMD:L_Bourns_SRR1260 | L3 |
| 1 | 200k | Resistor_SMD:R_0603_1608Metric | R12 |
| 1 | 22.1k | Resistor_SMD:R_0603_1608Metric | R7 |
| 1 | 220nF | Capacitor_SMD:C_0603_1608Metric | C40 |
| 1 | 22nF 100V | Capacitor_SMD:C_1206_3216Metric | C60 |
| 1 | 22pF C0G | Capacitor_SMD:C_0603_1608Metric | C29 |
| 1 | 280k | Resistor_SMD:R_0603_1608Metric | R3 |
| 1 | 2x5 box header | Connector_IDC:IDC-Header_2x05_P2.54mm_Vertical | J3 |
| 1 | 33uH | Inductor_SMD:L_Bourns_SRR1260 | L2 |
| 1 | 3A T | Fuse:Fuse_Littelfuse-NANO2-451_453 | F1 |
| 1 | 47nF | Capacitor_SMD:C_0603_1608Metric | C30 |
| 1 | 47uF 100V | Capacitor_SMD:CP_Elec_10x10 | C1 |
| 1 | 52.3k | Resistor_SMD:R_0603_1608Metric | R5 |
| 1 | 6.2k | Resistor_SMD:R_0603_1608Metric | R2 |
| 1 | 600R@100MHz | Inductor_SMD:L_0805_2012Metric | FB1 |
| 1 | 600R@100MHz 2A | Inductor_SMD:L_0805_2012Metric | FB2 |
| 1 | 64.9k | Resistor_SMD:R_0603_1608Metric | R11 |
| 1 | 7.32k | Resistor_SMD:R_0603_1608Metric | R13 |
| 1 | 82k | Resistor_SMD:R_0603_1608Metric | R18 |
| 1 | BAV199 | Package_TO_SOT_SMD:SOT-23 | D3 |
| 1 | DAC80504RTET | Package_DFN_QFN:Texas_RTE0016D_WQFN-16-1EP_3x3mm_P0.5mm_EP0.8x0.8mm | U6 |
| 1 | LDL1117S33R | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U5 |
| 1 | NDT3055L | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | Q1 |
| 1 | OPA4388IPWR | Package_SO:TSSOP-14_4.4x5mm_P0.65mm | U7 |
| 1 | SMBJ43A | Diode_SMD:D_SMB | D2 |
| 1 | SMBJ58A | Diode_SMD:D_SMB | D1 |
| 1 | STDC14 | Connector_PinHeader_1.27mm:PinHeader_2x07_P1.27mm_Vertical_SMD | J4 |
| 1 | STM32G431CBU6 | Package_DFN_QFN:QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm | U1 |
| 1 | TPS7A2050PDBVR | Package_TO_SOT_SMD:SOT-23-5 | U4 |
| 1 | green | LED_SMD:LED_0603_1608Metric | D4 |

ruckusmattster/xtm-led-driver
A HDR LED driver with ESPHome integration focused on driving a 36V 1.4A LED

visionspacetec/VST104-Foxtrot
VST104 Flat-Sat board - referred as element_foxtrot

ka1e27/dreams
Autonomous survey catamaran: CV-based obstacle avoidance, environmental sensing, and cellular telemetry to a web dashboard.



hoeken/frothfet
Yarrboard load controller board with current sense, volt sense, fuses, and sender support.

chadaustin/wired-sculpt-pcb
KiCad design files for the Wired Sculpt conversion mod

daniestevez/ADF4158_PCB
ADF4158 + HMC391 PCB for 10 GHz FMCW radar LO

lunakiller/project_tamiya
Custom open-source RC car system based on STM32 MCUs
It measures 90 × 60 mm and has 4 copper layers, 1.6 mm thick.
206 parts, built around the STM32G431CBU6, OPA4388IPWR(UMW), LDL1117S33R and TPS7A2050PDBVR. 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.
From the ruckusmattster/xtm-led-driver repository on GitHub, at the commit this page was made from: the board is layout/out/board_a/board_a.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
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).