Sending tethered serial data over long distance

Hi, for a project I'm working on I need to send serial data over a 60ft tether.

I have looked into this and know that TTL will not work this far. I've found the TTL to RS-485 module which can be seen here, but I am curious if that will just be a plug and play or will I need to adjust my code to support this protocol. I know I will need two, one on each end, to convert it from TTL and back.

I am also curious how many wires will have to be run along the tether if I use this. Would it still be a TX and an RX wire, and that's it, or would it need a power wire as well?

What speed are you needing?
Is data flow bidirectional?
Have you looked at a current loop for this.

RS485 is differential so you have two wires for transmit plus two wires for receive if you link is bi-directional. You do not need a ground wire. The two wires for each signal should be twisted pair. It will easily drive 60 feet of cable at 115,200 bps (and much faster). You won't have to change your code if it currently works with just the TTL transmit and receive signals.

@LarryD - I need it as instantaneous as possible, we are sending the value of a potentiometer to control a motor. The data flow is one way only. I have not looked into a current loop.

@MrMark - I am only transmitting data to one Arduino, we are not receiving any back. Would this mean I could could just have one twisted pair and that would be it?

MrMark:
RS485 is differential so you have two wires for transmit plus two wires for receive if you link is bi-directional. You do not need a ground wire. The two wires for each signal should be twisted pair. It will easily drive 60 feet of cable at 115,200 bps (and much faster). You won't have to change your code if it currently works with just the TTL transmit and receive signals.

Close to right. What you describe is actually RS-422. RS-485 operates on a single pair where all nodes listen then respond when polled. The distance is 4000 or 5000 feet between active repeating nodes. I have used 422 networks over 10 miles, with repeating nodes every 3000-4000 feet, before wireless or fiber optics were common. Both of these are very robust systens when used properly.

As for the OPs needs, I would look at either a current loop system or possibly a simple pot on the end of a wire with a little filtering into a analog input. the last option would be greatly influenced by the electrical noise level in the area where it is used.

mpgiii:
@MrMark - I am only transmitting data to one Arduino, we are not receiving any back. Would this mean I could could just have one twisted pair and that would be it?

As "rdfeil" points out, I gave you some bad information. In RS485 there is just a single twisted pair for both transmit and receive (A and B pins on the module) and transmission is multiplexed, that is, only one node is enabled for transmission at a time.

The MAX485 device from your original post is in receive mode when pin RE is pulled down and a transmit mode when pin DE is pulled up. If you were operating in a bi-directional mode you would have to implement control for these pins as part of your solution. Since your transmission is always one direction, you could simply ground RE and DE on the receive side and pull up RE and DE on the transmit side and there is no change to your application software.

I have looked into this and know that TTL will not work this far.

Is that the result of an actual test with your wire? RS232 may be able to communicate up to 1,200' at lower baud rates.

I have operated RS232 serial signals up to 4500' and all I had to do was lower the baud rate... surely you can get the distance you want with proper RS232 devices and correct signalling voltage levels.

Is your project going to encounter external signals that will cause errors in your data? Both current loop and long RS-232 are prone to error due to induced signals, such as florescent lights, electric motors, etc.

Paul

RS232 running on +/-12V is fairly robust.
(+/- 9V less so.)

I'd vote for differential signalling every time for long distance, far less likely to get problems.
The expense of RS485 drivers is probably a lot less than a +12V/-12V supply.

Just use one pair of a CAT5 cable for the RS485 and you have 6 spare wires which could be used for
other things (other channels, power).

Just use one pair of a CAT5 cable for the RS485 and you have 6 spare wires which could be used for
other things (other channels, power).

Agreed. CAT5 all the way, no matter which method you choose. The twisted pairs are already prepped for the RS485/RS422.

I use LT1481 RS485 tranceivers.

LT1481 Design Note (reducing power consumption)

If RE is high and DE is low, the part will enter a low
power (1µA) shutdown state.

RS485 INSTRUCTABLE

Nick Gammon RS485 LIBRARY/TUTORIAL

mpgiii:
. . . . we are sending the value of a potentiometer to control a motor

There's no need for digital transmission over 60 feet.

rdfeil:
As for the OPs needs, I would look at either a current loop system or possibly a simple pot on the end of a wire with a little filtering into a analog input . . .

Putting a potentiometer on the end of the tether cable is by far the most sensible suggestion in this thread. Actually you could make it a variable resistor on the end of a 2-wire cable.

If everybody is communication "c*ck sizing", then optical fiber is a must!

If everybody is communication "c*ck sizing", then optical fiber is a must!

Naah, satellite modem. Works anywhere in the world.

Perhaps fiberoptic. Probably pricier tho.

MrMark:
RS485 is differential so you have two wires for transmit plus two wires for receive if you link is bi-directional. You do not need a ground wire.

Whether or not RS485 needs a common ground is a big "it depends". It depends on the type of chips which are used. I had thought the balanced line was enough to keep things working well but a bit of additional research turned up several app notes stating a common ground was needed unless you were taking special steps to isolate the signal from the microcontroller.

Paul_KD7HB:
Is your project going to encounter external signals that will cause errors in your data? Both current loop and long RS-232 are prone to error due to induced signals, such as florescent lights, electric motors, etc.

I thought this was the reason to use RS485 with twisted pairs. An interference induced on one line will be induced on the other lines as well so the single remains balanced.

Archibald:
There's no need for digital transmission over 60 feet.
Putting a potentiometer on the end of the tether cable is by far the most sensible suggestion in this thread. Actually you could make it a variable resistor on the end of a 2-wire cable.

I've never tried something like this myself but this just sounds like it would be prone to all sorts of problems. Have you tried this yourself? If this is really a valid option, I'll need to try it myself in order to be convinced. It just seems like the opposite of what one should be doing.

Wouldn't it depend on the ratio of wire resistance ( for 120 feet) compared to the pot resistance ?
ie: If wire resistance < 10 ohms and pot resistance > 10 k ohms wouldn't the wire resistance
be negligible with respect to pot resistance ?

DuaneDegn:
I've never tried something like this myself but this just sounds like it would be prone to all sorts of problems. Have you tried this yourself? If this is really a valid option, I'll need to try it myself in order to be convinced. It just seems like the opposite of what one should be doing.

To me, using digital transmission seems way over the top but of course I recognise that the cost of interface breakout boards is fairly negligible.

When transmitting unbalanced analogue or digital signals over tens of feet of cable there is good reason to be concerned about interference. However in this instance the potentiometer voltage will be DC up to roughly 20Hz (assuming the potentiometer has a knob operated by a human!). We probably need no better than 5% accuracy in measuring the voltage at the receiving end. So from an academic perspective there's a very low bandwidth and undemanding signal-to-noise requirement. As suggested by 'rdfeil', you could place a simple low-pass filter at the receiving end to reduce any higher frequency interference; just a capacitor would probably be sufficient. It fact it may not matter if the power to the motor is affected by interference because of the inertia of the rotor.

Hi not sure if this will help but you can try to look at the 3-wire-protocol it is slow but it's fairly accurate in terms of data transfer