RS485 BLACK AND WHITE WIRE

Status
Not open for further replies.

fifty60

Senior Member
Location
USA
For RS485, is the white wire supposed to be the + voltage signal and the black wire the - voltage signal? That is normally the case for speaker wires...not sure if it mandated as part of the RS-485 protocol or not...
 

Jraef

Moderator, OTD
Staff member
Location
San Francisco Bay Area, CA, USA
Occupation
Electrical Engineer
For RS485, is the white wire supposed to be the + voltage signal and the black wire the - voltage signal? That is normally the case for speaker wires...not sure if it mandated as part of the RS-485 protocol or not...
There is no official requirement for a color code, only marking, and that is technically supposed to be "A" and "B" in a half-duplex wiring scheme, which by virtue of you only asking about 2 wires we can assume you have. A is -, B is +, and the only thing that really matters is that A is connected to A and B is connected to B throughout your entire network. Getting it wrong will not damage anything, but you will lose comms.

You are using shielded wire correct?
 

fifty60

Senior Member
Location
USA
Yes is shielded 24/2 cable. It is not twisted pair, however. I believe the twisted pair would only help eliminate the common mode noise, and the shield will eliminate emitted and received EMI. How essential is it to use twisted pair on RS485 runs less than 50 feet? Would it be more essential for RS-232?

RS485 is looking at the difference between the two wires, whereas RS232 is looking at the difference between one of the wires and a ground reference. I would think it would be more essential to twist the wire for RS-232, but it would certainly help for both.

As of now, all the cable I use is only shielded and not twisted pair. I am considering making a push to use all shielded and twisted pair, but am not sure it is absolutely essential on short runs of usuall 20ft or less.

All of the shielded cable is grounded at one end only. The exposed unjacketed portion of the cable and shield that is grounded is kept to 2 inches or less. The ungrounded end of the cable has the shield clipped at the point it leaves the jacket, and is then wrapped in electrical tape or shrink tubed.

I had a guy tell me that NFPA requires that the portion of the shield that is removed from the jacket also has to be wrapped in electrical tape or shrink tubed. I do not think that it is a requirement, but I can also see how this would be helpful for preventing accidental contact with a current source.
 

GoldDigger

Moderator
Staff member
Location
Placerville, CA, USA
Occupation
Retired PV System Designer
There is no official requirement for a color code, only marking, and that is technically supposed to be "A" and "B" in a half-duplex wiring scheme, which by virtue of you only asking about 2 wires we can assume you have.
When you refer to half-duplex do you really mean simplex (only one direction period)?
Trying to do half-duplex (reversing transmit and receive roles on the same wire pair) can be very difficult to coordinate without one or more additional signalling wires in the circuit to coordinate the turnover of the line.
There are ways to do half-duplex with only the communications pair, but they require a hierarchical communication protocol and a collision detection scheme and tend to be unstable in the face of errors.
 

fifty60

Senior Member
Location
USA
I have an addition communications related question. When grounding the shield, does it make a difference if the communication shield is bonded to the equipment grounding conductor, or would I want to try to keep this communication ground floating and not referenced to ground?
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
141001-1336 EDT

GoldDigger:

There is no real problem doing half-duplex with a wire pair. In fact this is what the Dallas 1-wire system does and they can also supply DC power with the same wire pair. But I much prefer to run the Dallas system with three wires --- common, +5 V DC, and the non-grounded signal wire.

Also when using an old fashion modem for land-line phone transmission of data it usually operates as half-duplex over two wires.

RS-485 is a two wire system and must operate half-duplex. RS-422 uses four wires and can operate full-duplex. RS-422 chips may not provide a tri-state output on the line driver and those that do not have tri-state output must be used with four wires.

.
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
141001-1354 EDT

fifty60:

Think about your shield question. Why would you want to float the shield?

It is my opinion that the shield should be connected to the RS-485 common of the most important end of the communication path. Further, at most there should be only one RS-485 that does not have galvanic isolation. If only two points on a path, then least one end of the 485 path should have galvanic isolation, and then the shield should be connected to the RS-485 common at both ends. Ultimately one and only one RS-485 common should tie to EGC.

You should isolate all RS-485 from their equipment EGCs, and then connect the RS-485 common and its shield to one EGC somewhere. Or leave one RS-485 unisolated and make use of its EGC for all of the RS-485 bus.

.
 

fifty60

Senior Member
Location
USA
The only inputs for the controller RS-485 communications terminal are + and -. It is two wire communication. I typically take one end of 2 wire cable, peel back the jacket 2 inches or less and ground the shield directly to the frame of the equipment. the frame of the equipment is bonded back to the equipment's EGC. There is not an EGS on the controller itself, but on the main equipment that the controller is installed in, that is what the shield gets a low impedance connection to, the EGC of the main equipment.

If I have three controllers that are connected to a central PLC via RS485 using three separate shielded 2 conductor communication cables, would I want to leave one of the comm's cable shields ungrounded? I don't quite understand what you are getting at.

Can you please explain what you mean by RS485 common? I don't think I would want the shield to be connected to a floating ground. I would think that the closer to zero potential relative to all the noise sources within the cabinet would be ideal. to do this would be tying it to the ground potential that the EGC is connected to. I may be thinking about it wrong. With the rest of the cable covered in jacket or non conductive tape, there should not be any risks of ground loops from the non floating ground connection, right?
 

SceneryDriver

Senior Member
Location
NJ
Occupation
Electrical and Automation Designer
There are a lot of sort-of correct answers being thrown around here. I've dealt with and implemented RS485 systems for many years, and here are the important things to remember:

1) Thou shall use all three wires:
RS485 is a 3-wire standard. The shield must be connected at both ends to provide a common ground reference. The maximum common mode voltage allowed by the standard is +/- 7v. You risk damaging the transceiver chips in your devices if this is exceeded. If the local grounds between devices are at differing potentials, run a heavy-gauge bonding conductor with your communications cables and land it everywhere the coms cables terminate. If this isn't possible, use signal isolators that use galvanic isolation.

2) Thou shall use shielded, twisted pair cable.
RS485 expects 120 ohm characteristic impedance on the transmission media. You can cheat over short distances - I once saw a demo where RS485 was run over several pieces of barbed wire for a few feet- but the correct type of cable becomes important at longer distances and higher data rates. The shield is important for the reason I listed above, as well as for preventing noise from corrupting your data.

3) Thou shall terminate:
RS485 networks behave as transmission lines, especially at longer distances. If your runs aren't properly terminated, you get signal reflections that can cause maddening, intermittent data dropouts. Terminating a run of RS485 involves placing a 1/2w 120 ohm resistor across the data lines at each end of the run. Do not place resistors at each midpoint device (assuming you have more than two on the data bus). Only place them at the ends. The resistors swamp signal the reflections that cause problems.

4) Thou shall not star:
RS485 networks must be daisy-chained from device to device. No star topologies are allowed. Even stubs off the line to form drops to individual devices are a bad idea. Doing any of the above mucks with the signal path and can create signal reflections that will lead to data dropouts or complete network failure.


SceneryDriver
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
141001-1933 EDT

fifty60:

This is in response to your last post.

To a large extent I assume that you have one-way communication from what you call a controller to a PLC, or possibly the other way from PLC to controller.

Since you use the word controller let us assume this means something like a motor controlled value. This could be open loop meaning you only send data to the controller and there is no returned data of any kind.

Further assume the distance from the PLC to the controller is 8000 ft, totally separate power sources are used at each end of the 8000 ft path except they are supplied from the same power company, the power company primary lines are a multigrounded wye system, and at each end NEC rules are used for grounding the equipment. Consider what might be the voltage difference between the EGCs at the ends of the 8000 ft communication line.

Assume unisolated line drivers and receivers are used at both ends. At this point you need to study some typical datasheets for RS-485 components. As an example see:
http://www.ti.com/product/DS96176/technicaldocuments

The nominal supply voltage for this device is 5.0 V +/-0.25 V. In a system that is not isolated the terminal labeled GND is connected to the common of the electronics that work with all pins except A and B. Almost always in an unisolated application GND will ultimately connect to EGC. Vcc is connected to +5 V. The line driver outputs (A and B) have voltages that range between about 0.85 and 3.1 relative to GND.

The differential reciever inputs can have input voltages between -7 and +12 V relative to GRD without damage. This is fundamentally where the problem occurs in connecting two unisolated devices together.

The following is a broad scope discussion:
http://www.eetimes.com/document.asp?doc_id=1272339 apparently uses W for ohms.

Study the TI datasheet. I will continue with more later.

.
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
141001-2203 EDT

SceneryDriver:

Your discussion was good, but I have some slight differencies of perspective,

RS-485 is only a three wire system because of the physical limitations of unisolated devices with respect to common mode voltage, or the voltage difference between sender and receiver. Inherently RS-485 is a balanced two wire differential signaling system. With existing commercial components and isolation it can function with only two wires.

I can achieve high speed (115 kbaud) and high reliability communication (no errors in 100s of millions of bytes) over long distances with a twisted pair and no shield. The shield actually reduces maximum distance. However, in many situations a shield plus twisted pair is important.

Termination of the transmission line is usually important, but it is line length and data rate dependent. Optimum performance may be achieved with line termination resistances somewhat greater than the characteristic impedance of the transmission line. I often use 249 ohms.

Not directly related to the discussion here are some waveforms I generated to discuss RS-232 communication, but these show some reflected signals and the effect of source impedance. All were with a high load impedance.

See http://beta-a2.com/cat-5e_photo.html

.
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
141002-1040 EDT

fifty60:

It is very imporatant to know if any one or more of your RS-485 tetrmination points are isolated.

I suspect you are not working with a multi-drop bus. Meaning there are only two RS-485 devices on any one bus. This will be the assumption for the following comments.

Assume the PLC end does not have isolated RS-485 ports. This means the GRD terminal of the 485 transceiver chip is connected to the COMMON of the PLC +5 V DC supply, and to all other 485 ports, and to all 5 V logic in the PLC. This may or may not mean the COMMON is connected to the PLC chassis, and whether or not it is connected to the PLC EGC. This you need to determine.

If the PLC has isolated 485 ports, and hopefully isolated from each other, then up to about 1000 or more volts you probably don't care about this end of an RS-485 connection.

Next it is necessary to determine if your controllers have RS-485 isolation.

If your 485 cable runs are not long and don't run close to very noisy sources (like TIG or other arc welders), then shielded cable may not be important. Even long cable runs may not need shielding. Always use twisted pair cable. Electro-static shielding (copper braid or aluminum foil) does virtually nothing to reduce low frequency magnetic fields. The twisting is important for cancelation of magnetic fields. Other than for maximum length runs shielding is no problem so use it. High voltage gradient and high frequency noise is what shielding is used for.

Now to the problems of both ends of the 485 not having isolation. A 1 foot distance can be a problem. Assume the GRD terminal of the 485 chip at each end of the path is ultimately terminated to the EGC of each end. Next assume that the EGCs at said ends are not directly connected together with a low impedance short wire, but the EGCs are only connected together back at the main panel. At one end of the 485 path short the hot 120 line to its EGC, BAM both 485 chips are wiped out, and possibly other components. Put a low impedance 1 foot cable between the two EGCs and you probably solve the problem. But change the spacing of the two 485 points to 1000 ft and economically you can not put an adequate low impedance connection between the two end points.

Tell us more about the details of the PLC 485 and the controller 485.

,
 

SceneryDriver

Senior Member
Location
NJ
Occupation
Electrical and Automation Designer
141001-2203 EDT

SceneryDriver:

Your discussion was good, but I have some slight differencies of perspective,

RS-485 is only a three wire system because of the physical limitations of unisolated devices with respect to common mode voltage, or the voltage difference between sender and receiver. Inherently RS-485 is a balanced two wire differential signaling system. With existing commercial components and isolation it can function with only two wires.

I can achieve high speed (115 kbaud) and high reliability communication (no errors in 100s of millions of bytes) over long distances with a twisted pair and no shield. The shield actually reduces maximum distance. However, in many situations a shield plus twisted pair is important.

Termination of the transmission line is usually important, but it is line length and data rate dependent. Optimum performance may be achieved with line termination resistances somewhat greater than the characteristic impedance of the transmission line. I often use 249 ohms.

Not directly related to the discussion here are some waveforms I generated to discuss RS-232 communication, but these show some reflected signals and the effect of source impedance. All were with a high load impedance.

See http://beta-a2.com/cat-5e_photo.html

.

All good points. Since the OP had not mentioned isolation between the nodes, I was making the point that he might let the magic smoke out of the devices if they are at differing ground potential. I completely agree; at that distance, isolation is a very good idea.

I work in the entertainment industry where we use DMX for lighting control. The particular Belden cable called for in the DMX spec is rated at 120 ohm characteristic impedance. CAT5 is allowed for distributing DMX in permanent infrastructure wiring. CAT5 has 100 ohm characteristic impedance - close enough at 250kbaud. 120 ohm, 1/2w resistors are typically spec-ed for terminating DMX, which is multidrop RS485. If the cable being used has a different characteristic impedance, terminate close to that value. It will reduce reflections and data errors.

With short hops, termination can sometimes be "ignored." It's when the cable length gets close to the wavelength of the transmitted signal that reflections start to cause problems with data errors. Thus, at lower data rates that wavelength is longer, so the cable can be longer. Each install is unique, and sometimes "over-terminating" (lower resistance) or "under-terminating" (higher resistance) may make the system work optimally. A good place to start is usually close to the characteristic impedance of the cable however.


SceneryDriver
 
Status
Not open for further replies.
Top