0% found this document useful (0 votes)
9 views

Tech Note_485network

This document provides guidance on understanding and implementing an RS-485 network using Detcon equipment, detailing the specifications, wiring schemes, and troubleshooting tips. It emphasizes the importance of a daisy-chain connection for optimal performance and discusses the use of repeaters to extend distance and improve signal integrity. Additionally, it outlines the Modbus protocol used for communication between devices on the RS-485 network.

Uploaded by

420luismaldonado
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Tech Note_485network

This document provides guidance on understanding and implementing an RS-485 network using Detcon equipment, detailing the specifications, wiring schemes, and troubleshooting tips. It emphasizes the importance of a daisy-chain connection for optimal performance and discusses the use of repeaters to extend distance and improve signal integrity. Additionally, it outlines the Modbus protocol used for communication between devices on the RS-485 network.

Uploaded by

420luismaldonado
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Detcon Inc.

INDUSTRIAL GAS DETECTION


AN-1000
www.detcon.com

Understanding and Implementing a Functional RS-485 Network

SCOPE wait while the vehicle going west uses the


highway, and vice-versa. In this case the
This article is intended to help clarify the protocol that is used becomes the traffic
details and correct application of a RS-485 controller. The specification allows for the
network using Detcon equipment. It is also connection of up to 32 unit loads (UL’s) to
to help in understanding what RS-485 is, the twisted pair. An older transceiver chip
how to make it operate properly, and de- would have represented 1 UL. The current
mystify some of the myths that seem to chip that Detcon uses on its equipment
make it an undesirable and hard to install represent a 0.25 UL therefore theoretically
communications link. It is actually just the allowing 128 devices to be connected to the
opposite. Also included are some basic twisted pair (data bus). Connection of more
trouble-shooting tips and cable type than 32 UL’s to the bus will limit the drivers
recommendations. By no means is this a full and cause attenuation of the signal
and complete document on the subject, but preventing the system from operating
it should address some of the more common properly.
questions and problems.
SYSTEM WIRING
RS-485 : THE SPECIFICATION
Since RS-485 allows multiple devices to be
RS-485 is a generic electrical specification connected to the bus, wiring is not as
only. It does not specify connector types, straight forward as it is in a bus with only 2
protocols, or cable type. It is the devices. The best wiring scheme is the
responsibility of the installer to provide a daisy-chain connection from device1 to
correct physical installation for the RS-485 device 2 to device 3 to device n. All devices
network to function properly. RS-485 is very that tap into the bus should not be at the end
inexpensive and inherently rugged, allowing of long stubs, branches, or t-taps. A true
multiple devices to communicate over a daisy-chain has direct wiring between
single twisted pair of wires. Detcon has devices with not even minor branches.
chosen to implement the Modbus protocol Detcon equipment contains four wiring
using the RS-485 electrical specification. terminals for 485 connection. Two for A(+)
and two for B(-). All connections should me
RS-485 is a two way half-duplex data bus made directly to these. Figure 1 shows an
made up of a transceiver (transmitter and electrical representation of a simple RS-485
receiver). In it’s simplest form, one bus with 4 transceiver chips.
transceiver is located on each end of a
twisted pair cable of up to 4000 feet
maximum. Data can be sent in either
direction, but can only be sent in one
direction at the same time. It is like having a
one-lane highway that is used for travel in
both directions. The vehicle going east must
Figure 1.

Page 1 of 7
RS-485 NETWORKS
Detcon Inc.
INDUSTRIAL GAS DETECTION
AN-1000
www.detcon.com

The use of a daisy-chain connection will


perform the best in all applications given the
bus is properly terminated. The standard
specifies the transceiver characteristics only,
not the interconnection of the transceivers
themselves. Depending on the environment,
distance and other factors you can connect
transceivers using flat cable, twisted pair
cable, even PCB traces. However for the
most reliable data transfer in industrial
environments shielded twisted pair is
required. 18 to 28 AWG has been used, but
24 AWG is highly recommended. The
characteristic impedance of the cable must
be between 100 to 120 ohms. Twisted pair
is used because if the cable does run near a
noise source both conductors will pick up
the same amount of noise, therefore
effectively canceling it out.

Some of the biggest problems with an RS-


485 bus is the use of an incorrect wiring
scheme mixed with improper line
termination. Most installations are not used
to having to run wires in a daisy-chain
fashion, instead wire runs tend to originate Figure 2.
from a central point and run to different
devices in a star-like pattern. This is the GROUNDING
absolute worst way to wire an RS-485 bus.
The chances of worry free operation over Another problem that can occur with RS-485
the life of the equipment decreases is incorrect grounding. Neither one of the
dramatically the further you stray from a two conductors in the cable is a GND. Both
straight daisy-chain wiring scheme. The bus of the conductors are supplying a current to
needs to be terminated at each end of the maintain a voltage level relative to an
cable run to operate ideally. With other external reference. You must either supply a
wiring schemes you introduce multiple third conductor as the reference, or establish
“cable ends” making it impossible to balance the reference through earth ground.
the lines. Figure 2. shows some examples of
good vs. bad wiring schemes. Wiring as in RS-485 is specificed to be able to work
Figure 2 (A,B & C) would more than likely normally with a +/-7V ground potential
require no special fixes to allow reliable data difference and survive +/-25V surges. In
flow. Figure 2 (D,E & F) could possibly be most applications our equipment is powered
made to operate, but would require many off of our own DC power supplies. This is
repeaters and man-hours to do so. good as long as the supplies are located in

Page 2 of 7
RS-485 NETWORKS
Detcon Inc.
INDUSTRIAL GAS DETECTION
AN-1000
www.detcon.com

the same physical location, and their DC extreme ends. Without a balanced bus the
commons are tied together, and then tied to long taps of slave1 & 2 will introduce
earth ground. Problems can occur when you reflections to the signal that can lead to
have part of the data bus powered off of one problematic operation in the field. These
supply and the second part of the bus problems can be very hard to diagnose,
powered off of a power supply located much less isolate and fix.
somewhere else in the plant. In this case
you are relying on earth ground to be the
reference between the two sections of the
bus. If noise gets induced onto the earth
ground of one power supply and not the
other, you may wind up with data errors.
This is even more likely to occur when the
distance between the ground references is
long. A way around this is to install an
isolated repeater into the data bus to isolate
the grounds from each other, enabling the
Figure 3.
bus to use only one of the two references.

USING REPEATERS
The addition of 2 repeaters (Figure 4.) can
solve this problem. The repeaters look like
Repeaters can play many rolls in the
short stubs to the main bus, and at the same
implementation of an RS-485 data bus.
time they create 2 new busses that have all
They can extend distance if you need to go
the same characteristics as the main bus.
further than 4000 feet, allow for the addition
Each new bus could have up to 32 UL’s
of more devices to then bus, increase signal
connected to it. Just don’t forget the
strength and integrity, solve grounding
termination resistors to balance the new
problems and solve some of the problems
data bus.
that will occur when an incorrect wiring
scheme is implemented. A repeater in it’s
basic form consists of two transceivers
working together.

One transceiver is connected to the main


data bus and the other transceiver connects
to the remainder of the devices as it creates
a new and separate data bus. Figure 3
shows a data bus that implements a not so
desirable branched wiring scheme.
Depending on the length of the taps of slave
1 and slave 2, they may or may not
communicate properly back to the master.
The long lengths create 4 ends to the cable Figure 4.
instead of just 2, which can not be balanced
with the 2 terminating resistors on the

Page 3 of 7
RS-485 NETWORKS
Detcon Inc.
INDUSTRIAL GAS DETECTION
AN-1000
www.detcon.com

Be sure to check the equipment you are address (485 ID) which corresponds to one
installing. Some manufacturers include a of the slave devices, along with the
built-in terminating resistor that can be instruction for that device, followed by a
selected with a jumper or dip switch. couple of error checking bytes. When
Detcon’s Model 880 has such a jumper complete, the master turns off its transmitter
located on the FA-isonet card. The jumper is and waits for a response. Once the slave in
labeled “120 ohm Term”. Detcon’s 600 question recognizes the command from the
series gas sensors and DA1 modules do not master it performs the instruction and
include this resistor, and therefore, if one of prepares to answer the master. First it turns
these devices is the last on the RS-485 bus on its transmitter, then it sends a data
then a discrete 120 ohm resistor should be stream. The data stream contains its own
placed across the “A” and “B” terminals on address (485 ID) along with the data that
the connector board. was asked for by the master, followed by a
couple of error checking bytes. The slave
PROTOCOL then turns off its transmitter and all is quiet
until the master requests additional data
Now that we have been through the from one of the slaves.
communications medium, lets look at the
language and mannerisms (Protocol) that The Master transmits this data stream (HEX)
are used to communicate between many
01 03 00 00 00 04 C5 C8
devices. The same protocol could be used
on an RS-232 port or an Ethernet port. The 01 is the slave address
protocol does not care about the electrical
side of things, it is simply a set of rules and 03 means the master wants to get some information
specific details of how we will communicate. from the slaves registers.

00 00 is the starting address of the data


Detcon has chosen to implement Modbus
RTU as its protocol of choice. Mainly 00 05 is the number of registers it wants
because it is very widely used as an
industrial protocol by many other companies C5 C8 are the error checking bytes (CRC)
and there are no licensing fees to use the The slave transmits this back to the master
protocol. As stated earlier 2-wire RS-485
allows communication by only one device at 01 03 08 00 00 00 00 00 00 00 00 F3 6E
any given point in time. Therefore most
protocols are implemented with one master 01 is the slave address
device, and many slaves (unit loads). The 03 indicates the requseted data will fillow
master controlls all communications. A easy
way to understand this is to think of being in 08 means 8 bytes of register data will follow (it takes
school, where you can only speak when you 2 bytes to make a register)
are spoken to. The teacher would be the
00 00 00 00 00 00 00 00 data
master, and the students the slaves. No one
is ever talking at the same time. The master F3 6E are the error checking bytes (CRC)
first turns on the transmitter section of its
transceiver. The master then transmits a
data stream. The data stream contains an

Page 4 of 7
RS-485 NETWORKS
Detcon Inc.
INDUSTRIAL GAS DETECTION
AN-1000
www.detcon.com

Although this is ideal, reality is never ideal


and wiring may already exist or the wiring
DEVICE HOOKUP can not be run this way for some reason.
Below shows a more realistic wiring situation
Installation should begin by deciding where that may occur. In this case it is impossible
devices will be located and how the to balance the data bus because there is no
connections between devices and the
master will be established. The ideal 01 02 03
scenario would look like the drawing shown
below. Here we have an 880 Controller
connected to 11 slave devices using a 04
Control Room
daisy-chain wiring scheme. This would
require 2 different twisted pair cables, one 05

for power and the other for our RS-485 data 09

bus. The connections would be point-to-


point starting at the master and going to the 0a 0b
last slave. The RS-485 data cable should
come into the sensor enclosure and be
08
connected to the A & B terminals. The next 07 06

segment of cable should also connect to the


A & B terminals and leave the enclosure distinct beginning or end to the cable run.
headed for the next device. The shields The best way to make this type of
must now be tied together inside the installation successful is to install repeaters
enclosure and not allowed to short to any in a few key areas to eliminate the t-taps or
other wires or surfaces. The shield should stubs which can cause problems with the
be connected only inside the 880 cabinet to signal quality. The location and number of
the shield terminal. The Rt label in the stubs will dictate where repeaters need to be
drawing shows where the termination installed. The next drawing shows 4
resistors would be installed. repeaters installed to eliminate the stubs.
Notice that there are now 5 different data
buses that make up our communications
network.
01 02 03

01 02 Rt
03

repeater #2
04
Control Room
Rt
Rt 05

09 Control Room 04

Rt
Rt
05

0a 0b Rt 09

repeater #1
08 07 06 Rt Rt
Rt
0a 0b

repeater #3 repeater #4

08 Rt Rt Rt
07 06

Page 5 of 7
RS-485 NETWORKS
Detcon Inc.
INDUSTRIAL GAS DETECTION
AN-1000
www.detcon.com

TROUBLESHOOTING
The first one consists of the master located
in the control room, device 09, repeater #1, Trouble-shooting RS-485 with multiple
device 01, device 02, repeater #2, device devices attached to the data bus can be an
03, and device 05. Notice the termination aggravating task. Sometimes one device will
resistors at the beginning and end of this take down the entire bus, but if brought back
bus section. to the shop, the same device might work just
fine. Most of the time the failure is a
The second bus starts at repeater #2. It damaged transceiver chip, which was
consists of the repeater and device 04. subjected to an over-voltage or a surge.
Since this is a new bus it has terminating
resistors at each end. The first step in finding the bad device or
devices is to start at the master. Disconnect
The third bus starts at repeater #1. It the data wires (A & B). Connect a working
includes device 08, repeater #3, device 07, device directly to the master and make sure
repeater #4, and device 06. It also has its that it is functional. If it is not, replace the
own resistors. master’s transceiver chip or board. In the
case of an 880 controller, this would be the
The fourth bus starts at repeater #3 and FA-Isonet board. Once this is done stop the
consists of the repeater, device 0A, and the master from communicating, but do not
terminating resistors. power it down. On the model 880, this can
be done by unplugging the phone jack
And the fifth bus starts at repeater #4 and connection to the FA-Isonet card.
consists of the repeater, device 0B, and
termination resistors. Now unplug all of the slave devices from the
bus. When using 600 series transmitters or
This configuration isolates all of the t-tap DA-1’s this is done by simply unplugging the
stubs and should function properly if wire transmitter from the connector board. Re-
type and distances are observed. The connect the data bus wires (A&B) to the
following chart shows an approximation of master. Using a meter measure the voltage
wire length vs. data speed. Detcon operates across the A and B wires and write this
its equipment at 19,200bps and lower. reading down. Go to the first slave device
plug it in. Take another measurement and
100 mbps write it down. Unplug the first device and
proceed to the next slave recording the
10 mbps meter readings as you go. The first
measurement you took should have been
1 mbps
arround 400 to 500 millivolts. If this is not the
case, be sure you have unplugged all
100 kbps
devices from the data bus. If you still don’t
measure somewhere arround 400 to 500
10 kbps
millivolts there may be a problem in the
wiring that must be corrected. Now, if any of
1 kbps

0 ft 10 ft 100 ft 1000 ft 5000 ft 10000 ft


the other readings you took are above or
below the first reading by more than 50

Page 6 of 7
RS-485 NETWORKS
Detcon Inc.
INDUSTRIAL GAS DETECTION
AN-1000
www.detcon.com

millivolts, that units transceiver chip should


be replaced. Here are some recommended cables and
their specifications from Belden. These were
You should wind up with results similar to designed with RS-485 in mind, and should
the ones shown here. As you can see slave be used.
device 03 and 0B need to be changed.
Belden# pairs AWG Impedance
9841 1 24 120ohm
Slave master MV Difference
9842 2 24 120ohm
ID 01 425 451 26 8132 2 28 120ohm
ID 02 425 430 5
The following companies make RS-485
ID 03 425 486 61
repeaters that we have used with good
ID 04 425 410 -15 results.
ID 05 425 420 -5
www,rs485,com
ID 06 425 432 7 Models IRSFC24FB, DIFAR44
ID 07 425 422 -3
www,robustdc,com
ID 08 425 415 -10 Model RDC485IR3
ID 09 425 418 -7
Too many times have we seen problematic
ID 0A 425 440 15 systems where the root cause of
ID 0B 425 310 -115 communications problems was incorrect
wire type and wiring scheme. It is easier to
avoid these problems before they actually
Also measuring at the master device are problems by just following a few simple
between dc common and A, or dc common guidelines. Have a good wiring scheme, use
and B should give you a reading of around a recommended cable, properly connect
2.5vdc. Remember this is with the power on, your data lines and shields, don’t forget
but no communications taking place. about those terminating resistors and have
some isolated repeaters handy in case you
Another method of troubleshooting which is run into some grounding problems.
not as exacting is to enable the
communications, but remove all the slaves.
Proceed to plug 1 slave in and see if
References:
communications are still good. If so plug in
the next slave and check again. Repeat this
Robust Data Comm
with each slave until you either have all of
AN-003, AN-005, AN-006, AN-021
the slaves plugged in and everything is fine,
or a single slave will take down the data bus.
Circuit Cellar
This is not the best way to troubleshoot an
The Art and Science of RS-485
RS-485 data bus, but if you have no other
means, it is a good start.

Page 7 of 7
RS-485 NETWORKS

You might also like