RS485 unit load and speed

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi guys

The RS485 standard states that the maximum unit load is 32, does it apply to all speed? Can I add more than 32 nodes (assuming 1 unit load per node) if I lower the speed? say to 4800bps??

Thanks guys
 

Papabravo

Joined Feb 24, 2006
22,082
It all depends on the length of the cable and the actual impedance of each differential receiver. Signal integrity will depend on having proper terminations at the ENDS of the cable plant. This assumes the inactive transmitters will be in a High Impedance state. In any particular installation you might get more than 32 devices. What you have to do is test it.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
It all depends on the length of the cable and the actual impedance of each differential receiver. Signal integrity will depend on having proper terminations at the ENDS of the cable plant. This assumes the inactive transmitters will be in a High Impedance state. In any particular installation you might get more than 32 devices. What you have to do is test it.
So different speed will have different impedance? or the impedance of each differential receiver is not depending on speed?
 

dendad

Joined Feb 20, 2016
4,637
You could look at it as the higher the speed, the more percentage wise the signal gets distorted and degraded so the harder it will be to get reliable signals out.
Correclty terminated cables will help.
There are some brands of RS 485 drivers that will happily drive more than 32 receivers, and they present less than one standard load to the network. Check the data sheets. Usually that will be the same devices at all points.
Just out of interest, have a look at the isolated RS485 drivers that MonSun produce.
My only complaint with them is the T/R switching sense is inverted.
 

Papabravo

Joined Feb 24, 2006
22,082
So different speed will have different impedance? or the impedance of each differential receiver is not depending on speed?
I meant that without measuring the differential impedance of the receiver it is impossible to know what is actually going on. The datasheet can be a guide but only measurement is definitive. As you stress the installation of devices and cable different things can happen. The worst case for example is one device at one end of a long cable and 31 devices collected at the other end. This situation differs from 32 devices spread out equally along the cable. One of the big challenges is turnaround on a two wire system. You need to keep the transmitter enabled until the last bit (a STOP bit) has been placed on the cable and allowed to propagate to the other end. Then that transmitter must be disabled and everybody has to listen for at least one cable length propagation delay before another node attempts to speak (by enabling it's transmitter).

You want to set your bitrate to allow reflections along the cable to die out before the "sample point" for a received bit occurs. If a UART divides a "bit cell" into 16 equal sized time slices, then the samples of the bit value are taken at the 7th, 8th, and 9th time slices. Majority (2 out of 3) rules.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
You want to set your bitrate to allow reflections along the cable to die out before the "sample point" for a received bit occurs. If a UART divides a "bit cell" into 16 equal sized time slices, then the samples of the bit value are taken at the 7th, 8th, and 9th time slices. Majority (2 out of 3) rules.
I think I understand the first part, but not sure about the second part.

Let me put in some numbers
  • Cable is 1km long
  • Bitrate is 9600
  • and there is only two device (on on each end)
  • speed of signal is c/3 (1/3 of speed of light)
  • it will take 10uS to send 1 bit from one end to another (t=1km/(c/3)), both way is 20us
  • 1 bit @ 9600 is 104uS

So at what point of the 1 bit refection along the cable will die out? (assumming proper termination).

edit:
as @ebp mentioned below, speed of singal is 65% C, sending 1 bit takes 5.1uS, both way is 10.2 uS
 
Last edited:

ebp

Joined Feb 8, 2018
2,332
1/4 unit load and slew-rated limited transceivers are readily available. Slew rate limiting can be helpful with managing transmission line impedance issues, but of course also means that the maximum bit rate is limited. There are 1/8 unit load transceivers.

Ideally, a transmission line is terminated in its characteristic impedance and there is no reflection. For "mutli-drop" systems like RS-485 this means parallel termination at each end, since series termination is unsuitable (series termination attenuates the signal by a factor of 2 at the transmitting end but means that a clean signal will arrive at the receiving end even if it is unterminated, though in between is a great big mess; precision analog transmission typically uses series termination at the source end and parallel at the destination). "Stubs" along the line can cause problems because they can't be properly terminated and generate reflections. Every disturbance in impedance along the line generates reflections, and this includes transceivers. Even minor changes in the spacing between conductors in a twisted pair cause reduction of signal integrity. Sometimes transmission lines can be "clamped" instead of properly terminated - high speed diodes are used to limit excursions of the signal above the supply or below ground. This is certainly not ideal, but does "eat" some of the energy that would otherwise be reflected (only in the case of a line terminated with higher than its characteristic impedance; it does nothing for a line terminated at less than Z0). A huge amount has been written on transmission lines and much is readily available on the web. You can also easily find lots of info on RS-485 implementation.

You will not find any conventional twisted pair or coaxial cable that propagates at much less than 65% of the speed of light and most are consideraby faster. You can predict the signal levels on an improperly terminated transmission line but you cannot make any blanket statement about how many line transit times are required for a usable signal unless you know how the receiver works. Even properly terminated lines attenuate signals, and that must be considered, as must issues of limited common mode rejection and the need for a common reference ("ground").
 

dendad

Joined Feb 20, 2016
4,637
....... and the need for a common reference ("ground").
Years ago, when we were new at RS485, we did some RS485 installations that were "2 wire" like in some documentation.
They had very intermittent operating problems. The common ground that ebp mentions above were left off.
One setup in a wire mill gave a lot of problems as when big motors started, the ground reference of individual controllers would bounce way beyond the common mode tolerance of the drivers so the network would hang.
Opto isolating I/O and the power supply commons helps but a common ground, and the twisted pair cable shield can be used, solved the problems.
A series resistor can be added to the shield common connection to limit current flow if you like. Sometimes, getting RS485 networks running well can seem like black magic ;)
That is one reason I like the MornSun modules mentioned earlier.
http://www.mornsun-power.com/html/product/RS-485-Transceiver-Module.html
 

Papabravo

Joined Feb 24, 2006
22,082
At a cable length of 1km, I don't think reflections will be much of a problem at 9600 baud. It is more likely that your signal will be degraded due to IR loss over that distance, and distortion due to the large distributed capacitance of such a long cable. The relatively low impedance of the termination resistors will help to keep the cable from acquiring a DC charge. Using data from a UART you will have runs of 0's and 1's of sufficient length that the cable will develop a DC charge and distort the edges.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Thanks guys, I think I can understand it a lot better now than before asking my question.

So a unit load is limited by the driving ability of a RS485 transeiver right? So I must stick to the limit of maximum load of datasheet.

And if I want to achieve 1km, parallel terminated at both end, in a commercial environment, is 9600bps practical?? Or can I go faster/slower??

Any links that I should be reading about RS485?
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Years ago, when we were new at RS485, we did some RS485 installations that were "2 wire" like in some documentation.
They had very intermittent operating problems. The common ground that ebp mentions above were left off.
One setup in a wire mill gave a lot of problems as when big motors started, the ground reference of individual controllers would bounce way beyond the common mode tolerance of the drivers so the network would hang.
Opto isolating I/O and the power supply commons helps but a common ground, and the twisted pair cable shield can be used, solved the problems.
A series resistor can be added to the shield common connection to limit current flow if you like. Sometimes, getting RS485 networks running well can seem like black magic ;)
That is one reason I like the MornSun modules mentioned earlier.
http://www.mornsun-power.com/html/product/RS-485-Transceiver-Module.html
I will properly need an integrated solution. a modules is properly too big too expensive for our application.
 

Papabravo

Joined Feb 24, 2006
22,082
Thanks guys, I think I can understand it a lot better now than before asking my question.

So a unit load is limited by the driving ability of a RS485 transeiver right? So I must stick to the limit of maximum load of datasheet.

And if I want to achieve 1km, parallel terminated at both end, in a commercial environment, is 9600bps practical?? Or can I go faster/slower??

Any links that I should be reading about RS485?
Before you try testing on the actual cable system in the field you might want to put a kilometer of cable on the lab bench and try it out before you go into the field. You can compare waveforms on a scope at both the transmitting end and the receiving end. This is a bit tougher to do in the field.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
At a cable length of 1km, I don't think reflections will be much of a problem at 9600 baud. It is more likely that your signal will be degraded due to IR loss over that distance, and distortion due to the large distributed capacitance of such a long cable. The relatively low impedance of the termination resistors will help to keep the cable from acquiring a DC charge. Using data from a UART you will have runs of 0's and 1's of sufficient length that the cable will develop a DC charge and distort the edges.
How do I work out at what point my data-rate will have a reflections problem? Assuming 1km, and I want to use maximum data-rate is allowed, but it must be reliable.

You mentioned the relatively low impedance of termination resistors, the RS 485 specs use a 120ohm resistor, were you referring to this? Or do I need to use a lower resister than 120ohm?
 

ebp

Joined Feb 8, 2018
2,332
If your transmission line is improperly terminated and/or not maintained as a proper constant-impedance path it is difficult to predict performance. If you are in a situation where you must allow reflections to "settle" you are going to have problems with multi-drop. What the signals look like at the ends of the cable will be very different from what they look like along the cable as forward and reverse signals reinforce or cancel each other.

The termination must match the transmission line. If you use a transmission line with a characteristic impedance of 120 ohms, then you must terminate it in 120 ohms. If you use 100 ohm cable, then it must be terminated in 100 ohms. Cable sold specifically for RS-485 will normally be have 120 ohm characteristic impedance and also be designed for low loss and be fairly expensive. It is probably the best choice for long runs, but completely unnecessary for short runs where an inexpensive cable such as Cat-5 communications cable will do very well but is 100 ohms nominal impedance.

"As a rule of thumb, the data signaling rate (in bps) multiplied by the cable length (in meters) should not exceed [10^8]. For example, a system with a cable measuring 500 m should not transmit data at speeds greater than 200 kbps."

from RS-422 and RS-485 Standards Overview and System Configurations
http://www.ti.com/lit/an/slla070d/slla070d.pdf

Browse the TI site for other useful docs. Maxim also has quite a good range of transceivers & ap notes. e.g. at Maxim
https://www.maximintegrated.com/en/app-notes/index.mvp/id/3884
 

dendad

Joined Feb 20, 2016
4,637
Before you try testing on the actual cable system in the field you might want to put a kilometer of cable on the lab bench and try it out before you go into the field. You can compare waveforms on a scope at both the transmitting end and the receiving end. This is a bit tougher to do in the field.
While not ideal, I used a 330M box of CAT5 cable, putting the pairs in series, to give +1.2KM test cable.
Also, I tried injecting noise into one pair for interference testing.
With this setup, you can play around with mismatching to see how it alters the max data rate.
Although it would be better to use the cable intended for the final installation.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
While not ideal, I used a 330M box of CAT5 cable, putting the pairs in series, to give +1.2KM test cable.
Also, I tried injecting noise into one pair for interference testing.
With this setup, you can play around with mismatching to see how it alters the max data rate.
Although it would be better to use the cable intended for the final installation.
How do you inject noise into your cable? I am interested.
 

dendad

Joined Feb 20, 2016
4,637
How do you inject noise into your cable? I am interested.
Various tests can be tried.
A relay "buzzing" on the cable, clacking a contactor or PWM a DC motor or just have another network running for less invasive testing.
In a number of our installations we have had trouble with motor VFDs interfering. Usually we have not had a say in how the cables have been run (we were just industrial control board designers and suppliers) and often the data cables have been run in the same tray as the motor drives.
 

Papabravo

Joined Feb 24, 2006
22,082
How do I work out at what point my data-rate will have a reflections problem? Assuming 1km, and I want to use maximum data-rate is allowed, but it must be reliable.

You mentioned the relatively low impedance of termination resistors, the RS 485 specs use a 120ohm resistor, were you referring to this? Or do I need to use a lower resister than 120ohm?
120 ohms is a typical characteristic impedance for twisted pair. When you research a cable you actually measure the 'actual' characteristic impedance of several samples. In order to advise you on cable length and datarate I need to know what is producing and consuming the data. At the moment it sounds like a standard UART. You also need to specify an allowable bit error rate. Once you do that you can actually verify that your choices meet or exceed the desired bit error rate.

As you shorten the cable down to a few feet (for testing) from 1 km, imagine that the two 120 ohm terminators start to look like the parallel combination, or 60 ohms. Thus on short cables for testing of protocols and such you should use one resistor of 60 ohms in place of two 120 ohm resistors separated by two or three feet.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
120 ohms is a typical characteristic impedance for twisted pair. When you research a cable you actually measure the 'actual' characteristic impedance of several samples. In order to advise you on cable length and datarate I need to know what is producing and consuming the data. At the moment it sounds like a standard UART. You also need to specify an allowable bit error rate. Once you do that you can actually verify that your choices meet or exceed the desired bit error rate.
Yes, it's a standrad UART, multi-master/node over RS485 configuration. Information is sent/received in a packet. I haven't look into the protocol layer yet, as I need to understand the physical layer first.

Without doing any research, here is what I think I need:
  • listen before talk, bus need to be idle for at least x time before a node speak. The time can be calculate by max cable length and prorogation speed?
  • an ACK packet is required.
  • some kind of back off strategy is no ACK packet received
  • all packet will have unique serial number, in case multiple copy of the same packet is received
  • all packet will have CRC16
  • anything else?
Thought? Or is there a better way to do these? Is there an standard protocol already designed by someone else already?
 
Top