Maker.io main logo

What is RS 485?

2023-12-27 | By Maker.io Staff

RS-232 and RS-485 are two of the best-known RS communication standards. Another article investigated the characteristics, benefits, and drawbacks of RS-232, and this article provides an overview of RS-485 — a more modern serial communication standard widely used for communication over long distances in industrial and automation applications, known for its robustness and immunity to electrical noise.

What is RS-485?

Electrical Characteristics

The RS-485 standard defines that devices must transmit data using differential signaling over a twisted pair of impedance-matched signal wires A and B. The communication partners encode bits as the voltage difference between the two wires rather than a single wire and a common ground. The use of differential signaling in combination with physically twisted wires increases the robustness against electrical interference, which in turn facilitates reliable long-distance transmissions in electrically noisy environments such as factories.

To represent a logical high state (called mark state), the voltage on wire A must exceed the level on line B. Conversely, logical low states can be encoded by pulling the voltage on wire B higher than the voltage present on wire A. Effectively, the voltage levels on lines A and B must be inverted, and the exact voltage levels are not defined. Instead, the focus is on the voltage difference between the signal transmission wires.

A typical RS-485 bus can support as many as 256 communication partners and cable lengths of up to 4,000 ft. However, reaching the maximum transmission rate of around 10 MBit/s usually requires shorter wire lengths of up to 40 ft.

Communication Modes in RS-485

While RS-232 only allows for communication between two parties, RS-485 is multi-point, meaning that more than two devices can share the same bus and exchange information. Each device on an RS-485 bus has a unique address and can send and receive data. Additionally, RS-485 can operate in half-duplex or full-duplex mode.

In half-duplex mode, communication is bidirectional but not simultaneous, meaning that devices must take turns transmitting and receiving. Building a half-duplex capable bus requires a single pair of signal wires. In full-duplex mode, simultaneous bidirectional communication is possible using two pairs of wires. However, the added complexity is often unwanted and unnecessary in many cases.

Messages in RS-485 and Plug/Socket Configurations

Unlike many other communication protocols, RS-485 solely defines the electrical characteristics that devices must adhere to in order to communicate with other RS-485-compatible equipment. Regarding the OSI layer model, which is often used when discussing and comparing communication standards and protocols, RS-485 is a physical layer standard that resides on the first layer of the OSI model. Therefore, no general higher-level protocol or message format devices must be adhered to when transmitting data.

Similarly, there’s no agreed-upon standard plug or socket to connect RS-485-capable devices to a bus. Instead, every manufacturer can design a custom format in which their devices transmit data as long as they adhere to the electrical characteristics described in the standard. Common connector types, such as RJ-45 and DB-9, are often used in RS-485-capable equipment.

Unfortunately, the protocol’s focus on the physical layer implies that devices of different manufacturers can often not correctly exchange information due to differences in how they package the bits transmitted on the two signal lines. Higher-level industry standards that sit on top of the physical layer in the OSI model, like Modbus, are commonly employed to overcome this problem, however, and facilitate data exchange between devices of various manufacturers.

Summary

RS-485 is a physical-layer standard that describes the electrical characteristics of a multi-point serial communication bus. Devices on the bus usually have a unique address, and they exchange information via differential signaling over a stranded pair of wires, A and B. Differential signaling encodes the transmitted bits using the voltage difference between the two wires.

RS-485 allows data exchange in half-duplex and full-duplex mode. In half-duplex communication, while all devices can transmit and receive data, they must take turns when using the bus. In full-duplex data exchange, multiple devices can send and receive information simultaneously. A second stranded pair of wires is required, however, when aiming for full-duplex communication in RS-485.

As RS-485 is a purely physical protocol, the standard doesn’t restrict or define the composition of message frames. Instead, higher-level industry standards sit on top of RS-485 to overcome this problem and facilitate data exchange between devices of miscellaneous manufacturers.

TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum