1 Introduction
RS-232 serial communication is a standard developed in the early days to promote public telephone network communication. It is currently the most widely used standard bus in asynchronous communication and is suitable for the interface between data terminal equipment and data communication equipment. Figure 1 shows a simple schematic diagram of RS-232 serial communication. However, since there is a common signal ground (GND) between the transmitter (TXD) and the receiver (RXD), double-ended signals cannot be used, which may cause common-mode noise to couple into the signal system. Therefore, designers have to use higher transmission voltages for transmission. In addition, the signal transmission speed of this transmission method is up to 20kB/s, and the longest distance is only 15m. Obviously, such transmission speed and distance can no longer meet the requirements of modern network communication. In order to enable many devices with RS-232 communication interfaces to achieve long-distance serial communication while minimizing hardware costs and software workload, the author has developed a long-distance serial communication system with photoelectric isolation function by using a current loop to interface with RS-232.
2 20mA current loop data transmission signal principle
The 20mA current loop serial interface is also a widely used interface circuit. Its serial communication interface circuit is shown in Figure 2. Since it has not formed a formal standard, the data transmission equipment of general computers does not have this interface. However, its interface circuit is simple. The four wires of sending positive, sending negative, receiving positive and receiving negative respectively form the input current loop and the output current loop. When sending data, the loop is regularly turned on and off according to the logic 1 and logic 0 of the data (the switch is used to indicate the presence or absence of current in Figure 2). The biggest advantage of the current loop serial communication interface is that the low impedance transmission line is not sensitive to electrical noise, and it is easy to achieve photoelectric isolation, and the transmission distance is very long.
3 Circuit loop interface with RS-232 serial communication circuit
Combining the above characteristics of current loop transmission, and making full use of the RS-232 serial communication port of the device itself, the author designed an interface circuit as shown in Figure 3 to convert RS-232 signals into current loops for signal transmission. The ICL232 chip in Figure 3 is used to complete the adjustment between the RS-232 interface signal and the TTL level signal. The sending end (TXD) signal of the RS-232 bus is converted into a TTL level signal by the ICL232 chip, and then driven by the chip SN75452 through an optical coupler (4N25). On the transmission line, digital signals are transmitted in the form of current or not. Similarly, at the receiving end, the current signal is shaped by the optical coupler and the inverter. After forming a TTL level signal, it is conditioned by the ICL232 chip, and then the generated standard RS-232 level signal is sent to the receiving end (RXD) of the RS-232 serial communication to complete the sending and receiving of serial communication. As shown in Figure 3, the transmission and reception of the current loop are isolated from the ground. Even if the transmission line is subject to strong interference, the standard RS-232 communication interface devices at both ends of the communication will not be affected, thereby isolating the communication line from the equipment and between the equipment, ensuring the safety of the equipment. Using this method to transmit signals not only has a long transmission distance (at a speed of 9.6kB/s, the transmission distance can reach more than 1km), but also has a strong anti-interference ability, which can ensure the normal operation of communication even in very harsh environmental conditions.
4 Application Examples
In the sewage treatment monitoring system of a five-star hotel, the circuits at both ends of the transmission line in Figure 3 are made into two circuit boards, one of which is placed at the computer end to convert the computer serial port signal into a current loop signal and send it out or convert the current signal into an RS-232 level signal for information reception; the other is placed at the programmable controller (PLC) end to convert the current signal into a standard RS-232 signal and send it to the serial port of the PLC or convert the signal sent by the PLC serial port into current and send it out through the current loop to realize the serial communication between the computer and the PLC. The system working diagram is shown in Figure 4. The adoption of this solution not only overcomes the phenomenon of more communication errors when using RS-232 serial communication alone, and the complete failure of communication when a high-power electric pump is started or thunderstorms occur, but also avoids the problem of frequent ring damage of the serial port of the PLC and the computer, thereby realizing the dual functions of isolation and long-distance communication. At the same time, this method has simple software programming (same as the RS-232 standard interface) and low hardware cost (only about 150 yuan is required). Compared with the RS-422 bus currently used to solve long-distance serial communication, its performance-price ratio has been improved by dozens of times or even more. At present, the communication interface designed by the author has been running for two years without any problems.
In addition, in the automatic detection system of air-conditioning motor parameters, most of the electrical parameter test equipment has RS-232 interface, and the central control computer of the system generally exchanges information and collects data with each device through the serial port. However, test equipment such as power meter, insulation resistance tester, leakage current tester, etc. have high-voltage signals, which often pass through the ground wire to the computer during serial communication and burn the serial port in the computer. In this case, the scheme in Figure 3 can be used to effectively isolate the common ground wire between the computer and each test equipment, ensuring the communication security of the detection equipment and the computer.
The circuit structure and implementation principle of the scheme shown in Figure 3 are relatively simple. Compared with other types of serial communication buses such as RS-422, RS-423, and RS-449, this scheme has the advantages of low cost (it can make use of the original RS-232 interface of the equipment), simple interface, good software support, simple programming, versatility and practicality, etc., especially in the field of communication engineering applications, it has high practical value.
Previous article:Application example of pro-face touch screen and PLC communication in water purification system
Next article:System Diagnosis Technology Based on PROFIBUS Fieldbus
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Radio beacon-guided drones can detect toxic gases
- Studying the Road to Electric Motor Driving-5: Vector Addition and Subtraction
- Push-up training with the expert mode user program
- 【Perf-V Review】+ Design of simple functional programs (1)
- Detailed explanation of ZigBee networking principle
- Recommend and get a gift! Courses that you can't help but watch twice or three times
- EEWORLD University ---- Linux shell script application
- LSM6DSO(X) sensor driver key code analysis: read_data_polling routine (I)
- ATK-HC05 Bluetooth Serial Port Module
- LIS3DE triaxial accelerometer package and code