Earthquake monitoring and prediction has become a major topic in the world, and the telemetry digital seismic network is gradually improving all over the country. After the completion of the telemetry digital seismic network, it is necessary to ensure continuous and normal operation. In case of "crash", the observation records are interrupted, and special personnel need to be sent to the unattended telemetry station to solve the fault, which not only wastes time and money, but also increases the signal interruption rate. In view of this situation, a set of power monitoring system working with the seismic data collector is designed and developed, which can accurately and reliably monitor the power supply of each seismic station, make the seismic station network center better grasp the power supply of each station, and implement remote control of the seismic data collector. The whole power monitoring system includes two parts: power monitor and information management system.
1、 Introduction to seismic network
Seismic detection network mainly includes network processing center and stations. The network processing center is equipped with real-time receiver, data processor, hub and other equipment. Through the hub, all computers in the center form the central LAN, so as to realize the sharing of files and data.
The station is equipped with seismograph, data collector, AC parameter regulator, UPS power supply, modem, GPS antenna, battery pack and other equipment, as shown in Figure 1.
2、 Design of power monitor
2.1 power monitor function
The main functions of the power monitor are as follows:
(1) The system has the function of detecting the operation of the seismic data collector. When the seismic data collector "crashes", it will be reset automatically. If the reset is unsuccessful for 3 times, it will be automatically transferred to the Seismic Network Center for remote reset;
(2) When the battery voltage is lower than 11 V, restored to 13 V, AC power on and AC power off, it will automatically give an alarm to the center;
(3) Receive commands such as reset, power status, collector operation status query and line test of the center, and return response information;
(4) The communication between the power monitor and the central host computer adopts the special line for seismic data transmission, which does not interfere with the normal transmission of seismic data, and automatically inserts the power supply and collector status information between two adjacent frames of seismic data;
(5) The system has certain anti-interference ability. After "crash", it can be reset automatically and return to normal state again.
2.2 hardware design
System composition
This design selects two 89C2051 single chip microcomputer as the core to complete the monitoring of the power supply of the seismic data collector. The hardware design is divided into power module, reset circuit, signal detection, communication module and so on. The system function block diagram is shown in Figure 2.
Figure 2 system function block diagram
Because the single chip microcomputer not only receives the seismic information sent by the seismic data collector, but also receives the commands of the upper computer software, it needs two serial ports. Here, two 89C2051 microcontrollers are used to complete the task. The host is used to detect the operation and power supply of the seismic data collector and send it to the upper computer. The slave is specially used to receive the command of the upper computer and control the reset of the seismic data collector. The communication between the two microcontrollers is realized through the ordinary I / O port. In case of "crash" of the data collector, the host only needs to send a command to reset the data collector to the slave. After receiving the command from the upper computer, the slave sends a response message to the host, which is forwarded by the host to the upper computer.
2.2.2 communication module design
A serial port is used to listen to the data of the seismic data collector, and send the detection data to the host computer. At the same time, the seismic data can not be damaged. Since there can be no more than one "speaker" on the same line, this design uses and gate circuit to realize the switching between seismic data upload and detection information upload. The circuit schematic diagram of communication module is shown in Figure 3.
Fig. 3 circuit schematic diagram of serial communication module
When the 89C2051 single chip microcomputer is powered on and reset, all output ports are at high level. At this time, the output of the third pin of the and gate 74ls08 changes with the seismic data. When the seismic data is sent, the first pin of the 74ls08 changes to high level, and the output of the third pin of the 74ls08 changes with the first 89c2051tx1, so as to realize the multiplexing of the transmission line. The instructions sent by the upper computer are listened by the second chip 89C2051. If it is the information given to the monitor, it will be received and executed. At the same time, because the data of the seismic data collector has its fixed format, it will not affect the seismic data collector.
The two microcontrollers are connected through two ordinary I / O ports. When the seismic data collector "crashes", the first microcontroller sends instructions to the second to reset the seismic data collector. When the second single chip microcomputer receives the remote reset instruction from the upper computer, reset the collector and send a response signal to the first single chip microcomputer. After receiving the response signal, the first single chip microcomputer sends a packet of data to the upper computer, including the collector status information, power information and the response information of the second single chip microcomputer. The host computer can not only judge the line condition by checking whether the second single chip microcomputer responds, but also record the on-site information at the moment. If the information from the monitor is not received within 5 s due to various conditions, the information will be sent again automatically. If the transmission fails for 3 times, it indicates that the line is faulty, and the corresponding prompt will be given. The principle of remote query and line detection is similar to that of remote reset, but no reset operation is carried out.
2.3 software design
2.3.1 software design
After the host of the lower computer is started, it will be initialized first. After initialization, it will enter the main cycle program. In the main cycle program, it will complete the tasks of regularly feeding the watchdog for 1 s, detecting the collector status, battery voltage and AC parameters, receiving slave information and alarming the upper computer. The flow chart of the host is shown in Figure 4.
Figure 4 software flow chart
The upper computer information management system software mainly realizes the system information collection, statistical report and other work. The software is developed with Visual Basic programming language.
2.3.2 serial communication control settings
The serial communication object MSComm control of Visual Basic encapsulates the primary operation of RS-232 interface. Users can use RS-232 interface to communicate with the outside world with advanced syntax. There is no need to understand other relevant primary operations, so it is very convenient to use.
Generally, the MSComm control of Visual Basic is used for communication control in the following steps:
(1) Add a communication object, that is, MSCOMM object;
(2) Set the communication port number, i.e. commport attribute;
(3) Set the communication protocol, i.e. handshaking attribute;
(4) Set parameters such as transmission speed, i.e. settings attribute;
(5) Set other parameters, and add other attribute settings if necessary;
(6) Open the communication port, that is, set the portopen property to true;
(7) Send out or read in strings, and use input and output attributes;
(8) After using the MSComm communication object, close the communication port, that is, set the portopen attribute to false;
(9) Other program processing.
3、 Conclusion
The power monitor of seismic data collector takes 89C2051 as the core, uses serial port listening technology to track the state of the collector, resets it in time in case of "crash" and alarms the station network center. This design completes the production of the power monitor of the seismic data collector and the compilation of the power monitoring software. After the joint commissioning of the system, it runs in good condition and meets the design requirements. Through the actual operation test, the system can detect the operation of the seismic data collector with high reliability, save the maintenance cost of the power supply of each unattended station, prolong the battery life, effectively improve the work efficiency of the telemetry digital seismic network, and obtain good application results.