Hey, guys,
I know this has been discussed a lot, but everything I've read and tried so far basically didn't work, so once and for all, I need some clarification.
My setup is pretty simple: I'm using an Arduino UNO to switch some relay modules (the regular one) ON and OFF, which control various stuff. Everything works perfectly fine, until the relays need to switch loads higher than, say, 100mA. LEDs work fine, LED strips (!) work fine, light-weight stepper motors (!) work fine, but EM locks or solenoids start the apocalypse. The (!) signals that I expected motors, even light-weight, to behave in the same erratic way, since they also need some more current to operate. Basically, whenever the lock (electromagnetic or solenoid) is powered, every few uses the Arduino freezes. In the case of electromagnetic locks, it reboots itself. In the case of a solenoid, it freezes and displays random glitchy stuff on the 1602 display and I need to push the reset button to be able to use it again.
Now, I've tried powering everything from the same 12v source and the behaviour is as I described it. Then, I tried using 2 separate power sources (of enough current rating) with the GND connected - one for the Arduino (which also powers the relays) and another one for the lock itself. This seems to have solved the electromagnetic setup (it works fine for the last few days, but I need more time to make an educated opinion). However, with the solenoid, it does the same. Every 6-7 activations of the solenoid, the Arduino freezes and has to be manually rebooted.
So, on to the final question: what is the proper way to use these relay modules, how should they be powered and how to minimize these kind of problems with higher currents? There has to be a way and I'm going nuts reading and trying the same things over and over again without success. Hopefully your answers will help me and not only me.
Thank you in advance!