Electronic – RS485 Pull-up, Pull-down and EOL resistors

pulldownpulluprs485

I am going to connect several micro-controllers together using half-duplex RS485, but there is no absolute master or slave, each micro must be able to communicate others and this will cause problems if both of them want to send data at the same time (one makes A high and B low and the other makes A Low and B high, that will cause short circuit) so I am thinking of adding pull-up and pull-down resistors to the lines and send data by changing state of TxEn pin instead of TxDt pin of RS485 ICs.

Here is my problem:

  • Pull-up, pull-down and EOL resistors form a voltage divider on the
    RS485 data lines, does it make data communication problems?
  • What happens if I ignore EOL resistors and just apply pull-ups and
    pull-downs at both ends?
  • Is there any relation between maximum cable length and resistors value?
  • Does using higher data voltage increases the data transmission reliability? If yes, is there any 12V RS485 ICs? (12V is the absolute maximum ratings of MAX485 and LTC1685, what about safety factor?)

BTW, if I have two 100ohm EOL resistors and 5V data voltage it means that communication consumes 100mA, that is too high for a device that consumes only 5mA, and it makes the devices to have a big voltage regulator and capacitors in comparison with other components!
enter image description here
^^^ A diagram I found in LTC1685 datasheet ^^^

Best Answer

What you're suggesting is not necessarily a bad idea, but it won't work with RS485 drivers. RS485 is impedance matched; that means that the driver can be seen as a perfect driver followed by a resistor, which has approximately the same resistance as the termination resistor (exactly the same in the ideal case). Therefore, if you'd add a pullup strong enough to overcome the termination resistor, the driver would never be able to pull it down far enough. The good news of this is though that two "shorted" RS485 drivers should not cause any damage, because of the "built-in" resistor (it's probably not actually a resistor but some kind of current source; the result is the same).

Even if it would work, you'd lose all the benefits of having an impedance-matched transmission line. You might as well drop the RS485 driver at all then and just use the microcontroller pins with some pullup in the order of 1kOhm. Incidentally, this is exactly what's done in I2C. It sounds to me like that protocol might suit your needs better, if you're not interested in long (>1m or so) communication lines. If you are, you should use the RS485 transceivers as they were intended, or you probably won't get the results you're looking for.

To answer the specific questions:

  • Pull-up, pull-down and EOL resistors form a voltage divider on the RS485 data lines, does it make data communication problems?

    Yes, as explained above.

  • What happens if I ignore EOL resistors and just apply pull-ups and pull-downs at both ends?

    That would "work" if the resistors are large enough to have the drivers overcome them, and small enough to not make communication to slow (see next answer). I put that in quotes because you're losing the impedance-matched property, which means you'll get reflections in the data lines. If you transmit slow enough and/or your cable is short enough this won't be an issue, but then you may as well use something else like I2c.

  • Is there any relation between maximum cable length and resistors value?

    Yes, though it's hard to give numbers without a lot more information. Basically, the parasitic capacitance of the cable forms an RC lowpass filter with the pullup/pulldown resistor. Thus, the lower the resistance gets, the faster it will be, but the more current it will use. The cable capacitance depends on the cable buildup but is linear with its the length, so the longer the cable, the slower it will be.

  • Does using higher data voltage increases the data transmission reliability? If yes, is there any 12V RS485 ICs? (12V is the absolute maximum ratings of MAX485 and LTC1685, what about safety factor?)

    If noise margin is the biggest problem, then yes. For RS485 noise should not be all that significant though because it's differential: as long as you use a twisted pair, noise should couple in similarly for both lines, making it cancel out. I don't know the answer to the followup question, but I don't think that will be a thing: if the voltage is higher, it will also use more current with the same termination resistors, which are standardized.

  • BTW, if I have two 100ohm EOL resistors and 5V data voltage it means that communication consumes 100mA, that is too high for a device that consumes only 5mA, and it makes the devices to have a big voltage regulator and capacitors in comparison with other components!

    Ever wonder why network switches and modems run so hot? Unfortunately, this is the cost of being able to drive long transmission lines properly.