Industrial communication RS232 how to switch RS485 communication connector

RS232 communication and RS485 communication overview

Data transmission between computer and computer or computer and terminal can use serial communication and parallel communication. The serial communication method is widely used since it has few lines and low cost, especially in remote transmission, avoiding the inconsistency of multiple line characteristics. RS-232-C interface and RS-485 interface are the most commonly used serial communication interfaces.

The RS-232 standard specifies the use of a 25-pin DB25 connector. The commonly used 9-lead signal requires only three interface lines, namely "send data", "receive data", and "signal ground." The transmission cable length should be 50 feet and the practical application is about 50 meters. Due to the earlier appearance of the RS-232-C interface standard, it is inevitable that there are deficiencies, mainly because the signal level value of the interface is high and it is not compatible with the TTL circuit; the transmission rate is low, and the baud rate is 20 Kbps during asynchronous transmission. The common ground transmission mode produces common-mode interference and is weak in noise immunity; only one transceiver can be connected to the bus.

In response to the insufficiency of RS-232-C, a new RS-485 interface standard emerged. It has the following characteristics: the interface signal level is reduced and compatible with the TTL level; the maximum data transmission rate is 10 Mbps; the resistance to common mode interference is enhanced. That is, the anti-noise interference is good; the maximum transmission distance standard value is 4000 feet, in fact, up to 3000 meters; on the bus is allowed to connect up to 128 transceivers.

RS485 network connection method

When using multiple devices, you need to use 485 network networking. The bus uses a group of twisted pairs of more than 5 types of shielded cables. The device is connected to the bus according to the 485 wiring method. Note: The equipment in the network cannot have duplicate numbers, otherwise it cannot communicate.

Industrial communication RS232 how to switch RS485 communication connector

RS-485 network requirements:

1. The network cable is recommended to use Category 5 or UTP shielded twisted pair cables. The shielding layer serves as the system ground, which can reduce electromagnetic interference and common mode interference and improve the reliability of the system.

2. Because the transceiver of 485 stipulates that the common mode voltage can work normally between -7V and +12V, exceeding this range will affect the communication, and will seriously damage the communication interface. Therefore, it must be connected to the system ground. The shielding layer in the network cable or another twisted pair cable can be used as the system ground line to connect the equipment grounds in the equipments, computers and other networks together, and they can be reliably connected to the earth from one point.

3. The communication line should be as far away as possible from the high-voltage wires. Do not run parallel to the power cables, and do not bundle them together.

4. The length of the branch line from the bus to each terminal should be as short as possible, generally not exceeding 5 meters. If the branch line is not connected to the terminal, there will be a reflection signal, which will cause strong interference to the communication and should be removed.

5. In the same network system, use the same cable to minimize the contacts in the line. The joints ensure good welding and tight packing to avoid loosening and oxidation. Ensure a single, continuous signal path as a bus.

6. The effective length of RS485 is up to 1200 meters, and the effective length of RS422 is up to 15 meters.

Industrial Communication RS232 to RS485 Communication Connector
Industrial communication RS232 how to switch RS485 communication connector

R232 to RS485 communication circuit conversion diagram

Homemade RS232-485 converter

Circuit diagram:

Industrial communication RS232 how to switch RS485 communication connector

RS232-485 converter mainly includes power, 232 level conversion, 485 circuit three parts. The 232 level conversion circuit of this circuit adopts NIH232 or can also directly use MAX232 integrated circuit, 485 circuit adopts MAX485 integrated circuit. For ease of use, the power section is designed to be passive, and the power to the entire circuit is stolen directly from the DTR (4 feet) and RTS (7 feet) of the PC's RS232 interface. Each line of the PC serial port can provide about 9mA of current, so the current provided by the two lines is sufficient for this circuit to use. Through experiments, this circuit can only work with only one of the lines. The use of this circuit must pay attention to the PC program must make the serial port DTR and RTS output high, after D3 voltage regulator to get VCC, after actual testing, VCC voltage is about 4.7V. Therefore, it is better to say that the role of D3 in the circuit is the voltage regulation function rather than the voltage regulation function.

The MAX485 controls the data input and output through two pins, RE (pin 2) and DE (pin 3). The MAX485 data input is valid when RE is low and the MAX485 data output is valid when DE is high. In the half-duplex use, usually these two feet can be connected directly, then the high or low level that the output of PC or one-chip computer can let MAX485 change between receiving and sending the state. Since both the circuit DTR and RTS are used for circuit power supply, the TX line and another channel of HIN232 and Q1 are used to control the state transition of the MAX485. Usually 9 feet of NIH232 export the high level, after Q1 inverts, make MAX485 RE and DE low and in data receiving state. When the PC sends data, the 9-pin of the NIH232 outputs a low level. After inverting the Q1, the RE and DE of the MAX485 are at the high level and are in a data transmission state.

MS008 1500puffs Vape

Guangzhou Yunge Tianhong Electronic Technology Co., Ltd , https://www.e-cigarettesfactory.com

Posted on