I'm using an SN75176 to drive an RS485 net. If I leave the net disconnected the Rx pin (connected to RO on the SN75176) sees a LOW from the chip and generates an infinity of input bytes.
I'm thinking I need to put a high impedance (~10K) resistor ladder on the inputs (A/B) to the SN75176 to generate a synthetic differential voltage > 0.2V so that without any connection, the chip will deliver a HIGH and the serial input to the Arduino will not create a string of false bytes.
Am I making some other error, or is this the right track? In general, does an RS485 net need to have a differential voltage injected if there are no (or only one) node (a node that is in Rx mode) connected?
How do you drive the RE pin? If left floating or connected to Vcc the RO pin is floating and the MCU will see random input. Pull RO HIGH (by a 10k) to get a defined idle state. The resistor ladder on the RS-485 side must exist exactly once per bus so having it on every node ruins your bus.
How do you drive the RE pin? If left floating or connected to Vcc the RO pin is floating and the MCU will see random input. Pull RO HIGH (by a 10k) to get a defined idle state.
For some reason I assumed that RO was held high if !RE wasn't active (low). I always pull up Rx (pin2) with a 10k resistor when I'm using the straight TTL serial method. Duh.
However, there is another issue. If the A/B inputs are –0.2 V < VID < 0.2 V, the RO output is Unknown. In a token ring network, when the master goes into Rx mode, there can be a significant delay before a remote unit switches to Tx mode, so the network is basically floating with an unknown VID (and probably noisy, too). My intention is to use a 5k/2k/5k ladder and connect the A/B inputs across the 2k resistor, which will provide a VID of +0.8V and will hold the RO ouput to HIGH until the remote unit responds.
Agree about "only one ladder." However, even a couple of them in the network wouldn't (shouldn't) be a factor, since the reflection dampers are on the order of 200 ohms and a 2k should be high enough impedance not to be noticed.
I admit to being a bit puzzled by the lack of any mention of the need to stabilize the network when all nodes are in Rx mode. It appears to me in the literature that many, if not most, RS485 networks are singlex, so if there is bidirectional communication, eg, the master periodically goes into Rx mode, then the resistor ladder should be mandatory.
Agree about "only one ladder." However, even a couple of them in the network wouldn't (shouldn't) be a factor, since the reflection dampers are on the order of 200 ohms and a 2k should be high enough impedance not to be noticed.
If you have 4 of these ladders in your bus the combined resistance is lowered to about 500Ω which get noticeable.
I use termination resistors of 120Ω and biasing resistors (they exist exactly once in the complete bus) of 470Ω, so in the worst case I still have an idle voltage of about 0.3V on the bus.
I admit to being a bit puzzled by the lack of any mention of the need to stabilize the network when all nodes are in Rx mode. It appears to me in the literature that many, if not most, RS485 networks are singlex, so if there is bidirectional communication, eg, the master periodically goes into Rx mode, then the resistor ladder should be mandatory.
I agree that the datasheet should mention this but you find it in many online tutorials about RS-485 bus systems, so the information is available.
I agree that the datasheet should mention this but you find it in many online tutorials about RS-485 bus systems, so the information is available.
That makes me feel better about my own analysis. I looked 4 or 5 RS485 "optimum network connections" kind of pages and didn't see any mention of the need for biasing a network when all drivers are in the Rx state. I'm going to take another look.
I'm going with 200 ohm terminators and a single 2k bias resistor. Plus I've pulled up all my Rx pins on the Arduinos. I think I'm good to go. Thanks.
The issue of receives getting an undefined level has been with RS485 for a long time. For reference look for "fail-safe biasing with RS485". For example:
It is a way to make sure all receivers see the same logic level even when none of the transmitters are enabled.
The termination resistor is used for impedance matching of the cable you are using. If you have a twisted pair with 200 Ohm impedance then that is the value to use at each end of the pair. I use CAT5 pairs, and CAT5 is 100 Ohm, so I put that at the ends. I do not put any termination where I open up the pair and connect to it (e.g. in the daisy-chain).
thanks, Ron. I'm using 18-ga 2-pair twisted alarm wiring. No clue about its characteristic impedance, but not too concerned that it's far from 200 ohms.
I have found another concern, however. I took a close look at the RS485 modules I grabbed from Amazon and the A/B lines have a 120 ohm resistor across them. I'm using 8 of these in my network and I'm thinking I need to remove all of these resistors except on the two modules at the ends of the network.
remove all of these resistors except on the two modules at the ends of the network
Correct.
A word of warning, if two transmitters enable at the same time that can lead to a lot of problems including self-destructing. The best transceivers will have a transmitter that drives the pair with a current source, they can even handle a short circuit, but not multiple enabled transmitters. It is something to keep in mind.
A word of warning, if two transmitters enable at the same time that can lead to a lot of problems including self-destructing.
Thanks. I'm doing my best to thoroughly test the token ring logic to make sure only one node is in Tx mode at a time (the master asks each unit in turn for its data packet and checks on getting the token back). There's no protection against a remote unit wandering off the reservation, but it they should get lost in the logic but are still functional, they automatically revert to Rx mode after 200 msec.