However, I frequently lose my MQTT connection whenever a relay switches on or off. The connection doesn't restore until I manually press the reset button on my Arduino Nano.
I suspect the issue is related to voltage spikes, as the MQTT connection remains stable when the relay board is disconnected.
Would you recommend using two dedicated LM2596 DC/DC converters to separately power the relay board and the W5500?
Is suggested a dedicated DC/DC lm2596 to feed power only at the relay board?
The relay module pictured appears to incorporate a reverse-biased diode across the relay coil already. However, for whatever reason it may not be sufficient(burned out, whatever). First, I would attempt putting a diode across that coil to suppress whatever is hitting your MQTT connection. If that doesn’t solve the problem, then yes, installing a second DC-DC might be the simplest solution.
Alternatively, I’ve seen a suggestion here on the forum, different topic, that the 2596 regulator doesn’t deal well with LOW current operation, so, somewhat perversely, it might be worth adding a bigger load to it’s output to see if that stabilizes it’s performance.
Powering the relay's coil (about 72mA) through the Nano's 5 volt regulator after it has dropped 12V to 5V will cause it to dissipate about 1/2 watt, may be enough to overheat and shutdown.
I’d like to think our OP’s black pen just ran out of ink when he drew the connection from the 2596 - side to the 5500 module. But hey, he can elaborate.
I've updated the diagram.
There are 3 relays; the one controlling the potential-free contact causes no issues. However, the two relays that switch 230VAC are causing problems.
Another piece of information: the cables between the Arduino and the relay board are very short
I tried disconnecting the 230VAC load from the relay, and everything worked well. So, I believe the problem isn't the relay board itself, but rather the 230VAC load. Will a capacitor work as a filter?