RS485 is one of the most important electrical communication standards for industrial and long-distance serial communication. It is widely used in automation, building control, energy monitoring, motor drives, PLC systems and many other applications where reliable communication over long cables is required.
Compared with RS232, RS485 is more robust, supports longer cable runs and allows multiple devices to share the same communication line.
What Is RS485?
RS485 is an electrical standard for serial communication. It defines how signals are transmitted over a pair of wires using differential signaling.
RS485 is not a complete communication protocol by itself. It only defines the electrical layer. Protocols such as Modbus RTU are often used on top of RS485.
RS485 vs UART
Many RS485 systems use normal UART data internally.
The difference is:
- UART defines the data format, such as start bit, data bits and stop bit
- RS485 defines the electrical signaling over the cable
A microcontroller UART cannot drive an RS485 bus directly. An RS485 transceiver is required.
RS485 Differential Signaling
RS485 uses differential signaling. Instead of sending the signal compared to ground, it sends opposite signals on two wires.
These two wires are usually called:
- A and B
- D+ and D-
- RS485+ and RS485-
The receiver looks at the voltage difference between the two wires. This makes RS485 much more resistant to electrical noise than single-ended signals such as TTL UART or RS232.
A and B Naming Confusion
One of the most annoying practical problems with RS485 is that A and B are not labeled consistently by all manufacturers.
In some datasheets:
- A is the non-inverting line
- B is the inverting line
In other products, the labeling may appear reversed or use D+ and D- instead.
Because of this, if an RS485 connection does not work, swapping A and B is often one of the first tests. This usually does not damage the hardware, but it can immediately fix a reversed connection.
RS485 Transceivers
An RS485 transceiver converts logic-level UART signals to differential RS485 signals and back.
Common RS485 transceiver chips include:
- MAX485 and compatible devices
- SN75176 and compatible devices
- SP3485 and other 3.3V-compatible devices
- Isolated RS485 transceivers for industrial applications
The microcontroller connects to the transceiver using UART TX and RX pins. The transceiver connects to the cable using the differential A/B pair.
Half-Duplex RS485
Most RS485 systems use half-duplex communication. This means the same wire pair is used for both sending and receiving, but not at the same time.
A typical half-duplex RS485 connection uses:
- A / B differential pair
- Common reference ground, depending on system design
- Driver enable control pin on the transceiver
The microcontroller must enable the transmitter only when it is sending data. After sending, it must release the bus so other devices can respond.
Full-Duplex RS485
Full-duplex RS485 uses two differential pairs:
- One pair for transmit
- One pair for receive
This allows communication in both directions at the same time.
Full-duplex RS485 is less common in small embedded and Modbus RTU systems, but it is used in some industrial and point-to-point applications.
Multi-Device Bus
One major advantage of RS485 is that multiple devices can share the same bus.
A typical RS485 network has:
- One controller or master
- Multiple devices or slaves
- One shared twisted pair
- One communication protocol to manage addressing
RS485 itself does not assign addresses. Device addressing is handled by the protocol, such as Modbus RTU.
RS485 and Modbus RTU
RS485 is very often used with Modbus RTU.
In this combination:
- RS485 provides the electrical layer
- Modbus RTU defines the message format and addressing
This is common in:
- Energy meters
- Temperature controllers
- Variable frequency drives
- PLC systems
- Industrial sensors
This is why RS485 and Modbus are often mentioned together, even though they are not the same thing.
Termination Resistors
Long RS485 lines should be terminated to reduce signal reflections.
A typical termination resistor is:
- 120Ω between A and B
Termination is usually placed at the two physical ends of the bus only. It should not be added at every device.
Too many termination resistors can overload the driver and reduce signal quality.
Bias Resistors
When no device is actively transmitting, an RS485 bus can float. Bias resistors create a defined idle state so receivers do not detect random noise as data.
Biasing is also called:
- Fail-safe biasing
- Idle-line biasing
Some modern RS485 transceivers include internal fail-safe behavior, but external biasing is still common in industrial designs.
RS485 Wiring
Good RS485 wiring is important for reliable communication.
Recommended wiring:
- Use twisted pair cable for A/B
- Use a linear bus topology
- Avoid long star connections
- Terminate only at the two ends of the bus
- Keep stubs short
- Use shielded cable in noisy environments
RS485 is robust, but poor wiring can still cause communication problems.
Ground Reference and Isolation
RS485 uses differential signaling, but that does not mean ground can always be ignored.
In many systems, a ground reference wire is used along with the A/B pair. This keeps the common-mode voltage within the allowed range of the transceivers.
In industrial environments, galvanic isolation is often used to avoid ground loop problems and protect equipment.
RS485 Distance and Speed
RS485 can support long cable distances, but speed and distance are related.
General rule:
- Longer cable means lower practical speed
- Shorter cable allows higher speed
RS485 is commonly used over hundreds of meters at moderate baud rates. For short cables, much higher speeds are possible.
RS485 Compared with RS232
| Feature | RS232 | RS485 |
|---|---|---|
| Signaling | Single-ended | Differential |
| Typical Use | Point-to-point legacy serial | Industrial bus communication |
| Number of Devices | Usually 2 | Multiple devices on one bus |
| Noise Immunity | Moderate | High |
| Cable Length | Limited | Much longer |
| Protocol Built In | No | No |
RS485 Compared with CAN Bus
RS485 and CAN Bus both use differential signaling, but they are not the same.
RS485:
- Electrical layer only
- Protocol must be added separately
- Commonly used with Modbus RTU
- Simple and inexpensive
CAN Bus:
- Includes more advanced bus arbitration and error handling
- Very common in automotive and machinery
- Requires CAN controller and CAN transceiver
For simple industrial serial networks, RS485 is often easier. For automotive-style multi-node networks with strong error handling, CAN Bus is often better.
Common RS485 Problems
Typical RS485 problems include:
- A and B wires reversed
- Missing termination at long cable lengths
- Too many termination resistors
- No biasing or poor fail-safe behavior
- Star wiring instead of bus wiring
- Driver enable timing problems
- Wrong baud rate or serial format
- Missing common reference or ground loop problems
- Protocol mismatch, such as wrong Modbus address
A logic analyzer can help on the UART side of the transceiver. An oscilloscope is useful for checking the actual differential RS485 signals on the cable.
When to Use RS485
RS485 is a good choice when:
- You need communication over longer cables
- You need multiple devices on one bus
- The environment may be electrically noisy
- You are working with industrial sensors or controllers
- You need Modbus RTU communication
When Not to Use RS485
RS485 may not be the best choice when:
- You only need short-distance communication on one PCB
- You need very simple sensor wiring inside a small device
- You need automatic message arbitration like CAN Bus
- You need direct internet/network communication
For small local peripherals, I2C or SPI may be simpler. For IP networking, Ethernet or WiFi is more appropriate.
Practical Design Tips
- Use twisted pair cable for A/B
- Use proper termination at the two physical ends of the bus
- Avoid star wiring
- Keep stubs short
- Check whether A/B labeling is reversed between devices
- Use bias resistors if the bus does not have reliable fail-safe behavior
- Use isolated RS485 for industrial environments with ground differences
- Confirm the protocol settings, especially baud rate and device address
Conclusion
RS485 is one of the most useful communication standards for long-distance and multi-device serial communication. It is simple, robust and widely supported in industrial equipment.
The key point is that RS485 is only the electrical layer. A protocol such as Modbus RTU is usually needed to define addressing and message structure.
For reliable RS485 systems, correct wiring matters. Twisted pair cable, proper termination, suitable biasing, short stubs and correct A/B polarity are often more important than the software itself.
