2
\$\begingroup\$

This is a follow-up to SN65176 RS485 contention .

I have solved the contention issue by waiting for at least 26us after the stop bit of a PC-connected XS201A RS485 driver before transmitting from the SN65176. However, avoiding contention is not enough.

Initially, my PIC-side termination network consisted of a single differential 100ohm terminator:

schematic

simulate this circuit – Schematic created using CircuitLab

As soon as the XS201A is done transmitting, the differential voltage returns to an average value. However, this average value is not 0V differential as I would expect. Instead, the driver is strongly pulling the line halfway to the mark state. In the process, it thinks that that means a start bit and issues a "0" byte (or a corrupt partial byte from the PIC side, if it starts transmitting soon after).

driver to idle state

I then made a bias network to mimic the "space" (opposite of mark) state, such that:

  • the differential impedance is still 100ohm
  • the differential voltage is biased to 500mV
  • the bottom line is biased to 1.5V

schematic

simulate this circuit

Adding this bias network made it such that over a few thousand bytes, my error rate is now about 0.4% (down from 100%). However, even with this improvement, there is no visible change in the idle-state voltages - the XS201A is essentially overriding my bias network and reversing the polarity of the middle resistor.

My questions are:

  • Why does the XS201A not enter a high-impedance state when idle?
  • Why does the XS201A have a strongly-maintained non-zero differential voltage when idle?
  • Is there anything wrong with my new bias network?
  • Should I not expect to be able to have a simple termination resistor instead of a bias network, especially since the XS201A claims to have a failsafe bias network built in?
\$\endgroup\$
5
  • \$\begingroup\$ 500mV is not enough bias for some receivers. \$\endgroup\$ Commented Jul 15, 2016 at 2:28
  • \$\begingroup\$ an idle line should look like mark, not space. \$\endgroup\$ Commented Jul 15, 2016 at 2:33
  • \$\begingroup\$ When the idle line is allowed to go mark, the XS201A basically sends itself a '0'-byte. \$\endgroup\$
    – Reinderien
    Commented Jul 15, 2016 at 2:35
  • \$\begingroup\$ Bias resitros R1 and R3 should be the same, like 680ohm. Also the terminating, 120ohm \$\endgroup\$ Commented Jul 15, 2016 at 6:11
  • \$\begingroup\$ No, it shouldn't be terminated with 120ohm, because it's 100ohm cable. \$\endgroup\$
    – Reinderien
    Commented Jul 15, 2016 at 13:53

3 Answers 3

2
\$\begingroup\$

RS-485 has a defined differential voltage at both mark and space. The idle state is when voltage V_diff is -0.2V < V_diff < 0.2V; this is done by putting the transmitter in a Hi-Z state, usually by controlling the RTS signal from the UART. RTS is then used to turn on/off the transmitter, from Hi-Z to the defined voltage level for mark/space.

\$\endgroup\$
1
  • \$\begingroup\$ If that's the case, then this adapter is not to spec, because it does not put Vdiff that low during idle. I will try again with RTS, though. \$\endgroup\$
    – Reinderien
    Commented Jul 15, 2016 at 13:55
1
\$\begingroup\$

Old question, but...

There is such a thing as failsafe biasing, where the lines are lightly held in one of only two valid states the twisted pair should be in.

If this is happening in your XS201A it could mean that it is, in fact, functioning as intended. The unexpected voltages could be explained by a hacky dc-dc conversion, like they did for the old PIC/AVR programmers. If that's a problem, I'd recommend getting a proper self powered adapter.

For a more in-depth explanation of failsafe biasing on RS485, observe this Ti application note.

\$\endgroup\$
0
\$\begingroup\$

To work around these issues, I ended up abandoning the XS201A altogether. It doesn't have proper hardware signalling, and its bias characteristics were problematic.

\$\endgroup\$

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.