Differential Signals With RS485

Embed Size (px)

Citation preview

  • 8/16/2019 Differential Signals With RS485

    1/4

    Differential signals with RS485:Longer distances and higher bit rates

    One of the main problems with RS232 is the lack of immunity for noise on the signal lines.

    The transmitter and receiver compare the voltages of the data- and handshake lines withone common ero line. Shifts in the ground level can have disastrous effects. Therefore thetrigger level of the RS232 interface is set relatively high at !3 "olt. #oise is easily picked up

    and limits both the ma$imum distance and communication speed. %ith RS&'( on thecontrary there is no such thing as a common ero as a signal reference. Several volts

    difference in the ground level of the RS&'( transmitter and receiver does not cause anyproblems. The RS&'( signals are floating and each signal is transmitted over a Sig) line and

    a Sig- line. The RS&'( receiver compares the voltage difference between both lines* insteadof the absolute voltage level on a signal line. This works well and prevents the e$istence of

    ground loops* a common source of communication problems. The best results are achievedif the Sig) and Sig- lines are twisted. The image below e$plains why.

    Noise in straight and twisted pair cables

    +n the picture above* noise is generated by magnetic fields from the environment. Thepicture shows the magnetic field lines and the noise current in the RS&'( data lines that isthe result of that magnetic field. +n the straight cable* all noise current is flowing in the

    same direction* practically generating a looping current ,ust like in an ordinary transformer.%hen the cable is twisted* we see that in some parts of the signal lines the direction of the

    noise current is the oposite from the current in other parts of the cable. ecause of this* theresulting noise current is many factors lower than with an ordinary straight cable. Shielding

    which is a common method to prevent noise in RS232 linestries to keep hostile magneticfields away from the signal lines. Twisted pairs in RS&'( communication however adds

    immunity which is a much better way to fight noise. The magnetic fields are allowed topass* but do no harm. +f high noise immunity is needed* often a combination of twisting and

    shielding is used as for e$ample in ST/* shielded twisted pair and 0T/* foiled twisted pairnetworking cables. 1ifferential signals and twisting allows RS&'( to communicate over much

    longer communication distances than achievable with RS232. %ith RS&'( communicationdistances of 2 m are possible.

    1ifferential signal lines also allow higher bit rates than possible with non-differentialconnections. Therefore RS&'( can overcome the practical communication speed limit of

    RS232. 4urrently RS&'( drivers are produced that can achieve a bit rate of 3( mbps.

    Characteristics of RS485 compared to RS232 RS422 and RS423

  • 8/16/2019 Differential Signals With RS485

    2/4

    Characteristics of RS232 RS422 RS423 and RS485

      RS232 RS423 RS422 RS485

    1ifferential no no yes yes

    5a$ number of drivers5a$ number of receivers 3232

    5odes of operationhalf duple$full duple$

    half 

    duple$ 

    half 

    duple$ 

    half 

    duple$ 

    #etwork topology

    point-to-

    point multidrop multidrop multipoint

    5a$ distance 6acc. standard7 ( m 2 m 2 m 2 m

    5a$ speed at 2 m

    5a$ speed at 2 m

    2 kbs

    6 kbs7

    kbs

    kbs

    5bs

    kbs

    3( 5bs

    kbs

    5a$ slew rate 3 "89s ad,ustable n8a n8a

    Receiver input resistance 3..: k;   ≧ & k;   ≧ & k;   ≧ 2 k;

    1river load impedance 3..: k;   ≧ &( ; ; (& ;

    Receiver input sensitivity !3 " !2 m" !2 m" !2 m"

    Receiver input range !( " !2 " ! "

  • 8/16/2019 Differential Signals With RS485

    3/4

    needed in most protocols does not consume bandwidth on the primary data channel ofRS232.

    Networ! topolog" with RS485

    #etwork topology is probably the reason why RS&'( is now the favorite of the fourmentioned interfaces in data ac?uisition and control applications. RS&'( is the only of the

    interfaces capable of internetworking multiple transmitters and receivers in the samenetwork. %hen using the default RS&'( receivers with an input resistance of 2 k; it is

    possible to connect 32 devices to the network. 4urrently available high-resistance RS&'(inputs allow this number to be e$panded to 2(=. RS&'( repeaters are also available which

    make it possible to increase the number of nodes to several thousands* spanning multiplekilometers. @nd that with an interface which does not re?uire intelligent network hardwareA

    the implementation on the software side is not much more difficult than with RS232. +t isthe reason why RS&'( is so popular with computers* /B4s* micro controllers and intelligent

    sensors in scientific and technical applications.

    RS485 networ! topolog"

    +n the picture above* the general network topology of RS&'( is shown. # nodes are

    connected in a multipoint RS&'( network. 0or higher speeds and longer lines* thetermination resistances are necessary on both ends of the line to eliminate reflections. Cse

    ; resistors on both ends. The RS&'( network must be designed as one line withmultiple drops* not as a star. @lthough total cable length maybe shorter in a star

    configuration* ade?uate termination is not possible anymore and signal ?uality may degradesignificantly.

    RS485 f#nctionalit"

    @nd now the most important ?uestion* how does RS&'( function in practice> 1efault* all the

    senders on the RS&'( bus are in tri-state with high impedance. +n most higher levelprotocols* one of the nodes is defined as a master which sends ?ueries or commands over

    the RS&'( bus. @ll other nodes receive these data. 1epending of the information in the sent

    data* ero or more nodes on the line respond to the master. +n this situation* bandwidth can

    be used for almost D. There are other implementations of RS&'( networks where everynode can start a data session on its own. This is comparable with the way ethernet networksfunction. ecause there is a chance of data collosion with this implementation* theory tells

    us that in this case only 3:D of the bandwidth will be effectively used. %ith such animplementation of a RS&'( network it is necessary that there is error detection

    implemented in the higher level protocol to detect the data corruption and resend theinformation at a later time.

  • 8/16/2019 Differential Signals With RS485

    4/4

    There is no need for the senders to e$plicity turn the RS&'( driver on or off. RS&'( driversautomatically return to their high impedance tri-state within a few microseconds after the

    data has been sent. Therefore it is not needed to have delays between the data packets onthe RS&'( bus.

    RS&'( is used as the electrical layer for many well known interface standards* including

    /rofibus and 5odbus. Therefore RS&'( will be in use for many years in the future.