Relay module causing resets in arduino nano

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?

Here is a picture of my setup:

The current relevant layout is:

And this is the layout with an external font, that did not solve the issue:

These are the components I used:

8 Relay module

Buck converter

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.

1 Like

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..

1 Like

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.

1 Like

Thanks for the response, Leo.

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!

I see 2 limit switches, are you calling them relays?
NvM.

20V, No supressor on the aux coils, but the motor responsible for the resets have it, the remaining motors dont have it.

Follows the complete diagram:

I see the relay module is switching 12volt power relays (DNI0102).
Those power relay coils must have (1N4004) diodes across the coils.

Why didn't you use logic level mosfets, to drive the power relays directly (no 8-relay module).
Leo..

2 Likes

YRMM. :slightly_smiling_face:

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?

I'll get some 1N4004 diodes in the meantime :slight_smile:

Hi, @gh1770
Welcome to the forum.

Do you have a DMM? (Digital MultiMeter)

Measure the 5V out of the Nano?

Thanks... Tom.. :grinning: :+1: :coffee: :australia:

1 Like

Tanks, @TomGeorge

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.

That diode solved all my issues, Thank you for suggesting it! Filtering the noise at the source was very effective.

This video also clarified how the diode should be setup: https://www.youtube.com/watch?v=hReCPMIcLHg&list=WL&index=36&ab_channel=EEVblog

Thank you all for helping :smiley:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.