RS485: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category: Serial Communications]]
[[Category: Serial Communications]]


Very flexible; I describe only what I am interested in using here.
RS485 is a serial communications protocol that is very flexible; I describe only what I am interested in using here. It can be full duplex, half duplex, bus, point to point...


Half duplex multidrop bus topology with one master controller and up to hundreds of slaves. Master polls slaves.
I am looking for a way to wire up sensors and controllers in my house, and I am doing it with wire. Wireless is great but I find wire to be more reliable. I have already run wire for ethernet and radios and speakers... running wire for RS485 should not be too hard.  


10 Mbps for short links, but speed goes down with link length.
I will be using a half duplex bus topology with one master controller and probably 3 or 4 slaves. (A weather station, an AC power monitor, and a well pump house monitor/controller are the initial applications that I am investigating. Maybe more later.)
250 kbps is probably a more realistic ceiling. Since I plan on using PIC based controllers and moving very little data I will probably settle on something like 9600 bps.
 
RS485 can do 10 Mbps for short links, but speed goes down with link length.
250 kbps is probably a more realistic ceiling. Since I plan on using PIC based controllers and moving very little data I will probably settle on something around 9600-38400 bps.


There is no data protocol defined in the spec. Roll your own or borrow something.
There is no data protocol defined in the spec. Roll your own or borrow something.
Line 43: Line 45:
USB is pretty easy to deal with and my server has 6 USB ports.
USB is pretty easy to deal with and my server has 6 USB ports.
Rolling my own adapter seems like a waste of time.
Rolling my own adapter seems like a waste of time.
There is one that is open frame and has an FTDI chip, a MAX485, and a MAX202 so it does USB to serial TTL, RS485, or RS232 all on one board. The Maxim chips are socketed. I like the fact that I can see all the chips in the photos so it is almost as good as open source hardware; I know what I am getting. I paid $17 including shipping. (09-Jan-2009)


$10-18 on Ebay
$10-18 on Ebay

Latest revision as of 18:53, 10 January 2009


RS485 is a serial communications protocol that is very flexible; I describe only what I am interested in using here. It can be full duplex, half duplex, bus, point to point...

I am looking for a way to wire up sensors and controllers in my house, and I am doing it with wire. Wireless is great but I find wire to be more reliable. I have already run wire for ethernet and radios and speakers... running wire for RS485 should not be too hard.

I will be using a half duplex bus topology with one master controller and probably 3 or 4 slaves. (A weather station, an AC power monitor, and a well pump house monitor/controller are the initial applications that I am investigating. Maybe more later.)

RS485 can do 10 Mbps for short links, but speed goes down with link length. 250 kbps is probably a more realistic ceiling. Since I plan on using PIC based controllers and moving very little data I will probably settle on something around 9600-38400 bps.

There is no data protocol defined in the spec. Roll your own or borrow something.

Uses differential signaling, single polarity. A "1" is +5 on the A line and +0V on the B line.

Usually uses twisted pair, but it wants a separate ground line so one pair for signal plus power and ground plus a shield would be good. I will probably end up using CAT5E cable (unshielded).

Interface chips

Texas Instruments

75176B - The old standard

75LTC184 - Drop in replacement for the '176. New and improved.

Terminator and bias resistors make this a bit of a pain to work with.

Maxim

MAX481, MAX483, MAX485, etc

These chips seem to be the way to go, I will be getting some to test.

Computer connection

RS232 to RS485

This is what I have been testing, built an adapter with a MAX202 and a 75176B. I can buy a similar adapter on Ebay for $7.00

My laptop has no RS232 and my server has only one serial port which I want to use for the Magnavox GPS reference station.

USB to RS485

USB is pretty easy to deal with and my server has 6 USB ports. Rolling my own adapter seems like a waste of time.

There is one that is open frame and has an FTDI chip, a MAX485, and a MAX202 so it does USB to serial TTL, RS485, or RS232 all on one board. The Maxim chips are socketed. I like the fact that I can see all the chips in the photos so it is almost as good as open source hardware; I know what I am getting. I paid $17 including shipping. (09-Jan-2009)

$10-18 on Ebay

PCI cards

A 2 port RS485 PCI card from Ebay (shipped from Hong Kong) is less than $10. This would be great but my server has only one slot and it has a NIC in it right now.

External Links