datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com  
Events
UBM Tech
UBM Tech

Design Article

Comment


Mike Fahrion

7/24/2012 8:55 AM EDT

I agree in part and have seen many of each of the above scenarios in practice ...

More...



mac_droz

7/23/2012 9:23 AM EDT

I did design few systems with RS485 and every now and then I find articles ...

More...

A troubleshooting guide for RS-485

Mike Fahrion, B&B Electronics

7/17/2012 5:52 PM EDT

It’s possible to avoid many pitfalls and save on troubleshooting time by paying attention to some fundamentals when using RS-485.

Avoid pitfalls

The best approach is preventative. Determine a device’s communications characteristics before system design is complete and then as the right questions during system design, such as:

  • Is this device configured for two-wire or four-wire systems?
  • Is a signal ground connection available?
  • Is the device isolated? Does it include any surge suppression devices?
  • What value bias resistors, if any, are used in the device—and are they accessible for modification?
  • Is the device terminated and accessible for modification?
  • What is the device’s response time (turnaround delay)?
  • What is the programmable address range of the device?
  • What baud rate or range of baud rates is supported?

 

Tristate control using RTS

When you use an RS-485 converter with RTS control, set the RTS high before the data is sent. Also, set the RTS line low after the last data bit is sent.

When an RS-485 network is connected in a two-wire, multi-drop party-line mode, connect the receiver at each node to the line. Configure the receiver to get an echo of its own data transmission. This setup is desirable in some systems but troublesome in others.  Check the data sheet for your converter to determine how the receiver “enable” function is connected. Check the requirements of your application software to see if it supports RTS control. If in doubt, choose a converter with Send-Data control.

Using Send-Data control

If Send-Data control is used, the converter automatically disables the transmit data line at a fixed interval after the last bit, typically one character length.

Interval length is important. If too short, you can miss parts of each character being sent. If longer than the turn-around delay of the responding devices, your system may try to switch the data line from transmit to receive before the node with the Send Data converter is ready to receive data. In the latter case, you will miss portions, even complete characters, in the response.

Is it a two-wire or four-wire system?

RS-485 systems can be either two-wire or four-wire systems. The two-wire configuration—with the additional ground conductor here—reduces cabling cost, but is restricted to half-duplex communications (cannot receive and transmit at the same time). The majority of RS-485 devices are two-wire configurations.

Devices configured for four-wire communications bring out A and B connections for both transmit and receive pairs. You can connect transmit lines to receive lines to create a two-wire configuration. The latter type device gives the most configuration flexibility.

Note: Four data wires plus an additional signal ground wire are used in a four-wire connection. The signal ground line should also be connected in the system to keep the common-mode voltage, vcm, at the receiver within a safe range If you operate the interface circuit without signal ground connection, you sacrifice reliability and noise immunity.

To terminate or not?

Termination matches impedance of a node (transmitter/receiver) to the impedance of the transmission line (cable). When impedances are mismatched, the transmitted signal is not completely absorbed by the load and a portion reflects back into the line.

Termination, however, increases load on the drivers, increases installation complexity, changes biasing requirements, and makes system modification more difficult.

 

Also, adding termination greatly increases power consumption and requires the network to be re-biased. Termination may not have any benefit when used at low data rates or on short runs. Termination is not recommended when using port-powered RS-232 to RS-485 converters.

If you use terminators, understand their pros and cons. You’ll need resistors of more than 90Ω. Typically, they’ll be placed only at the extreme ends of the data line. Place no more than two terminations in any system that does not use repeaters. Always recalculate the bias resistors when you add termination to a system.





mac_droz

7/23/2012 9:23 AM EDT

I did design few systems with RS485 and every now and then I find articles claiming that you always need grounding cable (2-wire ports need in fact 3 wires). That is simply not true. There are three possible scenarios for 2-wire system:

1. RS485 transceivers not insulated from power rails - this would call for additional ground cable (in many applications connected to the local ground through 100R resistors to lower ground loop currents).

2. RS485 transceivers galvanically insulated from the power rails and data lines pulled to the transceiver's rails by resistors (important) - you don't need a ground cable. No current loops. Make sure differential potential between local grounds is less than the insulation of power blocks/opto-couplers.

3. Same as pt.2 but with the additional grounding cable connecting insulated grounds of the transceivers and globally connected to one main ground (in one place). This is an overkill option but might be useful especially if shielded wires are used in some harsh environment.

Solution 1 is by far the worst because it closes ground loops - bad idea as those currents can change rapidly and mess up with your data (think high power motors and big contactors).

Solution 2 is the most practical but requires insulating power blocks and opto-couplers.

Solution 3 is for extreme environments.

Same applies for 4-wire version.

Sign in to Reply



Mike Fahrion

7/24/2012 8:55 AM EDT

I agree in part and have seen many of each of the above scenarios in practice (along with the worst case of #1 but no signal ground cable).
Here are two things I would consider.
- the installer often has no information on whether the equipment at each node is galvanically insulated or not and doesn't always have the tools or knowledge to test for it.
- In scenario 2 where all nodes are isolated, you're lacking a signal return path. While 485 is differential, it's not balanced, at the driver both lines are positive with respect to the local ground.

I'm a big fan of solution 3 in applications where 485 may be linking between power systems that may have impedance between them. I'll usually put in some surge limiting at that main ground location as well.

Feedback?

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)