Page 1 of 1

Limit of RS485 devices

Posted: 16 Nov 2010, 19:45
by mattallen37
Why is there a limit to the number of devices on an RS485 bus? I have heard that it is like 8 or so NXTs, but I also saw that the limit is 30 (not about anything specifically, just RS485). What is the limiting factor? Electrical strength? Practicality? Noise? Protocol/Software?

Re: Limit of RS485 devices

Posted: 17 Nov 2010, 07:07
by mightor
Some transceivers only support 8 devices. Perhaps the more expensive ones support more devices. I've seen a few NXP transceivers that only support that many, none that support more.

- Xander

Re: Limit of RS485 devices

Posted: 17 Nov 2010, 19:01
by mattallen37
What do you mean by "support"? Do you mean it keeps an open communication between all devices? It sure doesn't seem to. Based on what I have noticed, it seems that the NXT's 485 chip just sends and receives bytes, that can represent anything. Any addressing is done a user code level, and I don't think there is any ongoing background checkups. What is the limiting factor(s)?

Re: Limit of RS485 devices

Posted: 17 Nov 2010, 20:30
by ronmcrae
mattallen37 wrote:What do you mean by "support"? Do you mean it keeps an open communication between all devices? It sure doesn't seem to. Based on what I have noticed, it seems that the NXT's 485 chip just sends and receives bytes, that can represent anything. Any addressing is done a user code level, and I don't think there is any ongoing background checkups. What is the limiting factor(s)?
RS485 defines the physical transmission method (timing, waveform, voltage etc.). The actual interpretation of the 1's and 0's that go along the wires is determined by the protocol used by the attached devices.

RS485 is widely used to link industrial devices because it works well at reasonable speeds over long cable runs. The products with which I work on a daily basis mostly all use RS485. An overall limit of 30 devices on an RS485 network seems about right from what I've read over the years but, as Xander says, it depends largely on the driver IC's that are used. Some years ago we started having issues with larger networks and it turned out that our PCB manufacturer had substituted an alternate 485 driver IC with a lower spec. Since that time we've always gone with MAX483 and never have had issues with 20+ devices on some fairly long cable runs. I don't know what driver IC is used in the NXT but up to 8 devices shouldn't be an issue unless cable lengths get somewhat long then it might be more problematic.

Device addressing is a key component of any RS485 network. Being 2-wire (** Philo recommends 3 wires are used, one being a ground) all comms are half-duplex meaning that only one device can be actively talking at one time. Usually these networks are Master-Slave, with the master sending a poll message to a slave. The corresponding slave sees its address within the message, sends its response, and frees up the line.

Ron.

Re: Limit of RS485 devices

Posted: 17 Nov 2010, 21:42
by nxtreme
It looks as if Lego used the ST485C driver in the NXT (thanks to Jürgen Stuber for internal pictures). A quick look at the datasheet suggested that you can connect up to 64 transceivers this chip.

In case you want to connect something like an Arduino or a FTDI chip to the NXT, the ST485CN can be had on Digikey for less than $2 US. I might add it to the list of options in my other post...

-EDIT- I forgot to mention that the 485 driver is located on the bottom left hand side of the board, rather logical as it is right next to port four :).

Re: Limit of RS485 devices

Posted: 17 Nov 2010, 22:16
by mattallen37
Thanks to both of you for your information, but I am still curious to know what the limiting factor is.

BTW nxtreme, I think you mean the bottom RIGHT of the PCB, not left. Also, that picture has been my desktop background for months, an awesome picture.

Re: Limit of RS485 devices

Posted: 18 Nov 2010, 05:37
by nxtreme
As Anton Ego would say, "Perspective" (in a deep, dark voice). It's on the bottom left in the picture, bottom right on the NXT. So, it goes either way. Lets just say we're both right :). At least eight NXTs would be quite a few, any more and you'd have to get government funding. Although it'd be fun to get 64 NXTs all talking on the same line... I wonder what they would talk about... I know, the worlds largest supercomputer made of Lego! Set them to work solving pi to the five trillionth digit or something.