This is a board with an ESP32, 16 relays, and other IO.
I'm using two power shift registers NPIC6C596 to drive the relays...
...and here's one relay.
NPIC6C596 normally runs on 5V, I used 3V3 by mistake in the schematic, but that's fixed on the board thanks to a bit of wire.
Without any load connected to the relays, everything works fine.
However, when I connect a load to one of the relays, NPIC6C596 sometimes resets itself when switching. It's quite reliable in failing, it happens about 10-20% of the time, depending on load.
I suspected the reset line, so I removed the power-on reset RC circuit and just connected the active low reset to VCC with a wire. No luck, it still resets itself.
Here's the layout:
+24V for the relays comes from a Recom PCB mount switching brick, there's a canned buck converter to make +5V for the rest of the circuitry.
I've done some investigation:
- 230VAC LED lightbulb as a load.
This has capacitance, so the relay will spark at turn-on but not at turn-off. Since these are SPDT relays, there are two possibilities: bulb on NO, and bulb on NC.
Bulb on NC: reset occurs at turn-on only.
Bulb on NO: no reset occurs
This hints that, when the NPIC drives the relay and shorts its output to ground, the low impedance sinks whatever noise spike would reset it into ground. But when the bulb is on the NO contact, the spark occurs when it does not drive the relay, and it looks like it is more sensitive then.
- Inductive load: 230VAC motor driven ball valve
This isn't a solenoid, rather a ball valve driven by a small motor that draws a few watts.
Reset occurs both at turn-on and turn-off, no matter what relay contact is used.
This means the whole thing is unusable, because when NPIC6C596 resets itself, it turns off all the 8 outputs, which means all the relays that were on then turn off. When the micro tries to turn them on again to open the ball valves... the chip resets again. So it keeps blinking.
It happens with all the relays. It doesn't seem to propagate through the reset line to the other NPIC6C596 though.
Everything else on the board works fine, the micro doesn't crash, etc. It's just these NPIC6C596 chips.
Probing with a scope isn't very useful: no matter where or what I probe, or just the ground clip looped to the tip of the probe, I get the usual spikes that happen when a relay sparks in the vicinity.