# RS-485 over UTP



## splatz (May 23, 2015)

I'm considering converting a lighting control system from ethernet to RS-485. (I am putting it in the PLC subforum rather than the lighting subform because it's really more of a controller issue than a lighting issue.) 

The lighting controls documentation specifies Belden 3105A cable or equivalent, which is a shielded twisted pair 22 gauge cable, and 120 ohm terminating resistors, which match the characteristic impedance of the 3105A cable. The master device has a built-in terminating resistor. 

I would like to use the building's in-place datacom wiring, which is voice grade and cat 5e UTP, for the RS-485 communications. However, using this cable the total length of the bus will be well over the 4000' limit. I have never had trouble using cat 5e or cat 6 for RS-485 over short distances, but I don't know if it would be possible at these distances. 

I'd probably be using a 4-port repeater in the middle of the facility and stringing out on three busses - one short one to the master device using the 3105A cable, one going east on house cable, one going west on house cable. I'll use 100 ohm terminating resistors on the UTP busses. 

What do you think, is it even worth trying? I'll probably try it if it has a decent chance of working. It will be cheap quick and easy if it works, so the customer doesn't mind risking a little money on this experiment if there's a reasonable chance of success.


----------



## emtnut (Mar 1, 2015)

We used to wire up RTUs (Kinda like a SCADA plc) with RS-485. Went over the 4000' on cat 5 many times (never used shielded unless really close to higher voltages)
BUT, that was at 56kbs. Are you going to be running 10Mbp on this ?


----------



## emtnut (Mar 1, 2015)

I see most converters (Eth to 485) are selectable baud rates. Go with the 56k and you should be good.


----------



## splatz (May 23, 2015)

emtnut said:


> We used to wire up RTUs (Kinda like a SCADA plc) with RS-485. Went over the 4000' on cat 5 many times (never used shielded unless really close to higher voltages)
> BUT, that was at 56kbs. Are you going to be running 10Mbp on this ?


Good to know, thanks! 

I don't know what speed it's at, and I don't see it in the specs, but that's a good question, I'll see if the support can answer.


----------



## emtnut (Mar 1, 2015)

splatz said:


> Good to know, thanks!
> 
> I don't know what speed it's at, and I don't see it in the specs, but that's a good question, I'll see if the support can answer.


The lighting control _shouldn't_ use that much data (Might be good to find out how much data they actually use) Likely 10baseT, but how much throughput they need would be good to know.

Do you already have the converters ? have a Model # ??


----------



## splatz (May 23, 2015)

emtnut said:


> I see most converters (Eth to 485) are selectable baud rates. Go with the 56k and you should be good.


The manufacturer says you have to use their proprietary software to program these, which I don't have, and it's a lot of money :vs_mad:

I am thinking since they spec the 4000' limit, it must be under 90K baud. 

I'll probably buy a USB to RS-485 adapter, just in case - looks like they're cheap - I can probably figure it out with that.


----------



## splatz (May 23, 2015)

emtnut said:


> The lighting control _shouldn't_ use that much data (Might be good to find out how much data they actually use) Likely 10baseT, but how much throughput they need would be good to know.
> 
> Do you already have the converters ? have a Model # ??


The converters are some special order only part, I don't have it handy but when I searched for it on line, it is not google-able or bing-able, if you can believe that. They want to custom program it and send it ready to swap in. 

What I can see of the low-level commands etc. in the programming, it's all very short little blips, I can't imagine it using much data ... but you never know.


----------



## paulengr (Oct 8, 2017)

Look at Modbus.org for specs and limitations. Modicon/Schneider gave away the specs years ago and RS-485 is similarly very robust.

Two big differences between RS-485 and Ethernet:
1. Not only is RS-485 much slower so it goes much longer distances but the signals are centered around DC so AC power that gets induced will interfere. Ethernet is about 35 MHz but it is purposely designed to avoid using anything below about 300 Hz so it is immune to 50/60 Hz AC. Both use voltages around 1 volt to avoid capacitance issues.
2. Twisted pair gives very high shielding against electric noise. It doesn’t do much for magnetic noise. Shielding is just the opposite. So since Ethernet can pretty much ignore power lines it only needs electric noise protection. Adding a shield increases magnetic field protection at the expense of some electrical interference protection so ScTP (shielded CAT 5E) is generally shooting yourself in the foot except in areas of high magnetic fields for Ethernet. But since RS-485 is not so robust specs call for the shielded cable for a reason.

So if your cable routing is such that you won’t have AC magnetic field interference UTP is mass produced to the point where there is no point not using it over the “right” cable. But if you are near power lines eat the shielding or suffer the consequences.



Sent from my iPhone using Tapatalk


----------



## splatz (May 23, 2015)

paulengr said:


> So if your cable routing is such that you won’t have AC magnetic field interference UTP is mass produced to the point where there is no point not using it over the “right” cable. But if you are near power lines eat the shielding or suffer the consequences.


The only place it will be in close proximity to power is inside the 480/277 lighting panels, where of course, it's kind of RIGHT there. But in my experience it's more long parallel runs that cause trouble, so maybe its a non issue. 

Oddly enough, the ethernet-RS485 gateways are dangling in the gutter of these panels by the ethernet patch cords. (I can't imagine this is or ever was compliant.) There's a short piece of unshielded, un-twisted quad wire going from the gateway to the controller terminals. The controllers are right above the breakers in the lighting panels.


----------



## paulengr (Oct 8, 2017)

splatz said:


> The only place it will be in close proximity to power is inside the 480/277 lighting panels, where of course, it's kind of RIGHT there. But in my experience it's more long parallel runs that cause trouble, so maybe its a non issue.


Exactly. I was thinking of running RS-485 a couple miles on a pole line below the power. Even if the field is weak given enough distance it's a big problem. Of course fiber is cheaper and goes MUCH farther in those circumstances and is 100% immune to anything electrical.



Sent from my SM-T350 using Tapatalk


----------



## MDShunk (Jan 7, 2007)

I've only ever used Cat5 and, before that, Cat3 for 485. Many times making pit stops at ordinary (existing) 66 blocks. The only difference is that the terminating resistor is 100 ohms instead of 120 ohms. Don't do much rs485 in recent years. It's all Ethernet now.

Just realized you're going over the 1000 meter spec limit. Interesting. Please report back how it works. I'm betting maybe okay if you can pick a low transmission rate.


----------



## splatz (May 23, 2015)

MDShunk said:


> I've only ever used Cat5 and, before that, Cat3 for 485. Many times making pit stops at ordinary (existing) 66 blocks. The only difference is that the terminating resistor is 100 ohms instead of 120 ohms. Don't do much rs485 in recent years. It's all Ethernet now.
> 
> Just realized you're going over the 1000 meter spec limit. Interesting. Please report back how it works. I'm betting maybe okay if you can pick a low transmission rate.


Good to hear, another report of getting the spec distances over UTP, and over house cable no less. 

Unfortunately I don't currently know a way to set the data rates but with the repeater I will be able to keep it under the 4000' limit on each branch. 

I found a graph like this a couple places googling around ... it looks like at 4000', something other than data rate is the limiting factor


----------



## paulengr (Oct 8, 2017)

MDShunk said:


> I've only ever used Cat5 and, before that, Cat3 for 485. Many times making pit stops at ordinary (existing) 66 blocks. The only difference is that the terminating resistor is 100 ohms instead of 120 ohms. Don't do much rs485 in recent years. It's all Ethernet now.


Here's the one thing that is a slight issue. I'm not sure what the impedance of CAT 5E is but I suspect it's probably 50 ohms because that's what the (almost) original coaxial cable Ethernet was. Not sure about the Belden cable. If the characteristic impedance of your transmitter is 50 ohms (pretty sure it isn't) then it will work flawlessly but if the impedance is off, you need a resistor to make up the difference. If you don't, you'll get signal loss (pulses smear) and/or reflections (echoes). Since the cable types are switching may want to look at Z0 of the Belden cable and adjust the resistor if needed. See this article with nice pretty pictures to explain. It's for I2C but the same principles apply to ANY communication network. Back in the "thin" Ethernet days when Ethernet used coaxial cable, we had to put in 50 ohm termination resistors on open ports for the same reason.

https://www.nxp.com/docs/en/application-note/AN11075.pdf

If you're off a bit on the resistor size it will still work just not as well. For example yesterday I ran into an installation with no termination resistors on an Allen Bradley DH+/RIO network which was only about 20 feet long but packet loss was about 50%. I looked in my box and I didn't have the proper 150 ohm resistors but I did have some 180 ohm resistors. I put them on and like magic packet loss went to zero.

RS-485 is balanced and "needs" only 2 wires. Technically it needs power distribution too so it might be up to four wires. See Modbus.org as a great (and readable!) example specification. It is "low" (under 1 Mbps) speed and uses good old UART style transmitter chips so that even your average embedded processor typically has a port or two. It shows up all over but most of the time it isn't called "RS-485". The competing 2 wire protocols in recent years are the CAN style bus and "digital" 0-20 mA current loops (20 mA for a "1", 0 mA for a "0") which are the distance kings aside from fiber. Ethernet has displaced almost all other competitors in the short distance category except for very low device density and on-board communications where I2C and variations of CAN show up.



> Just realized you're going over the 1000 meter spec limit. Interesting. Please report back how it works. I'm betting maybe okay if you can pick a low transmission rate.


This is more of an Ethernet thing. You can push Ethernet further than the specs say though


----------



## splatz (May 23, 2015)

Cat 5e / Cat 6 and other comm UTP is 100 ohm characteristic impedance, the Belden cable is 120 ohm. 

The master devices have a built - in 120 ohm terminating resistor. I figure that if I use a repeater without built-in termination, I can get around the impedance mismatch by putting the master on one port, the east bus on one port, and the west bus on one port. The east and west buses will be 100 ohm with 100 ohm terminating resistors, the master bus which will be very short will be 120 ohm and belden cable. 

Regarding ethernet distance limits - you can get away with a lot with 10baseT but very little with 100baseT or gigabit, you get late collisions. The distance limiting factor for 100baseT and 1000baseT is timing, based on the NVP.


----------



## MDShunk (Jan 7, 2007)

This is all very interesting, but I've done it successfully all through the 90's. 485 can often be throttled back to 9.6k baud, if need be, which is way more than enough speed for lighting control.


----------



## matt1124 (Aug 23, 2011)

Is it DMX by chance? If so, yes it will work. 

I’ve been out of that game a long time, I understand 2 way DMX is a thing now, and that using cat5 would be problematic.


----------



## splatz (May 23, 2015)

matt1124 said:


> Is it DMX by chance? If so, yes it will work.
> 
> I’ve been out of that game a long time, I understand 2 way DMX is a thing now, and that using cat5 would be problematic.


DMX does not ring a bell ...


----------



## paulengr (Oct 8, 2017)

splatz said:


> DMX does not ring a bell ...


DMX is a lighting protocol for stage lighting.

Sent from my SM-T350 using Tapatalk


----------



## splatz (May 23, 2015)

MDShunk said:


> This is all very interesting, but I've done it successfully all through the 90's. 485 can often be throttled back to 9.6k baud, if need be, which is way more than enough speed for lighting control.


I don't know what the data rate is yet, I am thinking maybe I ought to just get a USB RS485 adapter and see what I see with some sniffer software. I assume I won't see data until I set the baud rate correctly. 

From what I can all that goes across this system is very short little commands - you could probably run this with anything faster than morse code - but since I can't set the data rate, I have to work with the current setting.


----------



## emtnut (Mar 1, 2015)

splatz said:


> I'm considering converting a lighting control system from ethernet to RS-485.
> 
> I would like to use the building's in-place datacom wiring, which is voice grade and cat 5e UTP


What about just using an ethernet extender ?

Those things work great even on voice grade lines.


----------



## splatz (May 23, 2015)

emtnut said:


> What about just using an ethernet extender ?
> 
> Those things work great even on voice grade lines.


Well, if I create a separate ethernet network in the facility, the IT people will pee their pants. (Even though they do nothing but bitch they're too busy to make and manage a separate network for automation.) 

But I think the RS-485 gateways are starting to flake out. They are 4-5 years old. They are expensive and a pain in the ass special order to get replacements. 

I figure RS-485 simplifies things, less parts, and less people involved.


----------



## splatz (May 23, 2015)

At this point based on everyone's input, I figure this is what I'll propose to the customer. 

We'll wait for the next panel to act up, and try going RS-485 direct to that panel over the building's UTP house cable. If that works out, I'll plan on moving everything over to the UTP, either all at once if budget permits, or as the gateways fail if they want to stretch it out. 

If there's a problem with the UTP, the fallback plan will be to run the Belden cable, and we'll still be ahead, not a lot of time / money wasted trying the UTP, I'd say it's worth the risk.


----------

