Maker Pro
Maker Pro

RS485 fail-safe resistors - necessary?

S

simon

Jan 1, 1970
0
A little while back I asked a couple of questions on this newsgroup
regarding RS485. I received lots of helpful info. Having read literature
on this subject I was wondering about the necessity of additional
fail-safe resistors at one end of the network to ensure the bus is in a
known state when idle. Anyone here have experience of this and are the
additional components an absolute must? There seems to be some
difference of opinion about this requirement in documents I have read.

Cheers,
Simon.
 
F

Fred Bloggs

Jan 1, 1970
0
simon said:
A little while back I asked a couple of questions on this newsgroup
regarding RS485. I received lots of helpful info. Having read literature
on this subject I was wondering about the necessity of additional
fail-safe resistors at one end of the network to ensure the bus is in a
known state when idle. Anyone here have experience of this and are the
additional components an absolute must? There seems to be some
difference of opinion about this requirement in documents I have read.

Cheers,
Simon.

Fail-safe is a big enough issue that many of the transceiver
manufacturers provide it by design- such as the Maxim MAX3471. Fail safe
operation is achieved by using unipolar input differential thresholds.
 
S

simon

Jan 1, 1970
0
Fred Bloggs said:
Fail-safe is a big enough issue that many of the transceiver
manufacturers provide it by design- such as the Maxim MAX3471. Fail
safe operation is achieved by using unipolar input differential
thresholds.

That's a good enough reason for me.
Thanks,
Simon.
 
F

Frank Bemelman

Jan 1, 1970
0
simon said:
A little while back I asked a couple of questions on this newsgroup
regarding RS485. I received lots of helpful info. Having read literature
on this subject I was wondering about the necessity of additional
fail-safe resistors at one end of the network to ensure the bus is in a
known state when idle. Anyone here have experience of this and are the
additional components an absolute must? There seems to be some
difference of opinion about this requirement in documents I have read.

The uart may miss the first character if the lines are in the wrong state,
when idle. Which can be a nuisance. Better to add a few resistors.
 
S

simon

Jan 1, 1970
0
Frank Bemelman said:
The uart may miss the first character if the lines are in the wrong state,
when idle. Which can be a nuisance. Better to add a few resistors.
Thanks Frank.
Simon.
 
V

Valentin Tihomirov

Jan 1, 1970
0
Be accurate reading specs. Fail-safety is a feature of devices that is
specified. There are two types of it:
- open input (requires pulling resistors when termination used)
- shorted input
- terminated (a special case of shorted inputs)

The latest part from Maxim are the safest and cheapest. I have failed once
reading that device has fail-safe input and missing that this refers to open
inputs only.
 
V

Valentin Tihomirov

Jan 1, 1970
0
Some parts has output '1' when difference at input is too low. You should
choose baising resistors to provide enaught difference. There are good App
Notes from several comparnies that consider vaues of termination and baising
resistors.
 
S

Spehro Pefhany

Jan 1, 1970
0
Be accurate reading specs. Fail-safety is a feature of devices that is
specified. There are two types of it:
- open input (requires pulling resistors when termination used)
- shorted input
- terminated (a special case of shorted inputs)

The latest part from Maxim are the safest and cheapest. I have failed once
reading that device has fail-safe input and missing that this refers to open
inputs only.

Good point. Note that "open input" is also the state on a multidrop
bus when all the transmitters are tristated, so it's not even
necessarily a "failure" state, as Frank Bemelman pointed out.

Aside from the above consideration, it's really a system issue, so
it's difficult to accurately generalize...

Best regards,
Spehro Pefhany
 
R

Roger Hamlett

Jan 1, 1970
0
Frank Bemelman said:
The uart may miss the first character if the lines are in the wrong state,
when idle. Which can be a nuisance. Better to add a few resistors.
Dead right.
Funnily enough, I came across this, a few years ago when a guy in a large
electronics company 'lab', who was working on a low frequency signalling
system, to be installed on the UK motorways, rang me up, and asked if I
could help. They had been working on a prototype for months, and could not
understand why they were sometimes loosing the first character on a
transmision. I pointed out, that unless you knew the 'idle' state, you had
no way of ensuring that the receiver would see this character. I proposed
two solutions:
1) Add a 'header'. Send a couple of dummy characters, preferably with a nice
easy to identify pattern, followed by a short pause, and then the real data
(something like '0xAAAA').
2) Bias the line to a known state.
The latter is in a sense a much 'nicer' solution, but does (of course), add
the extra resistors. Remember that you want the total impedance to provide
the line 'match'. On the system we ended up using 150 ohm between the lines,
a 1.2K to +5v from one line, and a 1.2K to 0v on the other. This gave the
required 120 ohm termination, and ensures the required bias.
Some of the standard RS485 receivers, exhibit significant hysteresis, and if
the line allways 'ends' a transmission at the idle state, will often not
switch, making the need apparently less. However relying on this is a
mistake...
Ideally, I'd use both approaches. Put a small bias on the line, but send one
'sacrificial' character in front of the main data, with a one character
'gap'. Then ensure that the following packet has a good checksum, and a
method of data recovery if the checksum does not match, and you have the
basis of a reliable system.
There are now some software controllable line terminators on the market for
this sort of bus. These do implement bias.

Best Wishes
 
F

Frank Bemelman

Jan 1, 1970
0
Roger Hamlett said:
Dead right.
Funnily enough, I came across this, a few years ago when a guy in a large
electronics company 'lab', who was working on a low frequency signalling
system, to be installed on the UK motorways, rang me up, and asked if I
could help. They had been working on a prototype for months, and could not
understand why they were sometimes loosing the first character on a
transmision. I pointed out, that unless you knew the 'idle' state, you had
no way of ensuring that the receiver would see this character. I proposed
two solutions:
1) Add a 'header'. Send a couple of dummy characters, preferably with a nice
easy to identify pattern, followed by a short pause, and then the real data
(something like '0xAAAA').
2) Bias the line to a known state.
The latter is in a sense a much 'nicer' solution, but does (of course), add
the extra resistors. Remember that you want the total impedance to provide
the line 'match'. On the system we ended up using 150 ohm between the lines,
a 1.2K to +5v from one line, and a 1.2K to 0v on the other. This gave the
required 120 ohm termination, and ensures the required bias.
Some of the standard RS485 receivers, exhibit significant hysteresis, and if
the line allways 'ends' a transmission at the idle state, will often not
switch, making the need apparently less. However relying on this is a
mistake...
Ideally, I'd use both approaches. Put a small bias on the line, but send one
'sacrificial' character in front of the main data, with a one character
'gap'. Then ensure that the following packet has a good checksum, and a
method of data recovery if the checksum does not match, and you have the
basis of a reliable system.

Indeed, the protocol often (if not always) needs to have checksums as
a minimum requirement, preferably with some retry mechanisms in a higher
layer, depending on the application of course. I don't see a need for
a gap, but okay.
There are now some software controllable line terminators on the market for
this sort of bus. These do implement bias.

Do you have any partnumbers at hand?
 
R

Roger Hamlett

Jan 1, 1970
0
Frank Bemelman said:
in and

Indeed, the protocol often (if not always) needs to have checksums as
a minimum requirement, preferably with some retry mechanisms in a higher
layer, depending on the application of course. I don't see a need for
a gap, but okay.
Remember that the UART, will start receiving on the first active edge. If
you send a character, and the UART misses the start bit edge, it'll now
start receiving on the second edge in the character (hence patterns like
0xAA, or 0x55, are good 'start' characters, since they have lots of active
edges). The UART, then won't finish receiving the character, till a minimum
of two 'bit times' after the correct end of the character. If the second
character immediately follows the first, with only one stop bit, it too will
potentially be corrupted, and re-synchronisation will depend on the bit
patterns being sent. You can ensure quick re-synchonisation, by careful
choice of the bit pattern used (there are some character patterns, that
inherently if sampling starts in the wrong place, result in re-alignment
after only a couple of characters - if the 'start' is a low - normal signal
encoding, and is then immediately followed by a '1', and another '0' (0B1010
in the MS nibble), this ensures that the sampling should begin just two bit
times in error, if two 'stop bits' are then used, the system should recover
immediately - using one stop bit, introduces the requirement, to either send
a second character or a short pause - or both).
Do you have any partnumbers at hand?
The ones I have used, were supplied directly by Rockwell, as part of a
board. I didn't make any note of the numbers I'm afraid.

Best Wishes
 
F

Frank Bemelman

Jan 1, 1970
0
Remember that the UART, will start receiving on the first active edge. If
you send a character, and the UART misses the start bit edge, it'll now
start receiving on the second edge in the character (hence patterns like

[snip]

Ah, that's right, thanks!
 
T

Tony Roe

Jan 1, 1970
0
Be accurate reading specs. Fail-safety is a feature of devices that is
specified. There are two types of it:
- open input (requires pulling resistors when termination used)
- shorted input
- terminated (a special case of shorted inputs)

The latest part from Maxim are the safest and cheapest. I have failed once
reading that device has fail-safe input and missing that this refers to open
inputs only.

That's true, but it certainly wasn't always so. We routinely used Linear
Technology parts with no problems at all with no network bias resistors, then
once in a crisis we bought Maxim - none of them worked. Threw out all the Maxim
parts (our products need to be able to be retro-fitted to older networks), but
added bias resistors to the network so it wouldn't matter for new installations.
Now Maxim makes a big deal out of what the opposition was doing all along. But I
guess it's good that at least they've finally learned.

Regards,
Tony (remove "_" from email address to reply)
 
R

Robbie Banks

Jan 1, 1970
0
Does this mean that the MAX483 has bias resistors?

I was looking at using a couple of these devices but noticed in the
datasheet they were talking about Rt at the twisted pair output. Should you
have a resistor between the two ports for when there is no cable present?

Robbie
 
S

Spehro Pefhany

Jan 1, 1970
0
Does this mean that the MAX483 has bias resistors?

No, it means that the receiver input threshold voltages are biased
such that the output state is known with zero input voltage. Bias
resistors do something a bit different.
I was looking at using a couple of these devices but noticed in the
datasheet they were talking about Rt at the twisted pair output. Should you
have a resistor between the two ports for when there is no cable present?

It doesn't much matter if there is no cable present, but there would
be two resistors (one for each end of the zero-length cable), or one
60R resistor. The transmitter power consumption would be less with no
resistor(s).

Best regards,
Spehro Pefhany
 
Top