What is the difference between RS232 and RS485?

In embedded systems, many communication interfaces/protocols are frequently used, such as RS232, RS485, lightweight TCP/IP protocol, LoRa, Zigbee, etc. This article will share with you the differences between the two most commonly used interfaces in embedded development, RS232, and RS485.

Introduction to RS232 and RS485

RS232 is a standard for serial communication developed jointly by the Electronic Industries Association (EIA), Bell System, modem manufacturers, and computer terminal manufacturers in 1970. Its full name is “Interface between Data Terminal Equipment (DTE) and Data Communication Equipment (DCE) for Serial Binary Data Exchange.” The standard specifies the signal content of each pin of the connector and the electrical levels of various signals. RS232 is an asynchronous transmission standard interface, and the RS-232 interface usually appears in the form of 9 pins (DB-9) or 25 pins (DB-25).

RS485 is a standard that defines the electrical characteristics of drivers and receivers for balanced digital multipoint systems. The standard is defined by the Telecommunications Industry Association and the Electronic Industries Alliance. Digital communication networks that use this standard can effectively transmit signals in remote distance conditions and in environments with high electronic noise. RS-485 makes it possible to configure inexpensive local networks and multi-branch communication links. RS485 has two wiring methods, two-wire, and four-wire. The four-wire method can only achieve point-to-point communication and is rarely used. Nowadays, the two-wire method is commonly used, which is a bus-type topology structure. Up to 32 nodes can be connected to the same bus.

The main differences between RS232 and RS485 are:

  • Connection method
  • Electrical signal levels
  • Transmission distance
  • Maximum data transfer rate
  • Network configuration (multi-machine communication)

The specific content is as follows:

Connection Method: RS232 most commonly uses a three-wire connection: one transmitting line, one receiving line, and one ground line; RS485 generally uses a two-wire transmission: A and B two transmission lines.

Voltage Level: RS232 logic 1 is -3V to -15V, logic 0 is +3V to +15V; RS485 -2V to -6V represents logic 0, +2V to +6V represents logic 1, and the voltage is the voltage difference between A and B.

Transmission Distance: RS232 has a limited transmission distance, and the theoretical standard value for transmission distance is 15 meters. In practical engineering, the maximum transmission distance does not exceed 30 meters. RS485 has a longer transmission distance than RS232, and the theoretical standard value for transmission distance is 1200 meters. In practical engineering, it can reach up to 2500 meters.

Maximum Baud Rate for Data Transmission: RS232 has a lower transmission rate, and the highest baud rate is 19200bps. Although the transmission speed is slow, it is still practiced in many engineering applications. RS485 has a higher transmission rate, up to 10Mbps. The transmission speed is much faster and is often used for control signal transmission in engineering.

Networking (multi-machine communication): RS232 cannot achieve multi-machine communication because RS232 is a full-duplex communication method, and the general connection method is TTL level. When the line is idle, the TTL levels of the sending and receiving are both high, and the RS232 level obtained after the level conversion chip is always low. Assuming A is the master, and B and C are the slaves, there is no problem when A wants to send a signal to B because A’s TXD line is connected to B and C’s RXD lines. At this time, the RXD lines of B and C are normal and in a waiting receiving (idle) state. However, if B receives a signal and wants to reply to A, B’s TXD and C’s TXD lines are both connected to A’s RXD line. B is in the state of sending data (B wants to control the change of the high and low levels of its TXD line), while C is in the idle state (C wants to keep its TXD line at a low level and unchanged). At this time, there is a communication conflict between the TXD lines B and C. Therefore, RS232 can achieve a point-to-point communication method, but this method cannot achieve networking.

RS485 can achieve multi-machine communication because RS485 is a half-duplex communication method, that is, receiving and transmitting are implemented by time division. When the bus is idle, the state needs to be kept at logic 1, that is, the voltage difference between A and B meets the logic 1 level value. Assuming that 1 is the master, and 2 and 3 are the slaves, the data line is connected in the way that 1, 2, and 3’s A are connected together, and 1, 2, and 3’s B are also connected together. There is no problem with the RS232 connection method.

Leave a Comment

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

Scroll to Top