I've built the classic greenhouse control using a relays module. I've had issues with the arduino crashing due to, I guess, "current overload" (I'm not sure this is the correct term) when the relays module is activated/deactivated. I've read that an RC snubber could fix the problem. I bought the classic RC snubber module that is sold on Amazon, can someone explain to me how it is wired to the relays module?
Please note that I just started out playing with arduino and electric stuff so my knowledge is limited.
Additional info: the relays module is powered by a separate USB power supply and the GND are separated. I'm not sure it matters but the wires that go from the board to the relays module are 1.5mt longs.
Hi,
A hand drawn circuit with pins and components labelled would have been more informative.
What voltage and current are the relays switching?
What are the loads?
Yes. You have two USB supplies in the power strip, one going to the relay module and one to whatever unspecified thing the "MCU" is, then you have ground and 5 V connecting between the two, so both power supplies are connected together!
Thanks. I imagined this could be an issue but I have only one electric socket in the basement. The only different setup I can do would be to connect the arduino power supply directly to the electric socket but I'm not sure this changes things
Hi,
How far apart are the MCU and the relay module?
If you have a supply for the MCU and another for the relay module, you do not need the +5V wire between the MCU and the relay module.
You still need the gnd wire.
I had a 4 relays module previously and there wasn't a separate GND but 2 separate 5v. I've read that the 5v from the arduino is used to power the LEDs. Anyway I have a 2 relays module with separate GND now, I'll try without the 5v from the micro
I've removed the jumper and connected that pin and the GND near it to the USB power. That provides power to the module. The other pins are controlled by the micro and are 5v and GND to the micro and the 2 signal pins that command the relays. So the power should be separated there.
OK, to actually achieve isolation with that module, you connect "JD-VCC" and "Gnd" to the 5 V relay supply, and you connect "In1", "In2" and "Vcc" to the Arduino but not "Gnd".
Different module but same circuit:
(And I am not going to say this correction will necessarily fix your problem. )
There should only 3 wires from MCU to relay board, 2 for the trigger inputs and 1 common wire to MCU VCC if relays are triggered by a LOW level or GND if triggered by a HIGH level, NEVER both vcc AND gnd.
Snubber should be across coil, not contacts.