Key Differences between RS-485 and RS-232 Serial Protocols

Published  February 22, 2021   0
Differences between RS-485 Serial Protocols and RS-232 Serial Protocols

Why Serial? Well, using serial communication imparts a number of advantages including simplicity, easy-to-impellent, and needs only a few GPIO pins. RS-485 and RS-232 are the two serial data communications standards that have aged well. They existed way before USB, SPI, flex I2C, and many others, and yet still remain relevant and have their place in today’s era. Aged they are, dead they are not.

In this article, we take a comparative tour of RS485 and RS232 based on their operating distance, electrical signaling techniques, data rates, number of drivers and receivers, and voltage requirements. Apart from RS485 and RS232, we have many other types of serial communication protocols, you can also check them out if interested.

Let’s begin.

Basics of RS-232 Protocol

RS-232/ Recommended Standard-232 was introduced in the 1960s, and after going through multiple revisions, it was named TIA/EIA -232-F in 1977. Electronic Industries Association (EIA) and Telecommunications Industries Association (TIA) are in charge of edifying the standard. We have already discussed the working of the RS232 Protocol in detail, lets quickly get over it again in brief.

RS-232 Protocol

 

The RS-232 standard was developed to bring about compatible connectivity between different vendors of small serial data communication interfaces. It defines the names and electrical characteristics of signals in the interfaces as well as the mechanical attributes of the interfaces used.

 

Any RS-232 interface is only used for connecting two devices. One is the Data Terminal Equipment (DTE) and the other is Data Communication Equipment (DCE). RS-232 interfaces are popularly used in peripheral connectivity for PCs, so commonly, a DTE can be a PC and a DCE can be a printer. Communication between the two devices is stretched up to 50 feet and the data rate up to over 20 Kbps.

 

RS-232 Protocol Working

 

The links used in RS-232 are classified as unbalanced or single-ended lines. This means the transmission lines are referenced to a common ground, or even more simply put, one wire is used for transmitting data and the ground serves as a second wire. Single-ended lines can quickly corrupt the data they carry when used over very long distances. The corruption can be caused by ground shifts, ground loops, and even the different ground potentials between the sender and receiver.

 

In terms of electrical characteristics of the transmitted signals, logic level 0 is defined as equal to or more positive than +3V, and logic level 1 is defined as equal to or more negative than -3V. The signals use negative logic. The protocols also state that the input signals between -3V and +3V are undefined.

 

Input data

Logic level

More than +3V

0 (Space)

More than -3V

1 (Mark)

Between -3V and +3V

Undefined

Another feature is that RS-232 is a point-to-point asynchronous communication protocol. The "Asynchronous" term tells us that no common clock is used for synchronizing the transmitter and the receiver. They run on their own clock. A synchronized data transfer between the two occurs because data is transferred in the form of a known protocol data format.

Point-to-Point Asynchronous Communication Protocol

Basics of RS-485 Protocols

RS-485 carries the official name TIA/EIA-485. It was designed to increase the distance and data limits of RS-232 and to overcome the one-way communication over a two-wire interface of RS-422. It is a bi-directional multi-drop interface so it is not limited to connecting only two devices like RS-232. Up to 32 sets of drivers and receivers can be connected per RS-485 port and the distance extends to 4000 feet and data rates to 100 Kbps.

RS-485 Protocols

The 2-wire transmission lines, A and B, which link devices are balanced lines. Balanced in a sense that when A-line carries a voltage, B line carries the complement of the voltage or vice versa. This balancing is technically called Balanced Differential signaling and it provides common-mode noise cancellation. So, expect RS-485 to have a higher noise immunity. When no data is being transferred, the two transmission lines balance-out, or their voltages cancel each other out. When there is data on one of the lines, an electrical imbalance is created and this is picked up and amplified by the receiver. The RS-485 specifies that the cables used as transmission links should be a twisted-pair cable and the data format used is the same as one of RS-232.

We have used RS485 communication in many of our previous Arduino Projects and Raspberry Pi projects. If you are interested in knowing how to use RS485 communication between Arduino and Raspberry Pi, you can check out the article.

Difference between RS232 and RS485 Communication Protocols

RS232 Communication Protocol

RS-485 Communication Protocol

It is used for shorter distance and a lesser data rate

It is used for longer distance with a higher data rate

It has a maximum cable length of 50 feet and a maximum data rate of 20 Kbps

It has a maximum cable length of 4000 feet and a maximum data rate of 100 Kbps

It lowers the noise immunity

It offers higher noise immunity

It uses single-ended lines or unbalanced signaling

It uses a balanced differential signaling technique

RS-232 is used for connecting only two devices.

RS-485 is designed for multi-point systems

Operating Distance and Data rates:

RS-232 covers a shorter distance and a lesser data rate between the two. It has a maximum cable length of 50 feet and a maximum data rate of 20 Kbps while RS-485 extends to a distance of up to 4000 feet and a maximum data rate of 100 Kbps. This explains why RS-232 is used for connections within a short-distance range and RS-485 is used for longer distances with higher data rate requirements.

Electrical Signaling Techniques:

Electrical Signaling Techniques is an important parameter that determines the noise immunity of the two protocols. In RS-232, single-ended lines or unbalanced signaling is used and this lowers the noise immunity of the standard against interferences such as ground loops. Higher noise immunity is offered by RS-485, as it uses a balanced differential signaling technique that awards the user with common-mode noise cancellation.

Number of Drivers and Receivers:

Ideally, the more devices we can connect, the better. RS-485 is designed for multi-point systems, where multiple drivers and receivers are connected and RS-232, on the other hand, is used for connecting only two devices.

Network Complexity:

The trade-off of connecting multiple devices is increased network complexity. RS-232 is easier to implement as there is a lesser number of receivers and drivers to handle. It really is a simple and cheap solution.

Voltage requirements:

The RS-485 receiver determines the logic level of the data received by comparing the signal levels of transmission lines A and B. Logic 1 state occurs when line A is at least 200mV more positive than line B and Logic 0 state occurs when line be is at least 200mV more than Line A. The standard declares voltage differences less than 200mV as undefined. Buckle-up the voltage difference to a minimum of 200mV if you want data to be detected in RS-485 topology.  In RS-232, no two-wire comparisons are made since data is carried in only one wire and the other wire is a ground reference. Here, Logic 0 means a voltage of more than +3V, and Logic 1 means a voltage of more than -3V. Any voltage level between the two thresholds is undefined.

Summary of RS232 vs RS485

Let’s say, Mr. X wants to connect a modem to his PC and the distance between the two devices is a little over 15 feet. Mr. X does not like complex things and he prefers a cheaper solution. Between RS-232 and RS-485 protocols, which one should Mr. X use? RS-232, of course!

If applications require connecting multiple systems, higher data rates, more noise immunity, and the distance is long, then RS-485 is a more suitable candidate. The same way “the customer is king” in the business world, the application is king when choosing which protocol to use. 

Have any question realated to this Article?

Ask Our Community Members