Relay Module Help

They never provide wiring instructions for these blasted things when you buy them from eBay.... you would think that would be important lol

Anyways I have two of these I ordered from eBay but how to I wire my Arduino Mega to these?
Also these are supposed to have complete Optocoupler Isolation? Can anyone confirm if that is true or not as the seller did not seem to know for sure.

8 Channel Relay module eBay Link

Bit Chenglish but:

Module interface:

  1. DC+: positive power supply (VCC)
  2. DC-: negative power supply (GND)
  3. IN1,2,3,4,5,6,7,8: can be high or low level control relay
    S1,S2,S3,S4, S5,S6,S7,S8 HIGHT OR LOW LEVER

So even though this is one of those boards that use a useless opto coupler it looks like at least you can select when the output should turn on. When HIGH or when LOW, select-able via the jumper.

septillion:
Bit Chenglish but:
So even though this is one of those boards that use a useless opto coupler it looks like at least you can select when the output should turn on. When HIGH or when LOW, select-able via the jumper.

Thanks.
Now would that "DC+: Positive Power Supply (VCC)
and
DC-: Negative Power Supply (GND)
Be from my 12V power supply?

and are the: IN1,2,3,4,5,6,7,8 from the Arduino 5V output triggers??

Also I'm still not clear as to if this board offers total Optocoupler Isolation or not??

For example can I run my Arduino from the USB control on my PC to control the Arduino to control the Relays without having to worry about my USB port being in any danger of back feed??

Knightriderguy:
Also I'm still not clear as to if this board offers total Optocoupler Isolation or not?


It clearly does not as it does not have sufficient supply terminals.

It is vaguely possible that if you use the "Low/ High" select pins as the actual returns, it may be possible to isolate the isolators( :grinning: ) but when one side of the relay power (ground) must return to the Arduino as well as to a separate power supply, it cannot be actually isolated.

Unless someone can provide an actual circuit for it, we cannot really know.

Knightriderguy:
Thanks.
Now would that "DC+: Positive Power Supply (VCC)
and
DC-: Negative Power Supply (GND)
Be from my 12V power supply?

That's what power supply means yes.

Knightriderguy:
and are the: IN1,2,3,4,5,6,7,8 from the Arduino 5V output triggers??

Where else do you want to input the triggers? Or what else do you want to input?

Knightriderguy:
Also I'm still not clear as to if this board offers total Optocoupler Isolation or not??

No it's not. Like non of those weird opto relay boards are :confused: (unless you feed it via jumpers etc) But you don't need it to be.

Knightriderguy:
For example can I run my Arduino from the USB control on my PC to control the Arduino to control the Relays without having to worry about my USB port being in any danger of back feed??

Yes, you can. But you must connect the GND of the Arduino to the GND of the 12V supply (aka DC-).

septillion:
That's what power supply means yes.
Where else do you want to input the triggers? Or what else do you want to input?
No it's not. Like non of those weird opto relay boards are :confused: (unless you feed it via jumpers etc) But you don't need it to be.
Yes, you can. But you must connect the GND of the Arduino to the GND of the 12V supply (aka DC-).

Thanks,
I was told that the 8 channel boards do have Optocoupler Isolation?
The Arduino ground is 5V (-) thought, is that wise to connect that to the 12V (-) negative of the car battery?

Paul__B:

It clearly does not as it does not have sufficient supply terminals.

It is vaguely possible that if you use the "Low/ High" select pins as the actual returns, it may be possible to isolate the isolators( :grinning: ) but when one side of the relay power (ground) must return to the Arduino as well as to a separate power supply, it cannot be actually isolated.

Unless someone can provide an actual circuit for it, we cannot really know.

yes an actual circuit diagram would be helpful, just wondering if anyone has experience using one of these words with an Arduino Mega and A PC to control the Arduino? And if so how they connected it all up?

Knightriderguy:
I was told that the 8 channel boards do have Optocoupler Isolation?

Who told you?

Yes, it is rather amusing, they do have optocouplers, but if the input and output of the optocouplers connect to the same circuit in some way, they are no longer "isolated" and that very much depends on how they are wired.

Knightriderguy:
I was told that the 8 channel boards do have Optocoupler Isolation?

They do have a opto coupler, yes. But Chinese like to f*ck thinks up... They are useless.

Knightriderguy:
The Arduino ground is 5V (-) thought, is that wise to connect that to the 12V (-) negative of the car battery?

You must, otherwise it will not work.

septillion:
But Chinese like to f*ck thinks up. They are useless.

It's a fascinating phenomenon.

In the case of the USB-serial converters (with the "RST" pin brought out), they seem to be able to read a datasheet and design a PCB but are unable to adequately comprehend its operation. Similarly here. Presumably these designs are mutilated copies ("clones") of some proper original which is not readily located for comparison.

Paul__B:
Who told you?

Yes, it is rather amusing, they do have optocouplers, but if the input and output of the optocouplers connect to the same circuit in some way, they are no longer "isolated" and that very much depends on how they are wired.

I posted once before about the 16 channel relay modules. And I forget who it was but I was told that the 16 Channel relay modules did not have the optocoupler isolation but that the 8 Channel boards do.
With some help I was able to modify the 8 channel board but even though it is fairly simple to do I would hate to have to be doing it all the time when we start selling copies of our project to people.

All of this extra information is fascinating but I'll try and keep this simple:
Can anyone provide me with a link to either a 16 Channel Relay Module or 8 Channel Relay Module that has actual Optocoupler Isolation that I can safely run my Arduino from a PC's USB port??

Yeah, that was me. The proper boards are inSainSmart type and have the JD-VCC jumper as previously mentioned. Here's an image. Opto Isolation Connection Scheme.

And you can see at least a two-channel one in operation on my YouTube channel, video #18 - it may help you move along in your project. URL in the signature of this post.

dlloyd:
Yeah, that was me. The proper boards are inSainSmart type and have the JD-VCC jumper as previously mentioned. Here's an image. Opto Isolation Connection Scheme.

Ahh yes, thanks.... sorry I forgot your name :wink:
that is working great for that 16 channel board I have done some in car testing and so far no problems.... keeping my fingers crossed there.

but like I had mentioned before I would hate to have to be constantly modifying 16 channel relay modules when we begin putting packages together fro people..... there HAS to be a better option?

I saw sometime ago a guy on youTube was using his PC with a software called "Vixen" to do a Christmas Yard Lights display using Arduino and a few 16 channel relay modules hooked up to the USB on his PC.... I don't know if he modified his relay modules in any way and he has not responded to my inquiries about how he did his project safely using the computers USB port.

Ralph_S_Bacon:
And you can see at least a two-channel one in operation on my YouTube channel, video #18 - it may help you move along in your project. URL in the signature of this post.

Thanks Ralph_S_Bacon.
I subscribed to your channel. I especially like that you take the time to explain what is going on thoroughly with these relay modules.

Now the one I have the 8 channel one I mean. Is it set up in the same way as that 2 channel one you demo in video #18?

Also in your video you mention a limit on how much you can run off of the Arduino. I'm using an Arduino Mega for our Knight Rider Dash software project. Currently I have it connected to a modified 16 Channel Relay module that I modified according to instructions by dlloyd. Now I doubt that at any time anyone would want to have more than a few devices on at any given time although I can see someone wanting their Fog Lights, Head lights, maybe a music player, the Knight Rider Scanner in the front nose, and maybe a few other things all turned on at the same time.... is that still safe to do and within the tolerance limits of the Arduino Mega? If not I am wondering how people run these amazing light displays using the Arduino and hundreds of christmas lights and other gadgets connected to the Arduino and a PC's USB port for control?

Knightriderguy:
but I was told that the 16 Channel relay modules did not have the optocoupler isolation but that the 8 Channel boards do.

A lot have a opto coupler but are not isolated.

Knightriderguy:
With some help I was able to modify the 8 channel board but even though it is fairly simple to do I would hate to have to be doing it all the time when we start selling copies of our project to people.

But why on earth did you? You don't need isolation. It's kind of ridiculous to isolate the control of a isolation,the relay. It's perfectly fine/normal/typical/done a thousand time to share GND between the 5V logic and some other supply used for relays.

Yeah, some boards can isolate like with the JD-Vcc jumper but it's pretty annoying. All the inputs are nice grouped together in a header of screw terminal and then you have that damn single JD-Vcc jumper somewhere on the board... And you absolutely don't need it.

I like to use this one, cheaper as well. Only downside, it has no mounting holes...

So no modification or isolation needed...

@septillion, not a fan of isolation I see. Yes, in many cases, non-isolated control of relays works fine. However, once an inductive AC load is connected ... all bets are off (especially 240VAC).

If the relay board already has the isolators, might as well use them. You'll get full power rail immunity to interference. Toss the jumper, toss the GND connection ... it's actually simpler to wire up.

Too bad the manufacturer(s) don't understand what the isolators are for!

The load IS isolated, that's where the relay is for. So if you have interference from that it's already via air/EM. Opto isolating the relay coil isn't going to help you there.

And if you just have a separate/stable supply for the Arduino then sharing the GND isn't going to give you trouble unless you use flimsy wires.

And to be more save, use a star pattern for GND. Aka a wire from supply to Arduino and a separate wire from supply to relay board. Not a wire from supply to Arduino and a wire from Arduino to relay board. Then all the current passes the wire to the Arduino as well. If you use 2 supplies, just connect then together at one point and use that as the star point of all GND connections.

dlloyd:
@septillion, not a fan of isolation I see. Yes, in many cases, non-isolated control of relays works fine. However, once an inductive AC load is connected ... all bets are off (especially 240VAC).

If the relay board already has the isolators, might as well use them. You'll get full power rail immunity to interference. Toss the jumper, toss the GND connection ... it's actually simpler to wire up.

Too bad the manufacturer(s) don't understand what the isolators are for!

Oh man you are so right there.... I especially want to take advantage of complete Optocoupler Isolation as the USB port of the Computer is sending the commands to the Arduino Mega which in turn activates the Relays which switch on 12V Automotive devices. That 16 Channel Relay Module I modified thanks to you works great but like I say I would hate to have to be modifying loads of them for each customer :wink: