The RS-485 and RS-422 Standard Protocols

Serial Ports
Share on facebook
Share on reddit
Share on twitter
Share on linkedin
Share on email
Share on print

Last week we reviewed the RS-232 standard protocol. We laughed, we cried. Overall, it was a pretty good time. Even though it is well established, used extensively, and has been around for literally decades, RS-232 isn’t the only protocol in the serial communications jungle. We would be remiss to leave out it’s younger, though at this point, still mature siblings RS-485 and RS-422. In this article, we’re going to rectify that and give a rundown of each.

Send Your Serial Data Securely

SB800EX-JDDW-IR-1
SB800EX-JDDW-IR

Or, learn more about NetBurner Serial To Ethernet.

Parallel Communication vs. Serial Communication

Let’s start with some background. Wired communication protocols can be parallel or serial. Parallel communication uses multiple wires to transmit several bits of data at once. Serial protocols, on the other hand, use between one and four wires to send a single bit at a time in a continuous stream. It is clearly faster to send many bits of data simultaneously than to stream them one by one.

Nevertheless, there are several reasons why one may prefer a more straightforward, albeit slower, mode of communication. For one, microprocessors are often unable to accommodate the number of input/output lines needed for parallel protocols. When they do, the added complexity can be troublesome to work through. Additionally, using serial protocols saves space and money on the materials used in a design. Several of the more common communication interfaces, such as USB, are serial.

Synchronous vs. Asynchronous Serial Communication

Serial communications can be synchronous or asynchronous. With a synchronous interface, sending or receiving data is timed to signals from a clock shared between the devices. This allows for faster and more reliable data rates at the cost of an additional line.

Asynchronous protocols do not use a shared clock and instead agree on the speed of data transmission (baud rate) ahead of time. Most serial protocols that take advantage of asynchronous communication have methods to signal the beginning and end of a data transfer. The lack of a shared clock signal means one less pin to worry about (this is always a win in the embedded systems world), and will reduce overall EMI.

One significant component of getting an effective protocol in place is hardware. More specifically, the buses used can determine the speed and maximum distance for a reliable signal. Both RS-422 and RS-485 are interface standards that are commonly used in serial ports. Because they are both asynchronous protocols, these standards dictate that the timing of signals and their electrical attributes be specified in the implementation.

Full-Duplex vs. Half-Duplex

Before we jump into the details of RS-422 and RS-485, there are two terms that we should cover. These are full-duplex and half-duplex, and no, we’re not talking about cozy housing options here. In the serial communications world, full-duplex means that data can be sent and received at the same time. This requires that the interface has separate lines for both receiving and transmitting data.

Half-duplex, on the other hand, uses the same line for reception and transmission. As a result, data can only travel in one direction at a time. RS-485 can be configured to run in full-duplex or half-duplex mode, while RS-422 is full-duplex only.

RS-422

RS-422 uses a twisted pair differential signal (more on this below) for receiving and transmitting data. It runs in full-duplex mode, with each transmission direction using two wires apiece. Putting on our math hats, this means that it requires a total of four wires. It is regularly used in a point to point (two devices talking to each other similar to your standard RS-232 connection) or multi-drop topology. When set up in the latter configuration, it can connect one driver with up to ten receivers on a single bus, often through a daisy chain.

RS-485

Like RS-422, RS-485 also uses a twisted pair differential signal for receiving and transmitting data. However, this is most commonly done over a single twisted pair, which requires (as you probably guessed) two wires. The RS-485 standard was created to handle the problem of allowing several devices to talk to each other, and accordingly, it supports a multi-point topology. It can manage up to 32 devices, and the use of repeaters can increase this number to 256. This standard allows a reliable signal to persist under a higher load, which makes it a popular interface for industrial applications, including a variety of automation systems.

RS-485 can run in full-duplex mode and when it does, it essentially becomes RS-422. In fact, you can often take hardware utilizing RS-485 and successfully drop it into an RS-422 setup. However, the reverse is not true, as RS-422 cannot operate in half-duplex mode, and therefore is unable to support multi-point topologies.

How RS-422 and RS-485 Compare to RS-232

RS-232 is the standard used for your every day, though slightly dated, computer port. A standard RS-232 nine-pin connector port is commonly known as a DB9. As we covered previously, its layout consists of five pins over four (nine total). Going from left to right, the functions of each pin are as follows:

  1. Data Carrier Detect (DCD)
  2. Received Data (RXD)
  3. Transmit Data (TXD)
  4. Data Terminal Ready (DTR)
  5. Ground (GND)
  6. Data Set Ready (DSR)
  7. Request to Send (RTS)
  8. Clear to Send (CTS)
  9. Ring Indicator (RI)
Labeled Male DB9 Connector
Male DB9 Connector

Not all of these pins are necessarily used. Alternatively, some COM connectors use 25-pin ports, but this is less common.

While RS-422 and RS-485 also frequently use a DB9 connector, the pinouts will vary depending on the device and the manufacturer. You will need to check the documentation to find how a specific device is wired. A terminal block or other connector may be used for some devices, as these standards do not define a particular type of connector. An RS-485 pinout will also vary depending on whether it’s a two-wire or four-wire connection.

RS-232 works in a fundamentally different way from RS-422 and RS-485. It transmits data digitally, with 0 and 1 corresponding to positive and negative voltage ranges, respectively. The other two standards use a differential signal based on the potential voltage difference between two conductors on the same line. Differential signaling results in less noise and a clearer signal.

Comparing Device Connectivity

In terms of functionality, one significant difference is that RS-422 and RS-485 allow the connection of multiple devices (though in notably different ways, please see the above descriptions), potentially increasing their number with repeaters. RS-232 is a point-to-point standard, though it does support limited multi-drop capability. Printers and monitors are the traditional examples of hardware that is often connected via an RS-232 port.

Comparing Distance

One of the most notable differences is the maximum transmission distance, which is only 15 meters for RS-232 as compared to up to 1,200 meters for the other two standards. In practice, using a cable over the maximum distance for RS-232 almost always yields poor results. In fact, it is a common practice to take data traveling over RS-232 and converting it to RS-422 or RS-485 to increase the viable travel distance, then turning it back to RS-232 on the other end.

Comparing Valid Distance

One final, though important, point of comparison is data speed. RS-422 and RS-485 have a maximum data transmission rate of up to 10 Mbps (megabits per second). RS-232, on the other hand, supports up to 920 kbps (kilobits per second). With all three standards, using the maximum distance will decrease transmission speed; however, as mentioned above, this maximum is much shorter for RS-232 than for the other two.

Serial Data in a Networked World

RS-422 and RS-485 are exceptionally popular choices in automation and industrial applications. In today’s increasingly networked world, especially with IoT exploding all around us, the need to take data from devices that can only communicate through traditional serial protocols and making it available to the cloud or a network is increasing rapidly. NetBurner offers a variety of ready to use, off the shelf products to handle just this sort of problem. Come for our selection of serial to Ethernet converters, and stay for the full range of networking support from our seasoned professionals.

That about wraps up our introduction to RS-422 and RS-485. As always, thanks for joining us! If you have any questions or comments, please feel free to drop them down below, or reach out to us directly at sales@netburner.com.

Share this post

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on email

Subscribe to our Newsletter

Get monthly updates from our Learn Blog with the latest in IoT and Embedded technology news, trends, tutorial and best practices. Or just opt in for product change notifications.

Leave a Reply

Your email address will not be published. Required fields are marked *