[go: up one dir, main page]

Jump to content

RS-485

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 91.151.76.100 (talk) at 15:06, 10 January 2011 (Overview: metric system is used world wide except few radical extremist countries. Wikipedia should encourage thissystem, to ensure a coherent content). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

RS-485
Standard EIA RS-485
Physical Media Twisted Pair
Network Topology Point-to-point, Multi-dropped, Multi-point
Maximum Devices 32 (32 drivers and 32 receivers)
Maximum Distance 1200 metres (4000 feet)
Mode of Operation Differential
Maximum Baud Rate 100 kbit/s - 10 Mbit/s
Voltage Levels -5 V to +5 V (max)
Mark(1) Positive Voltages (B-A > +200 mV)
Space(0) negative voltages (B-A < -200 mV)
Available Signals Tx+/Rx+, Tx-/Rx- (Half Duplex)
Tx+, Tx-, Rx+, Rx- (Full Duplex)
Connector types Not specified.

EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the electrical characteristics of drivers and receivers for use in balanced digital multipoint systems. The standard is published by the ANSI Telecommunications Industry Association/Electronic Industries Alliance (TIA/EIA). Digital communications networks implementing the EIA-485 standard can be used effectively over long distances and in electrically noisy environments. Multiple receivers may be connected to such a network in a linear, multi-drop configuration. These characteristics make such networks useful in industrial environments and similar applications.

Overview

EIA-485 only specifies electrical characteristics of the driver and the receiver. It does not specify or recommend any communications protocol. EIA-485 enables the configuration of inexpensive local networks and multidrop communications links. It offers high data transmission speeds (35 Mbit/s up to 10 m and 100 kbit/s at 1200 m). Since it uses a differential balanced line over twisted pair (like EIA-422), it can span relatively large distances (up to 1200 meters).

In contrast to EIA-422, which has a single driver circuit which cannot be switched off, EIA-485 drivers need to be put in transmit mode explicitly by asserting a signal to the driver. This allows EIA-485 to implement linear topologies using only two wires. The equipment located along a set of EIA-485 wires are interchangeably called nodes, stations and devices. [1]

The recommended arrangement of the wires is as a connected series of point-to-point (multidropped) nodes, a line or bus, not a star, ring, or multiply-connected network. Ideally, the two ends of the cable will have a termination resistor connected across the two wires. Without termination resistors, reflections of fast driver edges can cause multiple data edges that can cause data corruption. Termination resistors also reduce electrical noise sensitivity due to the lower impedance, and bias resistors (see below) are required. The value of each termination resistor should be equal to the cable impedance (typically, 120 ohms for twisted pairs).

Star and ring topologies are not recommended because of signal reflections or excessively low or high termination impedance. But if a star configuration is unavoidable, such as when controlling multiple pan-tilt-zoom video cameras from a central video surveillance hub, special EIA-485 star/hub repeaters are available which bidirectionally listen for data on each span and then retransmit the data onto all other spans.

Somewhere along the set of wires, pull up or pull down resistors are established to Fail-safe bias each data line/wire when the lines are not being driven by any device. This way, the lines will be biased to known voltages and nodes will not interpret the noise from undriven lines as actual data; without biasing resistors, the data lines float in such a way that electrical noise sensitivity is greatest when all device stations are silent or unpowered.[2]

Master-slave arrangement

Often in a master-slave arrangement when one device dubbed "the master" initiates all communication activity, the master device itself provides the bias and not the slave devices. In this configuration, the master device is typically centrally located along the set of EIA-485 wires, so it would be two slave devices located at the physical end of the wires that would provide the termination. The master device itself would provide termination if it were located at a physical end of the wires, but that is often a bad design[3] as the master would be better located at a halfway point between the slave devices. Note that it is not a good idea to apply the bias at multiple node locations, because, by doing so, the effective bias resistance is lowered, which could possibly cause a violation of the EIA-485 specification and cause communications to malfunction. By keeping the biasing with the master, slave device design is simplified and this situation is avoided.

Three-wire connection

File:RS-485 3 wire connection.png
RS-485 3 wire connection

Even though the data is transmitted over a 2-wire twisted pair bus, all EIA-485 transceivers interpret the voltage levels of the differential signals with respect to a third common voltage. Without this common reference, a set of transceivers may interpret the differential signals incorrectly. In a typical setup, this third voltage is implied in the power supply common/ground connection. However, fundamentally speaking, there is nothing requiring this common voltage to be the same as the power supply. In fact, certain MS/TP (Master Slave / Token Passing) wiring requires full isolation between the various EIA-485 devices and have to run the third wire for the common connection.[4]

Full duplex operation

EIA-485, like EIA-422 can be made full-duplex by using four wires. Since EIA-485 is a multi-point specification, however, this is not necessary in many cases. EIA-485 and EIA-422 can interoperate with certain restrictions.

Converters between EIA-485 and other formats are available to allow a personal computer to communicate with remote devices. By using "Repeaters" and "Multi-Repeaters" very large RS-485 networks can be formed. The Application Guidelines for TIA/EIA-485-A has one diagram called "Star Configuration. Not recommended." Using an RS-485 "Multi-Repeater" can allow for "Star Configurations" with "Home Runs" (or multi-drop) connections similar to Ethernet Hub/Star implementations (with greater distances). Hub/Star systems (with "Multi-Repeaters") allow for very maintainable systems, without violating any of the RS-485 specifications. Repeaters can also be used to extend the distance or number of nodes on a network.

Applications

EIA-485 signals are used in a wide range of computer and automation systems. In a computer system, SCSI-2 and SCSI-3 may use this specification to implement the physical layer for data transmission between a controller and a disk drive. EIA-485 is used for low-speed data communications in commercial aircraft cabins vehicle bus. It requires minimal wiring, and can share the wiring among several seats, reducing weight.

EIA-485 is used as the physical layer underlying many standard and proprietary automation protocols used to implement Industrial Control Systems, including the most common versions of Modbus and Profibus. These are used in programmable logic controllers and on factory floors. Since it is differential, it resists electromagnetic interference from motors and welding equipment.

In theatre and performance venues EIA-485 networks are used to control lighting and other systems using the DMX512 protocol.

EIA-485 is also used in building automation as the simple bus wiring and long cable length is ideal for joining remote devices. It may be used to control video surveillance systems or to interconnect security control panels and devices such as access control card readers.

Although many applications use EIA-485 signal levels, the speed, format, and protocol of the data transmission is not specified by EIA-485. Interoperation even of similar devices from different manufacturers is not assured by compliance with the signal levels alone.

Connectors

EIA-485 does not specify any connector or pinout. Circuits may be terminated on screw terminals, D-subminiature connectors, or other types of connectors.

Signs of common mistakes

From a software engineer's perspective, miswired RS-485 can lead to spurious characters because a spurious mark bit is seen. A bus without good pull up and pull down resistors will be noise-sensitive. These can be system-wide (albeit trivial) problems that require looking beyond just the CPU that is being programmed.

Pin labeling

The EIA-485 differential line consists of two pins:

  • A aka '−' aka TxD-/RxD- aka inverting pin
  • B aka '+' aka TxD+/RxD+ aka non-inverting pin
  • SC aka G aka reference pin

The SC line is the optional voltage reference connection. This is the reference potential used by the transceiver to measure the A and B voltages.

The B line is positive (compared to A) when the line is idle (i.e., data is 1).

In addition to the A and B connections, the EIA standard also specifies a third interconnection point called C, which is the common signal reference ground.

These names are all in use on various equipment, but the actual standard released by EIA only uses the names A and B. However, despite the unambiguous standard, there is much confusion about which is which:

The EIA-485 signaling specification states that signal A is the inverting or '-' pin and signal B is the non-inverting or '+' pin.[5]

This is in conflict with the A/B naming used by a number of differential transceiver manufacturers, including, among others:

  • Texas Instruments, as seen in their application handbook on EIA-422/485 communications (A=non-inverting, B=inverting)
  • Intersil, as seen in their data sheet for the ISL4489 transceiver[6]
  • Maxim, as seen in their data sheet for the MAX483 transceiver[7]

These manufacturers are incorrect, but their practice is in widespread use.

Therefore, care must be taken when using A/B naming.

The standard does not discuss cable shielding, but makes some recommendations on preferred methods of interconnecting the signal reference common and equipment case grounds.

Waveform example

The graph below shows potentials of the '+' and '−' pins of an EIA-485 line during transmission of one byte (0xD3, least significant bit first) of data using an asynchronous start-stop method.

See also

References

  1. ^ Engineering Department, Electronic Industries Association, EIA Standard RS-485 Electrical Characteristics of Generators and Receivers for Use in Balanced Multipoint Systems, reprinted in Telebyte Technology "Data Communication Library" Greenlawn NY, 1985, no ISBN, no Library of Congress card number
  2. ^ http://www.national.com/an/AN/AN-847.pdf
  3. ^ http://www.ccontrols.com.cn/pdf/Extv9n2.pdf
  4. ^ http://www.chipkin.com/articles/rs485-cables-why-you-need-3-wires-for-2-two-wire-rs485
  5. ^ http://www.bb-europe.com/tech_articles/polarities_for_differential_pair_signals.asp
  6. ^ http://www.intersil.com/data/fn/fn6074.pdf
  7. ^ http://datasheets.maxim-ic.com/en/ds/MAX1487-MAX491.pdf