8

I have a planned 250 kbit/sec, single-pair, 36-metre RS-485 installation where it is advantageous for wiring purposes if the stub lengths can be a little longer than optimal. There is a single almost-always transmitter and three almost-always receivers. "Almost always" means during normal operation, but during monthly maintenance visits, the receivers will transmit for a few seconds. (It's DMX-512 lighting control with very occasional RDM.) It is controlling underwater lighting for architectural purposes, so the downside consequence of data corruption would be merely aesthetic.

RS-485 is clearly designed to be used with the shortest stub lengths practical. However, it's an engineering question about how the stub length affects signal quality and what to do if other matters require longer stubs.

The following is from Texas Instruments "AN-1057 Ten Ways to Bulletproof RS-485 Interfaces"

Although the discussion of configurations and the section on stubs advises minimizing stub length to avoid transmission-line problems, the application may not permit minimizing stub length. Another approach is to increase the driver's transition time to permit longer stubs without transmission-line effects. If you use the DS36C280, long stubs can branch off the main cable. This arrangement keeps the main cable short, whereas looping the cable back and forth to reach inconveniently located nodes would greatly increase the main cable length. Besides allowing longer stubs, the slower edge rates generate lower emissions. Thus, this transceiver is also useful for applications that severely limit emitted noise.

The cable is custom high-quality unshielded 0.34 mm2 conductor twisted pair (approx 22 AWG) with 1.0 mm2 24 VDC in the same sheath. The installation is about 1 metre under water.

What is the effect of a driver with 10 ns rise time versus one with 1.2 μs rise time?

My understanding is that rise/fall time is limited to 30% of bit time and that various rules-of-thumb put the stub length at the 10% to 25% propagation distance of the rise time. (Using various TI and Maxim application notes.)

Our desired driver is something like that Maxim 3430 which is slew-rate limited suitable for 250 kbit/sec (datasheet), but we might be forced to use equipment with Maxim 3485 (datasheet); alternatively Analog Devices 2582 with 15 ns when we would prefer 2587 with 200-1100 ns (datasheet).

What effect might this have? Should we do something special if we have the "wrong" driver?

My calculations

  • Data rate is 250 kbit/sec
  • Bit time therefore 4 μsec
  • Max rise/fall time therefore 1.2 μsec (30% of bit time)
  • At 0.6 c signal velocity this is 216 m
  • 25 % of that is 54 m

Simplified diagram:

            22m     14 m
    t-T-+--------+-------R-t
        | 6 m    | 6 m
        R        R

 T transmitter, R receiver, t termination, m is metres

Given my total length is 36 m and my stubs are 6 m, I believe this suggests it will work reliably. Am I misguided?

Many thanks for suggestions and advice.

jonathanjo
  • 12,049
  • 3
  • 27
  • 60
  • Why didn't you scope the signal during commissioning to verify signal integrity at the host? How much does the impedance lower in a dielectric medium of 80 vs air of 1? You should have used STP cable to minimize that effect. – Tony Stewart EE75 Mar 07 '19 at 12:25
  • Thanks for comment, I think we're likely to test it out first. Re shielding, following Perrin's article "Art and Science of RS-485" (Circuit Cellar 1999) we decided against: we have many sites with this cable, mostly much bigger (approx 200 m), typically 30 nodes, 500 mm stubs, and the signals look like a textbook. – jonathanjo Mar 07 '19 at 12:37
  • From what I read in Perrin's article. Daisy Chain is best, not Stubs, host common ground to each target is best (but more $), but STP is better (!) and if your rise time is fast , you better have Daisy Chain otherwise it's a mess. – Tony Stewart EE75 Mar 07 '19 at 14:37
  • I would also expect jitter margin reduction from ISI with 30% rise time from group delay distortion with NRZ. – Tony Stewart EE75 Mar 07 '19 at 14:43
  • Everybody agrees that daisy chain is best, everybody agrees that shields reduce noise. My question is about whether slightly longer stubs are actually problematic in this kind of geometry, at these kinds of data rates, and whether the choice of driver is important within the constraints I've outlined. – jonathanjo Mar 07 '19 at 14:47
  • @jonanthanjo The driver rise time cannot exceed 1.2us at 250kbps and no stubs (nada) are allowed at this data rate!! Would you like to see a simulation with 10 ns rise time? – Tony Stewart EE75 Mar 07 '19 at 15:04
  • 1
    1010101 https://i.stack.imgur.com/lMOSu.png – Tony Stewart EE75 Mar 07 '19 at 15:08
  • TI AN-1057 (link in q, sect 6) appears to suggest it's okay for the stub to be at most 25% of the transition time. 1.2us = 216 m, 25% is 54m, calc in q. Is this wrong? Sect 3 says at 10 ns, stub must be less that 150 mm. Why do you say "nada" is allowed? – jonathanjo Mar 07 '19 at 15:19
  • The datasheet stated 128 transceivers on a "single" bus and my Sim looked noisy at the time, so I suspected jitter. But my fault on Simulation and now the 1.2us is better impedance matched and it looks OK with the 1.2uS rise time except maybe the 1st bit edge , so I'll retract that restriction. But without rise time control, its a mess with echo glitches. – Tony Stewart EE75 Mar 07 '19 at 16:12
  • Filtered http://tinyurl.com/y6l9roce 1.2us and non-filtered http://tinyurl.com/yxg5nbvr not so good but can be filtered exernally – Tony Stewart EE75 Mar 07 '19 at 16:20
  • 1
    I have no actual experience on this so take this with a grain of salt, but the RS485 signalling itself is also quite robust against reflections. As long as they aren't strong and long enough to alter the bit state at the middle of the bit interval (when the receiver samples it), even big spikes won't cause actual problems. This is because only the start bit is edge sensitive, and it's preceded by a stop bit delay. An edge sensitive signal (such as some clock pulse) would be much more sensitive to spikes. – jpa Mar 07 '19 at 19:21
  • @SunnyskyguyEE75 thanks for such interesting sims ... I confess I'm looking at the them slowly until I think I understand them. – jonathanjo Mar 08 '19 at 09:35
  • @jonathanjo The OpAMp is ideal to show latency pulse width. THe transmission lines are defined by Zo and t delay with equivalent wavelength given using v/c=66% I believe the wires are ideal (noninductive connections) THe reflections are based on Physics. You can choose any cable 50 or 60 single ended or 100 or 120 differential, but water and mismatch affects CMRR of the cable not shown in sim. but will impact your signal quality You can added stray load capacitance if you think it is relevant (10pF) on Rx. – Tony Stewart EE75 Mar 08 '19 at 17:20

2 Answers2

3

RS485 clearly specifies a network topology without stubs, well except ones few milimeters from connector to the transceiver IC. So it is up to you to decide.

I would like to suggest you to use additional 2x6m = 12m of cable and eliminate the stubs, afterall 250 kbps isn't a slow speed.

Marko Buršič
  • 23,562
  • 2
  • 20
  • 33
  • 3
    250 kbps is a) quite slow and b) what matters more for the signal bandwidth which depends on the rise time of the transmitter. With tr=15ns your allowed stub length will shrink to tens of centimeters. The amount of *additional* cable is only 2x6m=12m BTW. – Manu3l0us Mar 07 '19 at 11:49
  • 1
    @Manu3l0us b) you are correct, I have edited only 12m additional cable is needed. – Marko Buršič Mar 07 '19 at 11:56
  • I don't disagree for a second it would be better electrically to run the extra cable. But this is engineering: my question is about what actually happens if we use the 10 Mbit/s driver instead of the 250 Kbit/s driver. Should we add some other kind of signal conditioning? I amended the question with quote from TI app note re longer stubs. – jonathanjo Mar 07 '19 at 12:40
  • From TI app note you have linked: "Minimizing the stub length minimizes transmission-line problems. For standard transceivers with transition times around 10 ns,stubs should be shorter than 6 in." – Marko Buršič Mar 07 '19 at 13:22
  • 1
    @jonathanjo Anyway, if you are constrained with those 6m stubs, then there might be a solition by altering/adding termination resistors. I have seen this on CAN networks, don't know if can be applied to rs485. – Marko Buršič Mar 07 '19 at 13:35
  • @MarkoBuršič yes indeed of course shortening the stubs minimises the problems *if there are any* ... my question is, again, what actually happens if we use the 10 Mbit/s driver instead of the 250 Kbit/s driver under circumstances like this. We are practically off the bottom of the graph of speed vs distance, and can stand jitter approx 5%, will there really be a problem? – jonathanjo Mar 07 '19 at 13:41
  • http://tinyurl.com/yxg5nbvr What do you think of this 20ns rise time glitches from perfectly matched Zo – Tony Stewart EE75 Mar 07 '19 at 16:25
  • 1
    I agree with Marko. A long time ago my "managers" wanted to hang a 50 foot stub on a 1553 bus. I did a time domain simulation and showed them the ugly consequences. But with a proper termination, reflections from the receiver were greatly reduced. Of course, these bus systems need high impedance receivers, so there may be a price to pay if you hang a load on the bus. – richard1941 Mar 08 '19 at 02:22
3

Classically, if you can HIDE the reflections within the rise and fall times, then you have a robust system, IF you have some hysteresis.

With 4 microseconds SYMBOL (NRZ, at that) time, will you set up the link for 3 microseconds Rise and Fall times? and hysteresis at 25% and at 75% of the full scale swing?

analogsystemsrf
  • 33,703
  • 2
  • 18
  • 46
  • yes if 2x latency is < rise time but if 75% T risetime, ISI can increase from group delay not being so flat but that can be compensated sometimes. – Tony Stewart EE75 Mar 07 '19 at 16:24