BACnet MSTP Installation, RS485 and Cables

Did you know that we also do Integration Solutions?

Chipkin has integration solutions for almost every situation. We specialize in network protocol communications and have over 20+ years of experience. Click for more information:

https://cdn.chipkin.com/assets/uploads/2022/Apr/QS-3XX0-2xx0-1XX0-SQ-NB 500pxls_13-18-44-12.png

Intro

BACnet MSTP uses RS485 (also known as EIA485) as it physical layer. This is good and bad.

Search the Internet on RS485 you will find Bob Perrins's article called THE ART AND SCIENCE OF RS-485. It is his reference to Art that makes RS485 bad. What he means is that RS485 is often non-trivial and getting a network working can rely more on experience and experimentation.

Here is our simplified advice:

1. RS485 is a 3 conductor network. You take a huge risk by not installing the 3rd conductor. You risk blowing 485 ports, you risk unstable operation (works sometimes and doesn't work other times) and finally, you risk re-installation. For a more detailed discussion read WHY YOU NEED 3 WIRES FOR 2 (TWO) WIRE RS485 FOR BACNET. The more power sources used to power devices, the greater the physical separation of devices, the less well-grounded devices, and power sources are the greater the risk. Remember this statement: The so-called Ground Terminal on an RS485 interface is not a connection to ground. It is a common reference signal. The voltage level on the Tx/Rx conductors are measured relative to this voltage level.

You can (if you must) use a shield drain wire as the 3rd conductor (ground reference conductor)

2. Always connect the ground reference conductor first if you are connecting a device that is powered up or you are connecting your laptop to an operating network.

OR

Always choose devices that have optical isolation this almost always will protect the RS485 transmitter/receivers.

3. You can get away without the shield. The twisted pair used for Tx and Rx is more effective at noise cancellation than the shield.

4. Take care where you run your cables. It seems obvious not to wind your cable around other cables or sources of electricity/magnetism. People are often surprised to find that the worst source of induced noise are switching DC loads. Another big culprit are Variable Frequency Drives.

pic1.jpg

5. Cable selection does make a difference.

All cables offer impedance (resistance). Some cables are designed so that the impedance is relatively independent of distance. You want one of these cables. A clue to knowing if you selected one is to look at the cables Nominal Impedance. If they quote a number such a 100Ohms you have a good cable. If they quote an impedance per meter/foot you have chosen the wrong kind. Wrong in the sense to determine the value of terminating resistors now requires measurements and calculations. Choose low capacitance cables.

Can you use Cat5 cable? Yes. Use one pair for Tx, Rx and a conductor from another pair for the ground reference signal.

We recommend these two cables.

Belden 3106A

pic2.jpg

Belden 3107A

pic3.jpg

Multi-Conductor EIA Industrial RS-485 PLTC/CM22 AWG stranded (70) tinned copper conductors, Datalene insulation, twisted pairs, overall Beldfoil shield (100% coverage) plus a tinned copper braid (90% coverage), drain wire, UV resistant PVC jacket.

6. How do you put more than 32 devices on a single RS485 trunk?

The simple answer is to use a repeater but in practice one isn't always necessary.

The RS485 standard is based on 32 devices. Since the standard was developed most RS485 chips present less than the full unit load originally specified. Today you get half and quarter load devices. Thus to see how many devices you can install you simply get the data sheets and add the loads. Look for UL on the data sheet. It stands for Unit Load.

7. Cable Lengths and Baud Rates

Practically speaking you can go up to 4000 feet at baud rates up to 76800 baud. Above that, you need to do a little math and reduce the length. For example, at 115k baud your cable should not be much longer than 2500 feet.

However, the higher the baud rate the more sensitive the cable is to the quality of installation issues like how much twisted pair is unwound at each termination start to become very very important.

Our advice: For longer networks with lots of devices, choose 38k400 baud over 76k800 baud and optimize using COV, separate networks and by setting the Max Master to a lower number.

pic4.jpgSource: Ten Ways to Bulletproof RS-485 Interfaces National SemiconductorApplication Note 1057 John Goldie October 1996

8. How many devices to install on a single RS485 Trunk (Bandwidth Issues)

How many devices to install on a single RS485 Trunk (Bandwidth Issues)

There are nonelectrical considerations to determine how many devices you put on an MSTP network.

The chart below illustrates (from one installation) how little of the bandwidth is used to transfer data. The APDUs are application layer message that poll and respond with property values they do work for us as data consumers. The rest is used to maintain the network passing the token around and looking for new devices.

pic5.jpg

Its not possible to provide a calculator to work out how many devices to install on a single network but the following list provides some help in assessing bandwidth considerations.

  • How many of the devices will be BACnet slaves?

    Token passing and looking for new devices on the MSTP trunk consumes a fair amount of bandwidth.

    A BACnet slave can be read/written but never gets the token. So it can't initiate any messages because it never gets the token. The more slaves the fewer token passes. Typically you are not able to put a device in slave mode. Most vendors implement their devices as masters (ie token passing devices).

  • How many Objects in each device are you interested in monitoring?

    The more you read and the greater the frequency the more bandwidth that will be consumed.

    It takes approx 30 bytes to poll for a single property. It takes about 40 bytes to reply. A token is 8 bytes as is a Poll for master. Assume that 50% of your bandwidth will be used by overhead (token, poll for master). Divide the baud rate by 10 to get bytes per seconds. Using a number like 30+40=70 as a best case and 100 as a worst case (obviously reading descriptions will take more) multiply by the number of objects and properties you are going to poll on a regular basis.

    Here are some typical numbers assuming the device doesn't support the multiple services (see below).

    Baud 38400
    Bytes per sec (divide Baud by 10) 3840
    Overhead use (token and poll for master) 50%
    Byte per sec for payload (a) 1920
    Typical Poll and response for a single property (b) 70
    Number of properties that can be polled per sec (=a/b) 27.42857
    Typical number of props that will polled per object 4
    (pres value, status_flags, reliability, out of service)
    Number of objects per sec 6.857143
  • How many properties from each of these objects?
  • What is the baud rate?
  • What is Max Master Set to?

    Every few cycles each (master) token passing device on the network must look to see if there are new devices. Max Master determines the biggest address that must be searched for. Each search involves sending a message and waiting for a response or a timeout (if the devices isn't there). Timeouts cost time. The higher the number of Max Master (default is 127) the more potential devices must be searched for. If you use Max master to improve bandwidth then you must adjust it in each device.

  • Do the devices support the Read/Write Property Multiple services or must each property be read in a separate message.

    Find the answer to this question by reading the BIBs statement for each device or you could explore the device object of the device, find the property called BACnetServicesSupported and then look at the 14th item in the array to see if Read Property Multiple is supported and the 16th for Write Property Multiple. However, we have found that a large number of devices don't display this information.

    Obviously, if you can read a chunk of properties in one message you will be better off than if you can only read a single one.

  • Can you use BACNets COV mechanism?

    COV stands for Change of Value. When a device supports COV another device/application can subscribe to receive notifications when an object property changes. This means the data client doesn't have to poll for data continuously but can wait passively to be notified of the change. This reduces the number of messages on a network dramatically.

  • Some devices are slower than others.

    BACnet allows up to 15 msec for a device to use the token. Since most messages on a MSTP network are token passes a device that uses the token in 5 msec will consume much less bandwidth than one that takes 15msec. (A number of vendors relax this requirement to allow for other vendors implementations. The more relaxed the more bandwidth is consumed doing nothing.)

9. What can go wrong with 485?

Let's say you adopted all the best practices for installation of the network but you get intermittent or unacceptable performance because of packet loss, noise, collisions Then you should consider hiring an expert to resolve your problems because now you are in the Art part of RS485. These are some of the things they will look at.

  • Reflections

    Without a scope and expertise, you won't know this is a factor. It's easy and cheap to eliminate. Look at the cable spec. Find the nominal impedance. Buy two resistors of the same value. At each end of the trunk install the resistors between the Tx and Rx terminals. If you don't have obvious ends of the trunk (because you created a star) then we recommend re-cabling to form a linear trunk or we wish you luck.

    Some devices have terminating resistors built into them. If the vendor did a poor job, the default is to have the resistor active and they must be disabled unless they are the terminating devices on the network. Read vendor docs.

  • Biasing, Idle State Biasing, Fail Safe Biasing, Anti Aliasing

    There are a whole string of terms uses as synonyms to describe this phenomenon.

    To use two wires ( as opposed to full duplex 4 wire) for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. Releasing the line means allowing it to float. It must not be allowed to float at any voltage level so devices have pull up/down resistors to pull the line to an allowable floating voltage. (the floating state is also known as the tri-state. ) The load presented by other devices on the network affects this floating so the resistor values may need to be changed depending on the number of devices installed and the values of the pull up/down resistors they are using. (You can imagine how tricky it's going to be to resolve this). If a device floats out of the specified range then to other devices it will look like the floating devices isn't floating at all. The other devices will think that it is transmitting or receiving and thus blocking the line.

    The simplest way of knowing if this is a factor Does the device work properly when it is the only device on the network ?. When you install it in the full network other devices or this device stops working properly. This device and/or the pull up/down resistors of other devices are candidates for investigation.

    A number of vendors have a range of pull up/down resistors installed and allow you to change the selection using software or jumpers.

  • Line Drive On / Off

    To use two wires for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. When a device wants to send it must grab the line. When it has finished sending it must release the line. You can see there are potential problems here. What happens if one device waits too long after sending its last bit before releasing the line it's possible that the other devices will miss some bits of data.

10. Take care with the topology. The best topology is a single trunk that in-outs on the terminal blocks of each device it connects. What do we mean by best? We mean the choice which is least likely to cause problems.

Best arrangement. (Showing TX conductor for reference only)

bestarrangement.jpg

Getting worse. Making the connections to the RS485 terminals, drops instead of connections starts to give the electrical signals all kinds of complicated paths for reflections and harmonics. It's obvious that if the drops are long and are not twisted then you also have more chance to induce noise. (Showing TX conductor for reference only)

worsearrangement.jpg

Worst. Avoid Star configurations. They are so much harder to debug when it gets tricky. (Showing TX conductor for reference only)

worstarrangement.jpg

2 Comments on BACnet MSTP Installation, RS485 and Cables

2 Responses to BACnet MSTP Installation, RS485 and Cables

  1. Chris Smith says: January 8, 2009, at 4:44 am  (Edit)

    This is an excellent read! I believe that most of the cable mistakes that occur today is due to a lack of education with the guys installing them. If someone had to read just this article before touching a RS485 bus they would in for a world of hurt! :)Could you explain the maximum amount of devices allowed on the bus though? I always wondered if 32 was the actual max or if it was due to the standard. Also, could you explain the limitations of the RS485 protocol and the 32 node limit

    Reply
  2. Peter says: January 8, 2009, at 2:20 pm  (Edit)

    The Standard imposes the limit on the number of unit loads presented by the device and does not limit the number of devices. The limit was imposed for practical reasons.

    When a device drives the line it sees the load presented by the other devices and the terminating (and biasing) resistors. The people who designed the standard made an arbitrary decision with practical implications How big a load can the line driver see without the signal being attenuated too much. That decision set the limit at 32 unit loads (15kOhm each).

    Some vendors may make chips which can drive more but they can't push the standard too far or it may present an electrical risk to the other devices. I don't have practical experience of installing more than 32 devices on a trunk. I think you may be able to add a few more devices and still have a fully operational network depending on the load presented by the terminating resistors.

    As is mentioned in the article, a repeater is the best way around this limitation or look for devices which present less than one unit load (UL) since the standard defines the number of Unit Loads and not the number of devices.

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm
Message Sent Successfully