SDG Electronics

SDG #323 WS2812 LEDs in ESPhome with the ESP32 DIN Mount PCB

This build log follows a custom ESP32 DIN rail PCB being put to work as a WS2812 addressable LED controller, wired up inside a proper enclosure rather than left as a bench experiment. The board sits in a standard DIN rail housing, so it slots alongside terminal blocks and power supplies the way a commercial controller would, which matters if you are trying to make a home automation project look intentional instead of improvised.

The LED load here is a flexible neon-style WS2812 strip, which is worth noting because these diffused strips behave differently to bare 5050 pixel tape: the pixel pitch is hidden, so colour transitions look smoother, but current draw still scales with pixel count and that has to be accounted for in the supply and wiring. The video covers the practical side of that, including how the strip is fed, how the data line is handled from the ESP32’s 3.3V logic, and what to watch for when the run gets longer.

The software half is ESPHome, where the WS2812 output is defined and exposed as a light entity, ready to be pulled into Home Assistant with effects and colour control. That is the real appeal of this approach over a cheap off the shelf controller: no cloud dependency, no vendor app, and the same board can also handle RS485 Modbus duties on other pins.

For anyone planning a panel mounted LED or sensor controller, the useful takeaways are the enclosure fit, power distribution inside the box, and how little ESPHome YAML is actually needed to get addressable LEDs behaving properly.