Anti-interference design of serial communication system based on intelligent communication controller

The safety of the operation of the power system is closely related to the operating state of the system at that time. For the power dispatching department, if it can fully grasp the operating state of each part of the power system in real time and conduct remote monitoring to ensure the safety and stability of the system 3. Economic operation is undoubtedly very important. Electric power remote monitoring generally uses serial communication to ensure reliable data transmission is one of its most important technical indicators. Due to the harsh environment of the industrial site and the long-distance transmission of the power distribution system, interference is the main cause of accidental errors and affecting the reliable operation of the entire system. Improving the anti-interference ability of the system is an important research direction of remote power monitoring.

System Overview

This system is an industrial power distribution measurement and control system in the form of an upper and lower computer. According to the functional needs, the lower computer selects the Advantech IPC-610 industrial control computer (IPC: Industrial Personal Computer) with more powerful control functions. It has nearly 20 ISA The passive bus backplane of the slot and PCI slot, and the corresponding CPU board, I / O board, etc., can be used to insert the various modules of the system such as A / D conversion, Video acquisition, communication, I / O port input and output, etc. The form is combined like building blocks, which can be easily expanded into a complex control system. Two PC-6313 multi-function analog input / analog output boards are selected, and corresponding sensors and actuators are connected to complete the work undertaken. Each lower computer can detect and control the multi-channel analog quantity and the switch quantity as required. This system detects 64 analog quantities (voltage, current, power factor, active power, reactive power, etc.) and 16 switching quantities (each outlet switch on / off status, compensation capacitor status, etc.) according to needs. 16-channel switching value for output control (switch, solenoid valve, relay). Its structural block diagram is shown as in Fig. 1.

Figure 1 Block diagram of lower computer system

The upper computer can be selected as an ordinary PC, or the same IPC as the lower computer can be selected according to the system usage environment. The host computer can issue commands to communicate with any connected lower computer, collect analog and switch information transmitted by each lower computer, perform relevant analysis, summary, report generation and other processing, and treat each lower computer subsystem Carry out monitoring and macro scheduling.

In the distribution measurement and control system, the distance between the upper and lower computer is far. To improve the anti-interference ability of the system, the RS-485 serial communication bus standard is adopted. RS-485 bus adopts differential transmission, which has the characteristics of long transmission distance, many contacts and few connections, and has become the first choice for data transmission in distributed monitoring systems. IPC does not have RS-485 interface, so it needs to be equipped with RS-232 / RS-485 interface. This system uses ICP DAS 7250/7521 converter. Among them, 7521 is an intelligent communication controller with an embedded CPU, which can reduce the amount of system programming and improve the reliability and real-time performance of the system. The system actually uses the 7521D module. There are five seven-segment digital tubes on the 7521D module. Use a program to control its on and off to monitor the operation of the system. Otherwise, the 7521D and 7521 have the same function. The introduction later will no longer distinguish between 7521 and 7521D.

The connection schematic diagram of the communication module of this system is shown in Figure 2. It is designed for one upper computer to control eight lower computers, which can also be expanded according to the actual needs of the power distribution system.

Figure 2 Schematic diagram of network connection with intelligent communication module

7521 Intelligent Communication Controller Introduction

7521 Function Introduction

7521 is one of the 752N intelligent communication controllers of ICP DAS, which can support one RS-232 device. The module is embedded with AMD's Am188TMES controller, equipped with MiniOS7 embedded operating system. You can assign a unique address to any RS-232 device on the RS-485 network. The module contains dual watchdog circuits: a hardware module watchdog and a software host watchdog to protect the host and 7521 module. At the same time, its RS-485 terminal has 3000V high voltage isolation, which can effectively prevent industrial noise interference.

The 7520 module is an ordinary RS-232 / RS-485 level converter and does not have intelligent communication functions. But its RS-485 terminal also has 3000V high voltage isolation. I will not repeat them here.

7521 working mode

7521 has two working modes, one is development work mode, and the other is normal work mode.

In development mode, after connecting the COM1 port (RS-232) of 7521 to the serial port of the PC and setting the communication format, the 7521 will use the keyboard of the PC as its standard input and the monitor of the PC as its standard output. In this way, you can configure the system parameters and download user programs.

In normal operating mode, the 7521 will execute the program pointed to in the AUTOEXEC.EXE file. When used as an intelligent communication controller, the 7521 has two files pre-installed in its FLASH ROM: AUTOEXEC.EXE and 7521.EXE. After booting, the AUTOEXEC.EXE file can automatically load 7521.EXE to complete the initial configuration of intelligent communication . Users can also download their own applications to 7521 to change the functions of 7521.

7521 Module Function Command Brief

The 7521 command is divided into two parts: the command sent from the host computer to the module and the module's response after receiving the command.

The command format of the sending part: (leading character) (address) (CHK) (CR), each item is explained as follows.

â‘  (leading character): 1 byte, indicating the type of command. The control commands of the module are usually divided into several different types, and some special characters such as $, #, ~, etc. are used to classify by leading characters.

â‘¡ (Address): Two bytes, indicating the module to which the command will be sent. The address range is 00 ~ FF, so there are 256 addresses.

â‘¢ (Command): 1 or more bytes, specify the command executed by the module. These commands usually use different numbers to indicate different functions.

④ (CHK): Redundancy checksum (CheckSum), use the program to add the address values ​​of all transmitted characters in the ASCII collation code, keep the last byte, and split it into two characters before and after as the check value .

⑤ (CR): Enter key, vbCr in VB, indicating the end of the command.

After receiving the command, 7521 will return a response string to the host in most cases. The response string format: (leading character) (address) (data) (CHK) (CR)

The response string (data) is only different from the command string format, and the rest are the same. The data part should be interpreted according to specific commands.

The 7521 has 30 practical commands and provides a relatively complete driver. Users don't need to write communication protocol by themselves, they just need to install 7521.exe and related files on the main station computer according to the operation manual, connect the computer and 7521 module correctly, and start working after initialization.

Anti-interference design of upper and lower computer communication system

Although the RS-485 bus standard has strong anti-interference ability, in the actual use process, due to the harsh field environment and electromagnetic interference, it will still affect the reliability of communication. The most typical problem is that the data transmission is wrong. Code, serious crashes may occur. Therefore, it is very important to take necessary measures to improve reliability and anti-interference ability. In this system, anti-jamming design is carried out from two aspects of hardware circuit and software design.

Anti-interference measures of system communication hardware

On the hardware circuit, it is mainly considered from the aspects of isolation, interface standards and wiring:

(1) The RS-485 interface of this system adopts the combination of balanced driver and differential receiver, and uses shielded twisted pair at the same time, which has good anti-noise interference performance.

(2) In the communication process, due to impedance discontinuity and impedance mismatch, it may cause signal reflection and affect the transmission distance of the signal. The characteristic impedance of the twisted pair is generally between 110 and 130Ω. The system is connected to a 120Ω matching impedance at the end of the transmission line to eliminate signal reflection.

(3) The 7520/7521 selected in this system are RS-232 / RS-485 conversion interfaces with 3000V isolation, as shown in Figure 3.

Figure 3 7520/7521 module internal circuit diagram

It can be seen from Figure 3 that the RS-485 terminal and the power terminal are in the same area, and the RS-485 terminal uses access power. The RS-232 terminal is the converted power supply inside the module, and the power supply has 3000V isolation measures before and after conversion. Since most sources of noise come from the power supply end, powerful noise will enter the inside of the module along the power cord, but as long as this interference is within the protection range, it can ensure that the RS-232 end device is not damaged, so as to protect the main computer .

The protection principle of the 7521 is the same as that of the 7520, which can protect the lower computer from noise interference in the RS-485 network.

RS232 Cables

rs232 cable,rs232 to usb,rs232 driver

Dongguan Bofan technology Co., LTD , https://www.pengliandz.com

This entry was posted in on