Hi guys,
I'm new to using an Arduino but come from a strong background of programming and some basic electronics.
I've been a assigned a project where i need two sets of relays that will be approximately 50 meters apart being controlled by the one arduino.
The relay board will be powered from its own power source but i would need the output pins on the Arduino to trigger the relays over a 50 meter length of wire. I'm thinking that dc over that distance might have a voltage drop.
Are there way i can make this setup reliable or is it even feasible for it to work over that distance?
is it even feasible for it to work over that distance
Yes it is but understand where the power to energise the coil is going to come from.
You can use the Arduino as a trigger if you use something like a line driver and receiver to send logic commands, something like an AM26LS31A driver and an AM26LS32A receiver. Then you need a transistor to switch on the relay from a local relay drive voltage. These are a differential pair and are a lot less likely to pick up interference that most other things.
The simple minded approach of just sending a high voltage ( like 24V ) down a long wire to trigger a 12V relay could also work but it is not so solid.
Grumpy_Mike:
Yes it is but understand where the power to energise the coil is going to come from.
The power to energise the coils will come from a separate source, so its the input signals that need to make the distance.
Grumpy_Mike:
You can use the Arduino as a trigger if you use something like a line driver and receiver to send logic commands, something like an AM26LS31A driver and an AM26LS32A receiver. Then you need a transistor to switch on the relay from a local relay drive voltage. These are a differential pair and are a lot less likely to pick up interference that most other things.
This looks like the approach i should take. Is there anything i should consider when choosing the right wire for this?
jeffez:
Hi guys,
I'm new to using an Arduino but come from a strong background of programming and some basic electronics.
I've been a assigned a project where i need two sets of relays that will be approximately 50 meters apart being controlled by the one arduino.
The relay board will be powered from its own power source but i would need the output pins on the Arduino to trigger the relays over a 50 meter length of wire. I'm thinking that dc over that distance might have a voltage drop.
Are there way i can make this setup reliable or is it even feasible for it to work over that distance?
Thanks
You left out some very important details ...
Q1) What is the Make & Model & Schematic of the relay board?
Q2) What gauge wire will you be using for the 50 Meter run?
Q3) How many milliamps will the Arduino need to Sink / Source to energizer the Relay?
The Relay Board is 50 Meters away from the Arduino ?
I think, 16 Gauge wire has only about 1 ohms for 100 meters.
mrsummitville:
You left out some very important details ...
Q1) What is the Make & Model & Schematic of the relay board?
Q2) What gauge wire will you be using for the 50 Meter run?
Q3) How many milliamps will the Arduino need to Sink / Source to energizer the Relay?
The Relay Board is 50 Meters away from the Arduino ?
I think, 16 Gauge wire has only about 1 ohms for 100 meters.
This page shows the board i have. I will have a separate power source to provide the 5v to energise the coils. So it'll just be the inputs that need to travel the long distance.
Yet to decide on the wiring gauge. Was looking for opinions on that. I'll have to go with the right balance of cost as of course the employer is big on saving money.
What are your thoughts on Grumpy_Mikes suggestion of having a line driver and receiver setup? and would that affect the gauge of wire i should use?
That website gives poor advice.
Not very wise to power a 4-relay board (~350mA) from Arduino's 5volt rail.
The software shows acive "LOW", while the picture of the board suggest an active "HIGH" relay board.
Not sure. A detailed picture of that relay board might help.
I would get a 4-relay board with optos.
Relay power directly to the relay board (e.g. 5volt phone charger).
And run a length of Cat-5 (cheap) between the Arduino and relay board.
Remove the JD-VSS jumper if it has one.
And connect only VCC and the relay signals (not ground) to the Arduino.
Each twisted pair carrying VCC and signal.
The 4mA opto current should have no problems with that length of wire.
Leo..
Yet to decide on the wiring gauge. Was looking for opinions on that. I'll have to go with the right balance of cost as of course the employer is big on saving money.
What are your thoughts on Grumpy_Mikes suggestion of having a line driver and receiver setup? and would that affect the gauge of wire i should use?
Your relay board is OK.
CAT-5 Cable is OK.
There are 4 twisted pairs in a CAT-5 Cable.
Blue Pair = Digital I/O #1 + Gnd
Orange Pair = Digital I/O #2 + Gnd
Green Pair = Digital I/O #3 + Gnd
Brown Pair = Digital I/O #4 + Gnd
Connect all 4 Ground wires to Ground at both ends.
Connect each I/O #1 thru I/O #4 wire at both ends to the appropriate I/O Pin.
Connect the +5 Volt and Ground wire from your Power Supply to the Relay Board.
Do not make any connection between the Arduino +5v and the Relay Board.
Each Input to the relay board appears to require +5v @ 10 ma (Active High) which is OK.
50 Meters (150 Feet) of Cat-5 ( 24 Gauge ) is about $20 US.
There is no need to purchase any special Line Drivers or Receivers.
mrsummitville:
Connect all 4 Ground wires to Ground at both ends.
That depends on the type of relay board.
Do NOT connect grounds with a common (ebay) opto isolated relay board.
The opto LEDs are connected between VCC and the relevant input pin.
Arduino "sinks" LED current.
You must NOT connect grounds if you want opto isolation.
Leo..
You might consider using a second slave arduino at the relays and just send serial commands from the main arduino to the slave at the relays. Four conductor cat3 telephone wire probably could be used between the two.
Opto-isolation does help reduce interference since the power needed to turn on
the LED inside an optocoupler is a lot more than is needed to switch a logic
chip or transistor, meaning that much high amounts of noise are needed to
interfere with operation. Also an opto isolator (so long as it has a series
resistor) is pretty immune to moderate amounts of over- or under-voltage.
A shielded cable or twisted pair is always a good idea for long-distance cabling.
A wireless method of signalling saves the cost of the wire though, and long wires
are surprisingly expensive.
Do NOT connect grounds with a common (ebay) opto isolated relay board.
The opto LEDs are connected between VCC and the relevant input pin.
Arduino "sinks" LED current.
You must NOT connect grounds if you want opto isolation.
Leo..
The OP needs to connect GROUND for the Relay Board that he already has.
I am discussing the connections for the Relay Board that the OP already has.
You are discussing connections for Relay Board that the OP does not have.
How is that helpful?
Because the OP already has Relay Board and he does not need RS-485.
Why make things more complicated ?
Connecting a simple Digital I/O wire is simple and easy.
MarkT:
Opto-isolation does help reduce interference since the power needed to turn on
the LED inside an optocoupler is a lot more than is needed to switch a logic
chip or transistor, meaning that much high amounts of noise are needed to
interfere with operation. Also an opto isolator (so long as it has a series
resistor) is pretty immune to moderate amounts of over- or under-voltage.
A shielded cable or twisted pair is always a good idea for long-distance cabling.
A wireless method of signalling saves the cost of the wire though, and long wires
are surprisingly expensive.
50 meters of CAT-5 wire only costs $20.00 US.
That is surprisingly cheap.
The Arduino Digital Outputs, at 25 ohms, are very immune to noise.
The twisting of the Pairs in the Cat-5 cable will be help reduce noise in the cable.
At this point in time, I do not see any need for an Opto-Isolation.
zoomkat:
You might consider using a second slave arduino at the relays and just send serial commands from the main arduino to the slave at the relays. Four conductor cat3 telephone wire probably could be used between the two.
Serial Communications is, at least, 10 times more difficult
to design, implement and troubleshoot than Digital I/O.
Digital I/O is simple and easy to design, implement and troubleshoot.
Why make things any more difficult, than they should be?
Digital I/O is simple and easy to design, implement and troubleshoot.
Why make things any more difficult, than they should be?
Well, if the OP can operate the optical isolator on the relay board directly from the arduino digital pin over 50 meters of wire, then that would probably be the simplest setup.
mrsummitville:
Your relay board is OK.
CAT-5 Cable is OK.
There are 4 twisted pairs in a CAT-5 Cable.
Blue Pair = Digital I/O #1 + Gnd
Orange Pair = Digital I/O #2 + Gnd
Green Pair = Digital I/O #3 + Gnd
Brown Pair = Digital I/O #4 + Gnd
Connect all 4 Ground wires to Ground at both ends.
Connect each I/O #1 thru I/O #4 wire at both ends to the appropriate I/O Pin.
Connect the +5 Volt and Ground wire from your Power Supply to the Relay Board.
Do not make any connection between the Arduino +5v and the Relay Board.
Each Input to the relay board appears to require +5v @ 10 ma (Active High) which is OK.
50 Meters (150 Feet) of Cat-5 ( 24 Gauge ) is about $20 US.
There is no need to purchase any special Line Drivers or Receivers.
Does this make sense to you?
Thanks, yes this makes sense. My next question would have been about the need for the line driver/receiver setup if using Cat-5.
With powering the relay, will have 12v and 7v dc available and so i was thinking of using those to get the 5v needed to energize it. How ever if i want to connect the grounds between the arduino and the relay board at 0v, i may have to come up with a voltage divider to get my 5v.
zoomkat:
You might consider using a second slave arduino at the relays and just send serial commands from the main arduino to the slave at the relays. Four conductor cat3 telephone wire probably could be used between the two.
In my first diagram i went with this idea, but due to the need to have different code on each device i decided to simplify it down to just using one. However if it works out better i may go back to this design idea.
I am discussing the connections for the Relay Board that the OP already has.
You are discussing connections for Relay Board that the OP does not have.
How is that helpful?
I should note that the parts i have right now are for building a prototype. I may go with a different relay board when the getting the real system setup. That really depends on what best suits. I will have to do some more research as there's some key words mentioned here about the relay board i'm not familiar with. I will want to make sure i get it right as this setup will be replicated multiple times costing the employer allot of money.
mrsummitville:
Because the OP already has Relay Board and he does not need RS-485.
Why make things more complicated ?
Connecting a simple Digital I/O wire is simple and easy.
Simple and easy is good as i am offsite and will have to hand specs over for someone else to physically install.