Design of a CAN bus-based downhole multi-parameter monitoring system
2026-04-06 04:35:40··#1
1. Introduction Monitoring underground production parameters includes monitoring harmful or hazardous components in mine air, the physical state of mine air, the operating status of ventilation equipment, and other parameters. Common monitoring targets include methane, wind speed, negative pressure, temperature, and liquid level. The working environment for monitoring underground production parameters is harsh, monitoring points are scattered, there are many types of monitoring, a large number of measuring points, and long communication distances, with extremely high requirements for real-time performance and reliability. Therefore, it is essential to develop a reliable and low-cost intelligent multi-parameter monitoring system for coal mines. This paper utilizes currently popular virtual instrument technology to achieve upper-level computer interaction and leverages the low cost, high integration, and ease of communication with computers of microcontrollers to develop a novel intelligent multi-parameter monitoring system for underground mines. 2. System Overall Design The intelligent multi-parameter monitoring system for underground mines consists of a monitoring substation system, a CAN bus communication system, an upper-level human-computer interaction system (monitoring computer), and a coal mine safety expert system (database query server). Its system structure diagram is shown in Figure 1. 2.1 Monitoring Substation System The monitoring substation system uses a high-performance ATmega48 microcontroller as the main control device. Multiple external sensors for gas, displacement, and pressure are connected. Data is transmitted through external analog circuitry to the microcontroller's built-in high-precision A/D converter, enabling real-time acquisition of multiple analog signals. Data exchange with the host computer is achieved via a CAN bus communication system. Additionally, the monitoring substations can trigger downhole audible and visual alarms when parameters such as gas and pressure exceed limits, and perform corresponding control operations based on commands from the host computer, effectively preventing accidents. 2.2 CAN Bus Communication System The main function of the CAN bus communication system is to enable data communication between multiple monitoring substations and the host computer (monitoring host), transmitting the real-time acquired analog data via the CAN bus. 2.3 Upper-Level Human-Computer Interaction The human-computer interaction system uses LabWindows/CVI virtual instruments as its development platform. Utilizing a graphical user interface, rich digital signal processing libraries, and advanced function analysis libraries, it leverages the powerful capabilities of a computer to achieve data exchange between the system and the control and acquisition boards, historical data analysis, and data curve creation. 2.4 Coal Mine Safety Expert System The coal mine safety expert system uses Microsoft Access 2003 as its development software. It summarizes various analog parameters and indicators from previous years, along with the necessary operations to prevent accidents in specific situations, for the human-computer interaction system to query. The system sends corresponding control commands based on the query results, thereby minimizing accidents. Additionally, the system prints analysis feedback for ground station personnel to review and make real-time improvements. 3 Monitoring Hardware Design The main control components and peripheral circuits of the monitoring system are shown in Figure 2. The peripheral circuits include a CAN bus communication circuit, a MAX1232 external watchdog circuit, an 8-channel analog acquisition circuit, and a 4051 time-division multiplexing device circuit. The analog signal acquisition circuit for any one channel is shown in Figure 3. When used in conjunction with Figures 2 and 3, the monitoring system can monitor up to 48 analog signals, greatly expanding the acquisition range. It employs a high-precision 10-bit A/D converter built into the microcontroller, simplifying the circuit while ensuring monitoring accuracy and speed. Its working principle is as follows: When the sensor is connected (J1), the analog signal acquisition circuit amplifies the signal, passes it through an RC filter circuit, and sends it to one channel of the 4051 microcontroller. After being selected by the microcontroller, the signal is sent to the microcontroller's A/D converter to obtain the A/D conversion value. The microcontroller sends this data to the host human-machine interface (HMI) via the CAN bus. The HMI compares this data with a safety value. If the change is small, monitoring continues; if a large deviation occurs, this information is transmitted to the expert system. After analysis, the expert system generates corresponding operation instructions and feeds them back to the HMI. The host HMI then transmits the control information to the microcontroller, thus generating corresponding operations to ensure underground safety. 4. Monitoring System Software Design The software design of this system mainly consists of an expert system, a host computer interface, and a monitoring subsystem. The expert system uses Microsoft Access 2003 as the development software and collects a large amount of analog parameter information that needs to be monitored downhole for the monitoring host to query and reference. The host computer interface uses NI's LabWindows/CVI, which has a user-friendly interface and uses fewer instrument hardware and computer resources to replace various high-end data recording and analysis instruments. The computer can automatically analyze data and output reports, greatly improving the system's intelligence and testing efficiency, reducing the impact of human error on the detection results, and providing users with rich functionality through a user-friendly interface. To achieve better real-time performance and code optimization for the microcontroller system, the monitoring subsystem software is written in assembly language. Due to space limitations, only the software design of the host computer interface and the monitoring subsystem is briefly introduced here. 4.1 Monitoring Subsystem The program flowchart is shown in Figure 4. As shown in Figure 4, the monitoring system can perform multiple functions, including multi-channel analog A/D acquisition, data storage, LCD display, human-machine interface communication with the host computer, and digital output. The modular design simplified the design and improved efficiency. 4.2 Monitoring Subsystem To facilitate code reuse, the virtual instrument software development adopts a layered design, consisting of a main program control layer, a human-machine interface layer, a data processing layer, and an instrument driver layer. The instrument driver layer is a library of driver functions developed for different hardware, connecting the I/O hardware interface with the processing layer, and is a crucial guarantee for achieving hardware independence for higher-level software. The data processing layer parses and calculates user operations in the background, sending control words to the hardware driver layer; it also implements data acquisition and control, signal analysis and processing, data management, calibration programs, and test report generation. The human-machine interface layer handles human-machine interaction, responds to user operations, and displays data, communicates with the expert system to exchange information, and prints reports. The main program control layer organizes the coordinated work of all parts to complete the testing task. The testing software utilizes Windows multi-threading technology to achieve simultaneous data acquisition, processing, and display. 5. Conclusion The downhole monitoring system has now passed verification. Experiments have demonstrated its following characteristics: Compared with similar products, it features high precision, strong reliability, stable performance, and low cost; the use of a single-chip microcomputer simplifies the test equipment structure, reduces fault points, and improves work efficiency and intelligence; the test system employs a 10-bit high-precision A/D converter and automatic data reports, improving the system's measurement and control accuracy and reducing random human error; the use of virtual instruments as the human-machine interface integrates traditional testing methods with modern computer technology, enhancing the system's intuitiveness and operability; the system integrates an expert system that allows for real-time fault solution queries, improving efficiency and reducing the accident rate.