SDG #322 ESP32 DIN Rail Module with Modbus and RGB Controller
This build documents a custom ESP32 based controller designed to live inside a standard DIN rail enclosure, aimed at home automation and light industrial control rather than breadboard experimentation. The design combines an ESP32 module with an RS485 transceiver for Modbus communication and MOSFET output stages for driving RGB or RGBW LED strip, so a single board can act as both a bus node and a lighting controller.
The schematic walkthrough covers the practical details that matter when a board is expected to run unattended: the switching supply feeding the ESP32, protection and biasing on the RS485 side, and how the LED channels are switched. Fitting everything into a DIN rail housing forces real constraints on board outline, connector placement and component height, and the PCB layout section shows the compromises involved, including keeping the antenna area clear and routing higher current traces to the LED terminals without crowding the digital section.
Assembly is done by hand with paste and hot air, which is a useful reference point for anyone considering a similar low volume run rather than assembly service pricing. Testing then confirms the supply rails, the RS485 link and PWM control of the LED channels.
For anyone weighing this against off the shelf DIN rail relay or LED controllers, the appeal is firmware freedom: ESPHome or custom code, Modbus polling of external sensors and meters, and a form factor that looks tidy in a consumer unit. The trade off is that you own the debugging, the enclosure sourcing and the mains side wiring safety.


