Hi everyone — safety question from a complete beginner.
I have an rbdimmer module connected to an ESP32, controlling a dimmable LED light in my living room. Everything is working great, but I have a concern that’s been keeping me up at night.
When I need to reprogram the ESP32 or adjust the wiring on the microcontroller side, the AC power to the dimmer is still on (the light circuit is always live at the breaker panel). I physically unplug the USB cable from the ESP32 before touching anything, but I’m nervous about the whole setup.
My question is: is the ESP32 side of the module truly safe to touch while the AC side is connected to mains voltage? Or is there any path where 230V could reach the signal pins?
I know this might sound like a silly question, but I’d rather ask and feel safe than assume and get hurt. Is it safe to do this myself, or should I always turn off the breaker first?
Not a silly question at all — this is one of the most important things to understand about these modules.
From a circuit perspective, the rbdimmer module has the control side (MCU signals) and the switching side (AC mains) fully isolated from each other. The isolation is done through optocouplers — there is no electrical connection between the two sides whatsoever. The isolation voltage rating is typically 3750V to 4kV.
So yes — the signal pins (DIM, ZC, VCC, GND) are safe to touch while mains is connected. The MCU ground and AC neutral are completely separate circuits.
One thing to keep in mind: if you’re powering your ESP32 from a separate power supply, make sure that power supply is also isolated from the AC mains. Use a proper isolated AC-DC converter (like HLK-PM03 or a standard USB phone charger) — not a non-isolated capacitive dropper supply. Otherwise the isolation on the dimmer module becomes meaningless if your MCU power supply bridges the gap.
That said, I’d still recommend powering down the breaker whenever you’re physically modifying wiring. The isolation protects you during normal operation, but best practice is to never work on any wiring — even the low-voltage side — with mains live.
Thank you so much, both of you — that really puts my mind at ease knowing the two sides are completely isolated!
One more follow-up question: my setup is inside a metal electrical box (a standard junction box from the hardware store). The AC wires go in one side and the ESP32 with its USB cable comes out the other side through a rubber grommet.
Should the metal box itself be grounded? I have a green PE wire available in the junction box but I wasn’t sure if I should connect it to the box or leave it alone.
Yes — any metal enclosure that contains AC mains components must be connected to protective earth (PE). This is a standard electrical safety requirement.
If a wire comes loose inside the box and touches the metal enclosure, the PE connection ensures that the circuit breaker or RCD/GFCI trips immediately instead of the enclosure becoming live at mains voltage.
Most metal junction boxes have a dedicated grounding screw or terminal — connect your green PE wire there. If the box doesn’t have one, use a self-tapping grounding screw into the box wall.
Quick summary of your enclosure wiring:
- PE wire → connected to metal box (grounding screw)
- AC wires (L, N, PE) → one side of the box
- Signal wires (to ESP32) → other side of the box, through grommet
- Physical separation between AC and signal wires inside the box
You’re doing everything right by thinking about this. Proper grounding and separation are the two most important things for a safe installation.
— rbdimmer support team