I'm using an arduino nano with a octocoupler 8 relay module that is causing the arduino to reset when load is applied to one of the relays. I've tried the recommendations in simillar issues here in the forum, such as changing the voltage regulator, adding .1uf capacitors and using a separate font for the module, but none of those worked. The relay module switch the auxiliary 20v relays that are responsible for activating the motors.
Spacing the arduino from the relay module or probing one relay pin with a multimiter seems to reduce the frequency of resets, but since space is tight, I can't improve much on that. Should I shield the relay module? Can a snubber circuit help? Is there some diode magic that can filter the EMF interference out?
The onboard 5V voltage regulator needs at least 7V to operate properly. The on board 5V regulator can supply limited current. If you have an external regulated 5V, connect to the 5V pin on the Arduino. That will bypass the weak on board regulator and the full current capacity of the external 5V supply will be available to the 5V bus.
Power the relay coils from the external 5V supply.
V-in of a classic Nano needs at least 6.5volt for it's built-in 5volt regulator to provide a stable 5volt. If you have a stable 5volt available, then connect it directly to the 5volt pin.
If you use a second independent 5volt supply for the relay card, then don't join grounds.
Joining grounds defeats opto isolation, which could be an extra barrier against noise.
That relay supply should only connect to JD-VCC and GND of the relay card, nothing else.
There should also be no ground between Arduino and relay card
Here is the preferred diagram, drawn by @dlloyd.
A 12volt relay module is used (which you also should have done), which eliminates the need for a buck converter for the relays. Diagram is the same for a 5volt module.
What do the relays switch. Do you have any diodes or snubber circuits across the relay contacts?
Leo..
What is the voltage and current of the aux relay coils? Do you have suppressors on them? Do you have suppressors on the motor lines?
Post a drawing of aux relays and motor connections.
Using a 12V module is a great Idea! I'll give it a try if separating grounds does not work. Except for the ones in the module, i have not put any extra diode nor snubber circuit yet (none that have worked). The relays switch auxiliary relays that are responsible for switching some motors. This relays can be seen behind the right-top motor (the one that causes the resets when going in reverse).
I'll let you know if any of these works.
Thanks a lot!
Indeed they are 12V relays, this is weird since the voltage Im measuring is 20V across the terminals, no idea why... The original machine wasnt designed by me, so I just copied the original controls, hence the relay usage.
As for mosfets, due to my lack of experience in electronics, I am afraid I might fry some chips on the process, but it seems like a more suitable approach. Wont the system still generate EMF when switching?
Previously I was getting 4.3V in digital High because of the Vin low voltage, I suspect.
Now I have 5V in the +5v pin and 2.3V comparing Digital Low and the module pins (dont ask me why). When the coil is activated I could notice an increase of 1V in this measure. But the noise was fixed now thanks to a diode in the auxiliary coils.