RS-485 (Non-Isolated vs Isolated and Gnd vs No Gnd)

Discussion in 'Embedded Systems and Microcontrollers' started by signalflow, Jun 15, 2016.

  1. signalflow

    Thread Starter Member

    Mar 12, 2014
    50
    0
    I am trying to design in RS-485 communication to my boards so they can talk to each other and other boards. The boards are used in an industrial environment.

    As I understand it, the RS-485 ICs only require A and B wires and do not require a GND to be run between the 2 boards to communicate as long as the common mode voltage doesn't exceed -7V or +12V. That's good because I am very wary of sending my digital control ground out into the wild to pick up noise. I have noticed other controllers using these non-isolated RS-485 transceivers such as MAX485, LT491, etc. so it seems like they are OK to use. However, I'm scared that the industrial environment will put noise on the lines that will be brought back to the board and couple either to adjacent traces of A and B or through the chip to the TX/RX/DE/!RE lines back to the processor (Microchip PIC). I have had SO many problems with noise from pumps/motors coupling onto my little 6" ribbon cables that I have used for connecting 2 boards together with SPI comms. But the MAX485, LT491, etc. look so much easier and smaller than using the isolated RS-485 chips such as MAX14946 and ADM2582. I would have just thought in an industrial setting the isolated ones are the only option, but I am surprised to see how many industrial control boards communicate via the non-isolated ones. Is it just that the differential signaling blocks so much of the noise from getting to the other lines on the board that it is OK in an industrial setting?

    Thanks.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    I have always used a ground link between systems in industrial settings, the nature of the A-B signal itself has noise cancelling characteristics built in.
    I can never remember any problems, but I have also been in favour of making supply commons connected rather than isolated.
    Many of these RS485 runs were several metres long.
    BTW, there is also shielded ribbon cable available.
    Max.
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    You can only depend on the common mode range if you have a way of controllong it. If you don't know what it is, then how can you infer a method of control? The best way is a common ground -- what a surprise!
     
  4. Picbuster

    Member

    Dec 2, 2013
    374
    50
    It is difficult to give specific answer as I do not know the exact configuration however;
    I used rs485 over 400 meter in a factory( heavy metal work) no problems. (high quality cable twisted pair and shielded runs at 38.4 Kb, 56Kb will work also)
    I used signal GND to avoid a signal lift-up against GND.
    The signal GND is NOT connected to the electrical mass earth connection of the main (building) power.
     
  5. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    There is also the question of peripherals (sensors, or whatever these boxes do) located on the machines themselves. Those would have to be set up so their cables don't pick up noise that gets coupled into the data network. I'd feel uncomfortable without an explicit ground connection between units, to ensure that the common-mode limits weren't exceeded. Maybe use cable with 2 twisted pairs in a shield, and use one pair for a solid ground. I would earth it (to power-line ground) but only at one point. It might not do any harm to have the whole setup at a floating voltage, but I don't like it.

    RS-485 operating over shielded twisted pair is the general standard for noisy environments, but sometimes it's not enough. I've heard of optical fiber networks as the ultimate in noise rejection, but I've never had an excuse to build one.
     
  6. signalflow

    Thread Starter Member

    Mar 12, 2014
    50
    0
    So you used a non-isolated transceiver such as MAX481, LT491, etc. and used your board's signal GND to run on the cable? That sounds good. I was just afraid that running the signal ground that far would make the ground bounce and cause problems on the other chips on board since most run on 5V or 3.3 to Gnd (signal gnd). I have just had major problems running my SPI signals and GND over a short little 6" ribbon cable between 2 boards.
     
  7. signalflow

    Thread Starter Member

    Mar 12, 2014
    50
    0
    My main concern is should I try the non-isolated RS-485 chips such as MAX485 or LT491 or use the isolated ones such as MAX14946. I spent so much time getting my control board to not be susceptible to noise and now that I am adding RS-485 to the board, I am scared of sending my clean signal gnd out into the wild. And I'm also scared noise will get through the RS-485 IC (A and B lines to the TX/RX/!RE/DE lines) and back to the microcontroller. I have just had so many problems with sending SPI signals over a short 6" ribbon cable (motors/pumps turning on create errors). But it appears that some people have used the non-isolated ICs successfully in an industrial environment. I'm just very surprised it works based on my 6" ribbon cable problems.
     
  8. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    My applications have typically been 5v differential encoders using RS485 in CNC/Mechatronics applications in typically very noisy environment, cable troughs etc for typical distances of 30ft to 60ft.
    Max.
     
    cmartinez likes this.
  9. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,574
    2,543
    Right now I'm trying to solve a problem with the exact configuration you've just described. I'm getting strange results from a 5V encoder at a distance of about 10ft away from the controller. I'll scope it today and then decide on a course of action.
     
  10. signalflow

    Thread Starter Member

    Mar 12, 2014
    50
    0
    And you use the regular non-isolated transceivers such as MAX485, LT491, etc.?
     
  11. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    Yes, usually MAX485.
    Max.
     
  12. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    I also use a multi driver such as AM26C31 as I do not use multi-drop in these applications.
    Max.
     
  13. Picbuster

    Member

    Dec 2, 2013
    374
    50
    This could be a termination problem put a 120Ohm resistor between signal + and signal - as you should do with long cables 100mtr to Km++
    Very short range for rs485 ( less then 200ft) could result in all types of funny things.
    Picbuster
     
  14. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    What is the cable that connects these encoders back to the reader? It should be shielded, with A+ and A-, likewise B+ and B-, as twisted pairs. Also, is this the output right from the encoder that's being transmitted? If so, it might not be a very powerful driver, and for a moderate distance in a noisy environment a buffer on each line would help.
     
  15. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    Is this differential encoder?
    What is the nature of equip. on the TX and RX ends?
    Max.
     
  16. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,574
    2,543
    Thank you, Max. But I've already found what the problem is and now I'm working on fixing it.

    I am not using a differential encoder, but rather an optical one that I've already used in the past and I'm very happy with its performance. I was thinking about translating its output to differential by using an RS485 chip, like you've suggested in the past, but 10 ft is just not long enough to justify it, I think. I'm sending my encoder's 5V output signal through shielded wire, and everything seems to be working just fine.

    This is the way I wired and interfaced the encoder to the MCU:

    Capture.JPG

    The culprit was the step motor itself that I've been using. This motor uses closed loop technology whose driver momentarily increases its output current to keep up during motion and avoid missing steps due to overload. What was happening was that the motor was lagging behind the pulse train being sent to it, so that when my MCU finished counting the number of steps reported by the encoder, and decelerated to a stop, the step driver still had missing steps that were buffered in its controller, and forced the motor to complete them, effectively overshooting the target position. My MCU didn't realize this was happening because the program I wrote stopped counting encoder steps when the target position was reached.

    So the cure for this is only going to cost me $800.00 dlls, because I had to buy a more powerful driver-motor package. I was forced into doing that because the previous motor-driver was stalling so often that sometimes the driver would just stop and report a motion error due to overload. In the meantime, I'm going to re-write my firmware to make sure that the encoder is being monitored at all times, and not just when executing motion.

    Thanks for your help, btw. It's always appreciated.
     
  17. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    BTW, because my installations were for industrial customers, I did not like taking chances on cable, so I was introduced to Belden 9891 some years ago and have used this ever since it is quite pricey in short lengths, I used to pick up a 100m roll at a time.
    It has individually shielded pairs with an overall braid shield and one pair is one gauge higher for the supply.
    https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwi567LzvLLNAhVn9IMKHSiJCPwQFggsMAA&url=http://www.belden.com/techdatas/english/9891.pdf&usg=AFQjCNGX_gBEesCSQJMM-HSr73WeAW5XeQ&sig2=2Tp6bHdqRs0RxQNpz3hG7Q&cad=rja
    An optical encoder can be differential, or vice-versa but usually includes the RS420/485 driver.
    Max.
     
    cmartinez likes this.
Loading...