The Technical Requirements for Centralized Monitoring System for Communication Power Supply and Air Conditioning stipulates that the monitoring system is a multi-level distributed computer monitoring network [2], which can be generally divided into three levels, namely the monitoring center (SC-Supervision Center), monitoring. Station (SS-Supervision Station) and monitoring unit (SU-Supervision Unit). For the communication power monitoring system, it is not necessary to set up the monitoring center, so it can be simplified into a two-stage distributed structure, which is composed of the upper computer and the lower computer [1-2].
2 Discussion on networking scheme of communication power monitoring system
At present, the networking of the communication power monitoring system can mainly consider the following solutions:
The first type is a master-slave bus network that is still widely used at present. This kind of network structure is centered on the upper computer. It connects various lower-level machines with communication functions through RS485 or RS422 interface, and uses the query method to realize telemetry and remote. The letter and remote control function, point-to-point serial communication (RS232) can be used between the lower computer and the smart device. The advantage of this structure is that the small-scale monitoring system can be realized very conveniently, and the disadvantage is that the networking is limited by the communication distance.
The second is the fieldbus network, which abandons the traditional master-slave network structure and realizes a fully distributed structure in the true sense, so that each lower computer can be regarded as a peer node in the network. At the same time
The third is the Ethernet network. With the development of computer technology, Ethernet technology is currently applied in some communication power monitoring systems. The Ethernet here refers to the peer-to-peer network generated by the lower computer and the upper computer directly connected through the Ethernet. In this structure, not only the lower computers are equal, but also the concept of the computer as the "host computer". It also became very blurred. Compared with the former two schemes, it has a higher speed, but its disadvantage is that it is expensive and difficult to apply to communication power monitoring systems.
It can be seen from the above analysis that the traditional master-slave network is most suitable for the networking of the communication power monitoring system, but it must be improved due to the distance limitation. The system solves this problem by using the existing PSTN network, that is, the communication between the lower computer and the upper computer is realized through the PSTN network, and the communication between the lower computer and the smart device is realized by the RS485 forming the master-slave network.
3 communication module hardware circuit design
The lower computer acts as a direct device-oriented slave and needs to communicate with the host computer remotely. At the same time, the lower computer also serves as a host to communicate with various intelligent devices. Therefore, in this system, RS232 and RS485 communication modes are adopted at the same time. The communication between the lower computer and the upper computer is realized by RS232 accessing the PSTN network, and the functions of acquiring parameters, transmitting data and remote alarm are completed; the lower machine and each The communication between the intelligent devices is realized through the RS485 networking, and the data and its working state are obtained [4].
In this system, the communication module uses a separate microprocessor DS80C320, which also defines a second function for the P1 port on the basis of the ordinary single-chip microcomputer, thus having four full-duplex serial communication ports, six external interrupts, and three A timer/counter, and fully compatible with the 8051 in the command, is very suitable for the communication unit of the monitoring system.
3.1 Communication between the lower computer and the upper computer
The communication between the lower computer and the upper computer adopts the PSTN network as the medium, which can be realized by the following three schemes: the first scheme uses a dedicated Modem chip, and the function of the Modem is directly implemented in the lower computer; the second scheme is Expand a slot similar to PCI or ISA, connect to the PSTN network through the built-in Modem; the third is to extend a standard full-duplex RS232 communication interface to connect to the PSTN network through an external Modem. Among the above three schemes, the first scheme has the advantages of low cost and easy integration design, but the disadvantage is that the design of software and hardware is complicated and the system reliability is not high; the second scheme and the hardware design of the built-in modem and expansion slot Closely related, it is not conducive to maintenance and upgrade; the third scheme has the advantages of good versatility, high reliability and convenient maintenance. Therefore, the third scheme is adopted in this system to realize the communication between the lower computer and the upper computer. The specific implementation circuit is shown in Figure 1:
Figure 1 DS80C320 and Modem hardware interface diagram
In Figure 1, the 8251 is a universal synchronous/asynchronous transceiver with separate receivers and transmitters that can be programmed to communicate in simplex, half-duplex or full-duplex. At the same time, it also provides multiple control signals, which can be easily connected to the Modem. The ALE and combination of the DS80C320 generate a 2MHz pulse as the clock signal of the 8251. At the same time, this pulse is divided by the frequency divider of the CD4024 to be used as the reception and transmission clock of the 8251. The chip select signal of 8251 is connected to the address decoder 74LS138, and the control/data terminal is connected to the address line A0. Therefore, the address of the control word register and the status word register of the 8251 is BFFFH, and the data buffer address is BFFEH. RXD and TXD complete the data reception and transmission, and other control signals complete the state control and detection between the MCU and the Modem: the ringing indication signal RI is connected to the external interrupt of the DS80C320 after level conversion; the carrier detection signal CD is level-converted Later, it will be connected to P1.1 of DS80C320. When the host computer dials the lower position machine, the ringing indication signal RI generates a ringing, and generates an interrupt as an external interrupt source. The communication processor resets P1.1 to output a valid DTR signal, and goes off-hook to enter the response communication state.
3.2 Communication between the lower computer and the smart device
RS485 master-slave communication is used between the lower computer and the smart device. RS485 adopts balanced transmission and differential reception to realize communication. It has strong anti-common-mode interference capability, and the transmission distance can reach 1.2 kilometers at 10Kbps transmission rate. The specific implementation scheme is shown in Figure 2.
Figure 2 Overall implementation of RS485 communication
The following points should be noted when adopting this communication scheme:
(1) A matching resistor should be connected at the end of the bus to absorb the reflected signal on the bus to eliminate the glitch in the signal transmission and ensure the signal purity;
(2) When there is no signal transmission on the bus, it is in a floating state and is susceptible to interference. Therefore, a 10K resistor should be connected between the positive and negative ends of the differential signal, between the positive terminal and the power supply, and between the reverse terminal and the ground. Thus, when there is no signal transmission on the bus, the positive terminal level is approximately 3.3V, the negative terminal level is about 1.7V, even if there is interference signal, it is difficult to generate the start signal "0" of serial communication;
(3) Since RS485 is a half-duplex communication mode, one channel is shared between transmission and reception. The system uses MAX485 to expand it. The receiving and converting functions are controlled by DE. Therefore, a line of the processor must be used. Control how it works. Since the microcontroller is reset, each end
4 communication module software design
4.1 Communication process between upper computer and lower computer
The communication between the upper computer and the lower computer includes the active call of the upper computer, the response call of the lower computer and the alarm call of the lower computer, and the response of the upper computer to the call. The software flow is shown in Figure 3 and Figure 4 respectively. Program flow of the lower computer part).
4.2 Communication process between lower computer and smart device
Since RS485 is a half-duplex communication method, both transmission and reception are performed by the same device and the same channel, so the conversion of the control signal high and low is critical. The system uses the transmit interrupt flag TI and the receive interrupt flag RI of the microcontroller as a reference for switching, but it must be noted that the effective pulse width of the signal of the control terminal and the DE is greater than the length of the signal transmitted or received by one frame. The specific software flow is shown in Figure 5.
Figure 5 Local communication block diagram
5 Experimental results
The monitoring system test results are given by taking the AC and DC voltage as an example (the test standard table is ESCORT3155A; the test environment temperature is 180C). The DC voltage signal test results are shown in Table 1; the AC voltage test results (take the A-phase AC input as an example) are shown in Table 2.
It can be seen from the above experimental results that the system has high measurement accuracy and can fully meet the requirements in the Technical Requirements for Centralized Monitoring System for Communication Power Supply and Air Conditioning.
6 Conclusion
Firstly, the paper analyzes several main networking schemes existing in the communication power monitoring system, and concludes that the traditional master-slave network is better than other networking schemes and is more suitable for the communication power monitoring system networking. The traditional master-slave network is proposed to be improved by the disadvantage of distance limitation. Practice has proved that the improved scheme is very suitable for the communication power monitoring system which is already quite popular at present. The communication power monitoring system based on the networking scheme has the advantages of high acquisition precision, low cost and easy upgrade.
references:
[1]. RS485 datasheet http://
[2]. RS232 datasheet http://
[3]. DS80C320 datasheet http://
[4]. PCI datasheet http://
[5]. CD4024 datasheet http://
[6]. 74LS138 datasheet http://
[7]. MAX485 datasheet http://
[8] YDN023—1996. Technical requirements and communication protocol for communication power supply and air conditioning centralized monitoring system [S].
[9] Liu Xiwei. Communication Power and Air Conditioning and Environmental Centralized Monitoring System [M]. Beijing: People's Posts and Telecommunications Press, 1999.
[10] Ma Mingjian, Data Acquisition and Processing Technology [M]. Xi'an: Xi'an Jiaotong University Press, 2000.
[11] Cao Baogen, Design and Modulation of Master-slave RS485 Application System [J], Electronic Technology 2000, NO.2.
:
Carving Station,Chafing Dish,Heat Lamp,2-Lights Marble Carving Stations
Shaoxing Biaoyi Hardware Products Co., Ltd. , https://www.byeob.com