8 Relay Module Wiring - Interference Problem

Hello Everybody,

I have a bit of a problem with my Arduino Uno - 8 Relay Module setup, it is an ebay cheap module, optoisolated.

As you can see I have an External power supply for the relays connected to JDVCC and GND. Arduino 5v goes on VCC and Digital pins go on IN1- IN4. Well I believe that this set up should make the Arduino and Relays completely isolated from each other.

However what happens is a as soon I have a load on the relay (a lamp in this case) I get interference which makes my mouse on computer to freeze as soon as the pin is HIGH, which means when the appliance (lamp) is OFF. When it switches back ON it’s fine the mouse works again.

It does not matter if I supply the power for Arduino from computer USB or from a 12V Power Supply. Mouse freezes anyway. That makes me think there must be some problem with the mains wiring and I know squat about that.

I’ve attached some pictures to illustrate how I wired the whole thing. Please have a look, any suggestions and advice is very welcome.

Thank you

You did not connect the GND of the Arduino to the GND of the Relaismodul.

That doesn’t make any difference.

You have to have a return path for the Arduino signals, electricity does not flow through air, except during thunder storms.

cizza:
That doesn’t make any difference.

It should. There are setups where it seems to work,
but in those cases there is a GND connection hidden somewhere.

jcallen:
You have to have a return path for the Arduino signals, electricity does not flow through air, except during thunder storms.

The IO pins are the return path. He has the relay module wired correctly.

The problem appears to be a ground loop; I'd suggest putting either the relays or the computer on a separate house circuit.

Chagrin:
The IO pins are the return path. He has the relay module wired correctly.

If the first is true, it is not intended (in this case).

If everything were wired up correctly
(and all components were in working order),
it would just work...

Whandall:
If the first is true, it is not intended (in this case).

It most certainly is intended. The only thing the Arduino power supply needs to power are the optoisolators which don't need more than a few milliamps. The IO pins act as sinks.

http://arduino-info.wikispaces.com/ArduinoPower#OI

Whandall:
You did not connect the GND of the Arduino to the GND of the Relaismodul.

You shoudn't.
That would defeat the use of optos.

jcallen:
You have to have a return path for the Arduino signals, electricity does not flow through air, except during thunder storms.

Path is VCC and IN.

Whandall:
It should. There are setups where it seems to work,
but in those cases there is a GND connection hidden somewhere.

Common ground = no opto isolation.
Leo..

Triple-check your wiring.
Especially the ground wires.
If all is ok, try connecting relay ground (not Arduino ground) to power ground.
Leo…

Thank you everybody for your replies.

I was quite sure that my arduino - relay side of wiring is ok. I did make an extensive research on the forums and I was aware of the no GDN wire from Arduino to relay when using external power supply.

It is a good suggestion to use a different circuit but since I’m meddling with mains I am not all happy to know to have a problem and just hide it from myself.

I’ll check my wiring twice again as Leo has suggested.

About the ground (earth) wires, I didn’t do anything special about them. I simply connected the ground wire from the wall in to the extension sockets. Nothing else. Is that wrong? I tried to show it in the picture.

Leo, would you please explain what do you mean by connecting relay ground to the power ground? As if you talked to a slow person :slight_smile:

Thank you all.

cizza:
Leo, would you please explain what do you mean by connecting relay ground to the power ground? As if you talked to a slow person :slight_smile:

Three circuits in action that are not galvanically connected.

The Arduino.
The relay supply.
Mains power.

There is opto isolation between Arduino and relay supply.

Connect the negative of the relay supply (relay ground) to mains ground.
See if grounding that circuit fixes your problems.
Leo..

Thank you,

I'll try.