“In the small-scale control site for the production of acid anhydride, it is necessary to monitor the temperature and pressure of each reactor in real time and keep them within the specified error range. Because there are many equipments to be controlled, the distance between each other is relatively long, and there is strong industrial interference on site, a small size and strong anti-interference ability single-chip microcomputer is used as the upper computer and the field controller to form a distributed data acquisition and control system .In this system, the upper computer and the field controller are connected by a communication network, and each measurement and control unit works independently to complete parameter measurement and control; and in the main control room, the host monitors the working status of each field measurement and controller.
Authors: Xing Yusheng, Ren Quanmin, Yin Xiangjie
In the small-scale control site for the production of acid anhydride, it is necessary to monitor the temperature and pressure of each reactor in real time and keep them within the specified error range. Because there are many equipments to be controlled, the distance between each other is relatively long, and there is strong industrial interference on site, a small size and strong anti-interference ability single-chip microcomputer is used as the upper computer and the field controller to form a distributed data acquisition and control system . In this system, the upper computer and the field controller are connected by a communication network, and each measurement and control unit works independently to complete parameter measurement and control; and in the main control room, the host monitors the working status of each field measurement and controller. Send control commands to each extension and Display and store the data of the entire production process in a unified manner. In this system, the master-slave RS-485 serial communication standard is adopted.
1 MCU communication network
The RS-485 serial bus interface standard transmits signals in a differential balanced manner. The driver at the sending end converts the TTL level signal into a differential signal output, and the receiver at the receiving end restores the differential signal to a TTL signal, which has a strong anti-commons Mode interference capability, while the receiving sensitivity is also very high; the communication distance can reach 1200 m when the transmission data speed reaches 100 kb/s; it allows one transmitter on a pair of twisted pairs to drive multiple load devices, with simple equipment and low cost And easy to maintain. Therefore, the bus standard is generally used for data transmission in industrial field control systems.
In this communication system, under the control of the master, the master and slave can communicate with each other through a software protocol. And in a multi-machine communication system, there is only one single machine as the master, each slave cannot communicate with each other, and even if there is information exchange, it must be forwarded through the master. The single-chip computers communicate through the RS-485 bus, and the host sends commands to the slaves through roll call to realize the master control of the system. The host must continuously poll the slaves while performing tasks, so as to monitor the status of the slaves, receive requests from the slaves, or send commands to the slaves.
The overall structure of the communication system is shown in Figure 1.
In order to ensure that the normal transmission signal is clean and free of burrs, a 120 Ω matching resistor is connected to the end of the bus to absorb the reflected signal on the bus. The cable uses a two-core shielded cable, and the shielded end is connected to the device case. To avoid interference, each device should be grounded.
2 Design of the main controller
The main controller realizes the direct control of each field controller through the serial communication interface, and is mainly used to realize the man-machine dialogue function. Since the real-time requirements of the system are not very high, in order to reduce the area of the circuit board and reduce the occupation of the MCU’s port lines, a chip with small size, few pins, and serial input/output is selected.
The host selects 8051 single-chip microcomputer. Because the host must complete data storage and require a power-down protection function, the 8051 needs to expand the external memory. Serial EEPROM is gradually being used in multi-functional intelligent instruments and meters that require less speed due to its small size, low power consumption, low price, high reliability, and simple connection. In this system, the serial EEPROM 24C64 of the 24 series is selected. Because port P0 has no internal pull-up resistor, add a 10 kΩ pull-up resistor when used as an I/O port.
The keyboard uses interrupt scan mode. When a key is pressed, INT0 is low, and an interrupt request is sent to the CPU, and the keyboard interrupt service routine is entered for key recognition and execution of the corresponding function program. Using the serial port static drive mode, using 74LS164 serial input, parallel output 8-bit shift register as the segment code driver, each nixie tube uses a 74LS164, and 4 pieces are connected in series to form a 4-digit LED display.
Each serial piece is programmed by software to realize the transmission of clock and data.
The hardware circuit of the main controller is shown as in Fig. 2.
3 Field controller design
Each on-site controller is an independent system. It receives the analog signal output by the sensor (temperature or pressure) and compares it with the parameters required by the process to obtain the magnitude of the signal correction. The output analog signal is used as the input signal of the solenoid valve to control the flow rate (gas or water vapor), so as to achieve the control of temperature or pressure. Figure 3 is its hardware circuit.
The one-chip computer chooses 20 feet AT89C2051. AT89C2051 is a kind of high-performance single-chip microcomputer produced by ATMEL company in the United States. It is low in price and highly compatible with the MCS 51 single-chip microcomputer produced by Intel. AT89C2051 integrates a multifunctional 8-bit CPU and 2 kB flash memory on a chip, simplifies the output port, and forms a single-chip microcomputer with only 20 pins, which is functionally equivalent to Intel’s 8031 minimum application system.
The A/D conversion chip with serial input and output is widely used in industrial measurement and control systems because of its simple wiring and long transmission distance. ADC0832 is an 8-bit successive approximation analog-to-digital converter with serial input and output. Its analog-to-digital conversion process and data output process are carried out under the control of an external clock pulse, so the analog-to-digital conversion speed is relatively low, but it can Meet the requirements of this system. In this system, DI is fixedly connected to the high level, so that the control word input by the DI terminal is “111”, so that the CH1 of AD0832 is a single-ended input working mode, and CH0 does not work.
Similarly, for D/A conversion, a conversion chip with serial input and output is also used. TCL5615 is a product of Texas Instruments. It is a digital-to-analog converter with a serial interface. Its output is a voltage type, and the maximum output voltage is twice the value of the reference voltage. With power-on reset function, the DAC register is reset to all zeros when power-on. The clock and data transfer of ADC0832 and TCL5615 are realized by software programming.
4 Communication software design
The system communication software consists of main controller (host) communication software and field controller (slave) communication software. Because the on-site controller still needs to complete the signal monitoring and control, in order to improve work efficiency, the interrupt control method is adopted during the sending and receiving process of the master and the slave.
4.1 Host communication software design
The communication function of the master mainly includes calling each slave and sending control commands to each slave. When the host computer wants to send data, it first calls the corresponding subroutine to complete the initialization, parameter preset and connection with the slave before sending the data. The actual data sent is arranged in the interrupt service routine. After the main program is called, continue to do its own work, and then only need to check the status of the set flag to know whether the data has been sent.
4.2 Slave communication software design
The slave machine usually collects and controls the data of the monitored object. When there is a serial interrupt, it executes the serial interrupt service program to determine whether it is the address information of the local extension. If it is the address of the local machine, it is converted to receive control commands and execute Corresponding operation: If it is not the local address, exit the interrupt.
The flow chart of the communication software is shown as in Fig. 4.
Distributed data acquisition system, each slave machine completes parameter measurement and control tasks, not only can replace analog instruments to complete conventional process control, but also can perform complex calculations and sequence control, and process input and output data on site to reduce The amount of information transmission is reduced, and the requirements on the upper computer are reduced; the host is directly connected with the process through the data channel to complete the optimization of production planning, management, and decision-making, thereby realizing the optimal automatic control of the entire production process. The system can be further improved and expanded, and can be applied to a variety of distributed control systems to realize the low cost and high reliability of multiple remotely distributed equipment.
The Links: LC150X01-SL01 MRF898
Similar LCD Inverter
What do you think of the 48V technical solution for automotive electronics?
Qualcomm and Zhanrui chips jointly launched 5G chip commercialization and entered the “Warring States Era”
TCL 10 Pro mobile phone and AC1200 WiFi router win international design awards