0
\$\begingroup\$

I've designed some ATMEGA328p based nodes using MAX485, this is the base schematic:

sch

The only difference from the schematic is that the A-B biasing resistors (R13-R12) value is 680ohm and the R12 is applied manually on the master and the last node.

I've produced 15 pcb's in order to test them, I'm connecting them in daisy chain using Belden 7200A Cable, they runs at 9600baud, each node is connected using 30m of cable, addressed by unique slave id in firmware and is powered using external 12Vdc power supply (every pcb uses LM1117S-5.0 in order to regulate 12V to 5V).

I've done some tests...and i'm extremely confused on what is happening...when i run 10 nodes (plus master) everythings works as expected: no errors, no problems at all.

When i connect more nodes, for example 1 more node, nothing works: it seems that the bus stops communicating as expected.

If the node #12 take the the place of node #1/2/5 (removing the respective #1/2/5 node), the node #12 starts to work.

It seems that there is a sort of limitation on how much nodes i can connect to the RS485 bus...is that possible?

Anyway, i've started search for this issue, and i've encountered this forum topic, the author, referring to MAX485, reports this sentence:

You can use up to six MAX485 transceiver modules (so up to five slave devices) per RS-485 bus.

And recommends to use MAX487 in order to be able to connect on same RS485 bus more slave devices and get them working without any issue.

So, at this point my questions are:

  1. Why my bus stops working with 12 slave nodes but works without any issue with 11 slave nodes?
  2. Why the author is talking of a maximum number of five MAX485 slave nodes?
  3. Is the MAX487 a good drop-in replacement over MAX485 in order to connect more slave nodes on the same RS485 bus? (note that i want to connect a maximum of 20/25 nodes on the same RS485 bus)
\$\endgroup\$
7
  • \$\begingroup\$ How many slaves have their R12 fitted? \$\endgroup\$
    – Andy aka
    Commented Sep 30, 2021 at 10:10
  • \$\begingroup\$ Only the end node and the master, also tried to put R12 on only the end node. \$\endgroup\$
    – VirtApp
    Commented Sep 30, 2021 at 10:10
  • \$\begingroup\$ Be absolutely clear about this. I don't know where the master sits on the cable. So, how many slave nodes have the R12 fitted? Also.....did you read what the guy on the forum said about 470 ohm resistors? \$\endgroup\$
    – Andy aka
    Commented Sep 30, 2021 at 10:13
  • 2
    \$\begingroup\$ This could likely be answered graphically with an oscillogram of the bus transients with one, ten, and 13 slaves connected. \$\endgroup\$
    – rdtsc
    Commented Sep 30, 2021 at 12:05
  • 2
    \$\begingroup\$ You show a 2-pin connector for your RS-485 bus - are those the only wires connected between all your nodes? If so then that's a problem - RS-485 nodes must share a common ground. RS-485 is not a current-loop - the voltage on both lines is positive with respect to ground, and you need that common ground wire to ensure that you don't end up with a common-mode voltage which violates the spec of the transceivers. \$\endgroup\$
    – brhans
    Commented Sep 30, 2021 at 14:23

2 Answers 2

1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

That would be more correct. You may not bias all nodes with 680 Ohm, only at the both ends, where also the termination resistor is connected. If you want a 120 Ohm characteristics impedance termination, you should calculate the equivalent of all resistors, including the bias resistors.

EDIT:

schematic

simulate this circuit

$$R_T=\dfrac{2R_B\cdot Z_0}{2R_B- Z_0}=\dfrac{2\cdot 680\cdot 120}{2\cdot 680- 120}\approx 132 \Omega$$

\$\endgroup\$
1
\$\begingroup\$

The basic difference between a MAX485 and MAX487 is the driver slew rate. There should be no difference to the number of nodes you can run with either of them. I've done hundreds of installations with MAX485/487 with around 16 nodes over 1km. You need to ensure the 0V is connected between all nodes.

Also your biasing resistors of 680Ohm are way too low. With two nodes the resistance becomes 340Ohms, with 4 nodes 170Ohms and so on. I used 20k in my designs. The MAX485/487 don't really need the bus biasing resistors and I did not need any termination either.

\$\endgroup\$
9
  • \$\begingroup\$ You think that the 680ohm resistors are too low? what they can cause? \$\endgroup\$
    – VirtApp
    Commented Sep 30, 2021 at 10:04
  • \$\begingroup\$ Do you have R11,13 on every node? If you do, then I tried to illustrate the parallel resistors would be way too low. Is 0V connected to each node? \$\endgroup\$
    – Kartman
    Commented Sep 30, 2021 at 11:24
  • \$\begingroup\$ Yes, R11 and R13 are on every node, and yes, the 0v connected to each node. \$\endgroup\$
    – VirtApp
    Commented Sep 30, 2021 at 11:30
  • 1
    \$\begingroup\$ for ten nodes in parallel, the master is having to drive 68Ohms. That is silly. If you are going to use bias resistors, only have one set per bus. \$\endgroup\$
    – Kartman
    Commented Sep 30, 2021 at 11:34
  • 1
    \$\begingroup\$ @VirtApp biasing resistors only on one node on the bus (usually the master). Termination resistors on each end of the bus only & none in the middle (doesn't necessarily have to be the master - particularly if the master is in the middle). \$\endgroup\$
    – brhans
    Commented Sep 30, 2021 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.