Mega Restart when powering 8 Relay Module

I have read most of the posts here on this topic and have a good understanding of opto-issolation and how it works with this relay module. (For more information on this click here)

Parts:

  • Arduino Mega (12v UB1250 plugged into Mega DC Jack)

  • 8 Relay Module SRD-05VDC-SL-C (Load ran off Marine Deep Cycle 12v Battery)

  • 2 actuators and 1 valve are running off the relays using 6 relays (2 per actuator & 2 for the valve)

  • I have 2 available power sources which can be configured differently depending on what works.

  • Only one relay is on for the actuators, Two (2) relays are on for the valve. Mainly only one relay is on at a time unless the valve is on then 2 relays are on at the same time.

Problem:

#1: 2 seperate battery's

The current battery configuration consists of the Mega being powered by the 1250 battery. The Mega 5v is connected to the Relay Vcc, Mega GND is connected to the Relay GND, then the Relay 1-6IN are connected to Mega digital pins D32-D37. The JD-Vcc and Vcc are shorted on the Relay module.

The load on the Relays are connected to the 12v Marine Deep Cycle battery which powers the actuators and valve.

When the load battery is connected (Marine Deep Cycle or actuators & valve are disconnected) and is not connect I get unpredictable resets. The actuators may move for 5 seconds, 30 seconds or not at all before a restart happens.

I have connected a 200uF Electrolytic Cap between Vcc & GND on the relay and this did not fix the problem (I am currently trying other values).

#2: Only deep cycle marine battery powering mega, relays, and load of actuators.

Everything is the same as above but the marine deep cycle battery is powering everything. The JD-Vcc and Vcc are still shorted on the relay.

When the actuators & valve are not connected I get an immediate reset everytime a relay turns on. When the actuators & valve are connected I get a reset after the actuators stop moving and the relays are still on.

Any advice is greatly appreciated.

Please let me know if any more information is need.

UPDATE

Using the setup from Problem #1 (Problem #2 setup as well) I was able to fix the problem by using a 1000uF electrolytic capacitor between the relay Vcc and relay GND which are connected to the Mega 5v & Mega GND.

Using a 100uF did not work but using a 1000uF did.

I am assuming the signal was pretty noisy and just needed some decoupling.

I am hoping this post will help others.

Hi,

Tell us more about the physical layout of your system. How is it physically housed? Where is "Ground"??

See this page for some suggestions:

http://arduino-info.wikispaces.com/Arduino-Project-Planning-Electrical

terryking228:
Hi,

Tell us more about the physical layout of your system. How is it physically housed? Where is "Ground"??

See this page for some suggestions:

http://arduino-info.wikispaces.com/Arduino-Project-Planning-Electrical

Which ground?

The Mega is grounded to the 1250 Battery.

The Relay load is grounded to the Deep Marine Battery.

APNCSU:
The current battery configuration consists of the Mega being powered by the 1250 battery. The Mega 5v is connected to the Relay Vcc, Mega GND is connected to the Relay GND, then the Relay 1-6IN are connected to Mega digital pins D32-D37. The JD-Vcc and Vcc are shorted on the Relay module.

When a Mega is powered with 12volt on the DC socket, the onboard 5volt regulator has to drop 7volt (actually 6.3volt).
The regulator on a mega will eventually overheat and shut down if it has to dissipate >= ~1.5watt.
That is a current of 1.5/6.3= ~240mA.
The Mega already uses 70mA for itself, so you only have 170mA to play with (in a cool environment).
Meaning you can only activate two relays (75mA each) at the same time.

Three or more relays on at the same time will definately shut down/reset the Mega.

You should have bought 12volt relay boards, so you could have powered the coils directly from the battery.

Question from a PM:
"it possible to use the 3.3v arduino pin instead of the 5v one to send the i/o signal to the RB ?"

No.
An opto isolated relay board has three parts in series between relay VCC and relay IN.
An red indicator LED with a Vf of ~1.8volt, an opto LED with a Vf of ~1.2volt, and a 1k current limiting resistor.
With 3.3volt on relay VCC, drive current would drop from
(5-1.8-1.2)/1000 = 0.002A = 2mA to (3.3-1.8-1.2)/1000= 0.0003 = 0.3mA.
Not enough to drive the relay input.
Leo..

@Wawa

Thank you for the very detailed reply.

You are absolutely correct. I was assuming the voltage regulator on the Arduino was the reason for the restart and you just confirmed my suspension. I also have an LCD being powered off the Mega 5v as well so this adds to the current consumption.

I am using the 5v relay module because that is what I was given to work with, maybe I can convince the project manager to get 12v powered relay modules.

(Here is a link to a 12v module: Click Here)