RS485 Wiring, Communication, and Differences with RS232
RS485 is a widely used communication method for data acquisition and control systems. It is a flexible communication standard. It lets devices connect to a local network. Multiple RS485 wiring devices can share the same bus to link with each other.
Understanding RS485
RS-485 wiring can use a two-wire or four-wire system. The four-wire setup is mainly for point-to-point communication and is rarely used today. Instead, the two-wire method is more common. It has a bus topology that supports up to 32 nodes on the same bus.
Characteristics of RS485
RS-485 electrical characteristics show logic “1” with a voltage difference of +(2-6)V. Logic “0” is shown by a voltage difference of -(2-6)V. This lower signal level, compared to RS-232-C, helps protect the interface circuit from damage. It is also compatible with TTL levels, making it easy to connect to TTL circuits.
RS485 has a maximum speed of 10 Mbps and is very good at resisting noise. The standard maximum distance for RS485 is about 4000 feet, which is about 3000 meters. However, in real use, this distance is often limited to around 1200 meters. Unlike the RS-232-C interface, which connects only one device, RS485 can connect up to 128 devices. This makes it easy to set up a network using just one interface.
RS485 Communication Principles
The RS485 signal splits into two lines, positive and negative, often called A and B. These signals are restored at the receiver. The positive level between drivers A and B is +2 to +6V, which means logic “1”. The negative level is -2 to -6V, which means logic “0”. There is also a signal ground, labeled C, and an “enable” terminal. This terminal controls whether the driver is connected or disconnected from the transmission line. When active, the “enable” terminal puts the driver in a high-impedance state, different from logic “1” and “0”.
Communication Logic
The receiving end connects AA and BB using balanced twisted pairs. A level above +200mV between (DT) = (D+) – (D-) means positive logic. A level below -200mV means negative logic. The receiver usually works within a range of 200mV to 6V.
For example, sending “1” means the driver gets a high level from the controller. This makes terminal A output high and terminal B output low. The receiver sees this as high on side A and low on side B. When you subtract these, you get “1.”
On the other hand, sending “0” means low levels at receiver A and high levels at B. Subtracting these gives you “0.”
RS485 Wiring Overview
Standard twisted-pair cables work well in most situations. Coaxial cables with shielding are better for high-demand areas. When using the RS485 interface, the baud rate and line length have an inverse relationship. This means that as one increases, the other decreases. Signal distortion and background noise greatly affect this line length.
RS485 can send data up to 1200 meters in theory. However, in real use, the range is often shorter due to environmental factors. If you need to cover longer distances, you can use signal repeaters to help extend the range.
You can add up to eight repeaters. This lets RS485 send signals up to 9.6 kilometers. For longer distances, optical fiber is a good choice. You need photoelectric converters at both ends. Multimode fiber works for distances of 5 to 10 kilometers. Single-mode fiber can go as far as 50 kilometers.
RS485 System Basics
Beyond the hardware connection, setting up a data protocol is key for smooth communication between devices. This protocol helps the receiving end understand incoming data. For RS485 communication, Modbus is the most widely used protocol.
Wiring RS485 and Analog Sensors
**What is the Modbus Protocol?**
Modbus is a well-known communication protocol. It helps devices from different manufacturers share data, mainly in industrial settings. The protocol acts like a software “language” for devices to communicate. Modicon, now part of Schneider Electric, developed Modbus in 1979. It was first made for communication with programmable logic controllers (PLCs). Over the years, Modbus has become a standard for industrial communication because of several key benefits:
– It is openly published and free from copyright restrictions.
– Deployment and maintenance are straightforward.
Device manufacturers have few restrictions on making modifications or local adaptations.
With Modbus, up to 240 devices can talk on the same network. For example, a temperature and humidity sensor can send its data to a supervisory computer using this protocol. In SCADA systems, Modbus links supervisory computers and remote terminal units (RTUs). SCADA stands for Supervisory Control and Data Acquisition.
Modbus works like a common language for devices, just as human languages help us communicate. It uses transmission methods like RS485 or RS232. Although the same protocol can use different methods, two different protocols cannot share one transmission line.
**Types of Modbus Protocols**
There are different types of Modbus used in many industrial applications. Each type is designed for specific system needs.
**Differences Between RS485 and RS232**
While both RS485 and RS232 are communication standards, they differ in significant ways:
– **Transmission Design**: RS485 wiring uses balanced transmission with differential signaling. In contrast, RS232 uses unbalanced or single-ended communication.
– **Range**: RS485 can send signals up to 3000 meters. In contrast, RS232 can only send signals about 20 meters.
– **Network Capacity**: RS485 wiring can connect up to 32 devices at the same time. In contrast, RS232 only allows one device to connect to another.
– **Signal Voltage Levels**:
RS485 uses voltage levels between +2V and +6V for logic 1. It uses -6V to -2V for logic 0.
In comparison, RS232 uses -15V to -5V for logic 1. It uses +5V to +15V for logic 0.
– **Cabling**: RS485 needs two wires to communicate. RS232 uses three wires.
– **Communication Speed**: RS485 can reach speeds of up to 10 Mb/s. In contrast, RS232 is limited to 20 Kb/s.
It is important to know these differences when choosing the right standard for specific uses. Each standard meets different needs effectively.
1. **Transmission Distance**
The RS232 protocol supports a short transmission distance. Its theoretical limit is 15 meters. In real use, it can go up to 30 meters, but usually not more. On the other hand, RS485 has a much longer range. Theoretical limits can reach 1200 meters. In some cases, it can even reach 2500 meters.
2. **Signal Lines**
RS232 uses three wires for communication: one for sending, one for receiving, and a ground wire. In contrast, RS485 usually uses two wires for transmission. These wires are called A and B. They carry the same signal but in opposite directions. The sender splits the signal, and the receiver puts it back together at the destination.
RS232 has unidirectional data lines and one ground wire. This makes it more prone to interference than RS485. RS485 uses differential signaling, which helps it send signals over several kilometers. It is better at resisting noise. In contrast, RS232 can only work over shorter distances because it is not as good at handling interference.
3. **Maximum Baud Rate**
RS232 has a maximum baud rate of 19200 bps. This speed is slow but works for many engineering tasks. In contrast, RS485 offers a much higher data rate of up to 10 Mbps. This allows for faster communication in areas like industrial control systems and engineering signal transmissions.
4. **Electrical Signal Technology**
One important factor for checking reliability is noise immunity. RS232 uses single-ended or unbalanced signaling. This makes it more vulnerable to issues like ground loops, which reduces its noise resistance. On the other hand, RS485 uses balanced differential signaling. This improves its ability to resist noise. This design helps cancel out common-mode noise, leading to better performance in noisy environments.
5. **Device Connectivity**
RS232 connections can only connect two devices—one transmitter and one receiver. On the other hand, RS485 supports multipoint communication. This means many transmitters and receivers can connect on the same network.
6. **Network Complexity**
With fewer connected devices, RS232 networks are easier to set up and manage. This makes them a cost-effective choice for simple setups. On the other hand, adding more devices to an RS485 network makes it more complex. However, RS485 offers better scalability for larger systems that need many connected parts.