Design of a Mine Positioning System Based on CAN Bus and RFID
2026-04-06 05:27:53··#1
Introduction In recent years, mine safety accidents have occurred frequently. Analysis of several recent major coal mine accidents revealed several common problems: untimely communication between surface and underground personnel; low efficiency and poor search and rescue effectiveness after a coal mine accident. To quickly confirm the location of a mine disaster and the number of trapped workers after it occurs, and to carry out rescue work as quickly as possible to ensure the safety of miners, it is imperative to deploy a high-tech safety monitoring and management system in the mine. This paper designs a mine positioning system based on CAN bus network and radio frequency identification (RFID) technology. This system can transmit the real-time location of underground personnel and mine cars to a host computer on the surface via the CAN bus network. It can not only monitor the underground operations but also immediately determine the location and number of trapped personnel in the event of a safety accident, enabling rapid rescue operations. 1. Introduction to RFID Technology and CAN Bus Radio frequency identification (RFID) technology is a non-contact automatic identification technology that uses radio waves for communication. An RFID system consists of a reader and electronic tags. Each tag has a globally unique ID number, enabling contactless information exchange with the reader. Based on their operating frequency, RFID systems can be categorized into low-frequency (100-500kHz), medium-frequency (10-15MHz), radio frequency (850-950MHz), and microwave (2.45-5.8GHz) systems. Different operating frequency bands affect the system's read/write distance. According to the power supply method, tags can be divided into active and passive types. Active tags require a power supply, have a long read/write distance, but are inconvenient to use, expensive, and have a limited lifespan. Passive tags use the energy of electromagnetic waves emitted by the reader's antenna; therefore, passive tags have a limited read/write distance but a long lifespan and small size. Due to the special environment of underground mining, tags are embedded in miners' safety helmets or belts; therefore, this system uses passive tags to increase their lifespan. Low-frequency and medium-frequency systems have a read/write distance of only about 10cm for tags, while radio frequency systems can reach about 7m, and microwave systems (mainly using active tags) can reach tens of meters. Because relatively accurate positioning information is required in mines, and convenient reading and writing are also necessary, this system operates in the radio frequency band, requiring one reader/writer to be installed approximately every 15m in the mine. The CAN (Controller Area Network) bus was first proposed by the German company BOSCH, primarily for data communication between measurement and control centers within automobiles. Due to its excellent performance, it has been widely applied in other fields and is gradually becoming a major communication method. Its main features include: an internationally standardized industrial-grade fieldbus with reliable transmission and high real-time performance; long transmission distance (up to 10km without repeaters) and high transmission rate (up to 1bit/s); a single bus can connect up to 110 nodes, and the number of nodes can be easily expanded; the message is a short frame structure with hardware CRC check, resulting in low interference probability and extremely low data error rate; faulty CAN nodes will automatically shut down and disconnect from the bus, without affecting bus communication; non-destructive bus arbitration technology allows multiple nodes to send data to the bus simultaneously, resulting in high bus utilization; all nodes on the bus have equal status, with no master-slave distinction, and burst data can be transmitted in real time; it has hardware address filtering function, which simplifies software protocol programming; the CAN-bus system has a simple structure and extremely high cost-effectiveness. When the mine communication network requires a longer communication distance (greater than 10km) or a larger number of terminals (greater than 110), installing a CANbridge can significantly extend the communication distance and also significantly increase the number of terminal devices in the CAN-bus network. Furthermore, using a CAN bus network in a mine facilitates the interconnection and unified management of various independent systems within the mine. 2. Mine Positioning System Hardware Design In this system, the monitor is located in a ground-based monitoring room and is connected to the CAN bus via a CAN converter card. Monitoring software written in Visual C++ runs on it, dynamically displaying the miner's current location near a base station. It can also send query commands to certain base stations to query the current location of a specific employee. Radio frequency readers are installed at known locations within the mine, acting as base stations, and are connected to other base stations and monitors via the CAN bus. Miners must wear safety helmets or belts (embedded with electronic tags) when entering the mine, and the ID of the electronic tag is associated with the monitoring system information. When the communication distance is long and the number of base station nodes is large, a CAN bridge can be used to extend the CAN bus network. The passive electronic tag used in this system is the TI RI-UHF-STRAP-08, which conforms to the EPCglobal™ Gen2 (v.1.0.9) and ISO/IEC 18000-6c protocol standards. It has a built-in 192-bit memory (96-bit EPC memory, 32-bit operation password, 32-bit kill password, and 32-bit Tag-ID memory) and operates in the 860–960MHz frequency band. However, a dedicated reader module for this frequency band has not yet been released; therefore, the focus of this system is the development of the RF reader. Considering the explosion-proof safety certification required for equipment in mines, the system design minimizes the number of external chips. The MCU used is the PIC18F4580 microcontroller from Microchip Technology. This microcontroller integrates a CAN bus control module based on ECAN technology, a 10-bit A/D module, an enhanced general-purpose serial port module, and 32KB of enhanced Flash memory, providing abundant internal resources and simplifying the system design. The RF transceiver module uses the ADF7020 programmable RF transceiver chip from Analog Devices, operating in the 431–478MHz and 862–956MHz bands. It operates in half-duplex mode and supports multiple modulation schemes such as ASK/FSK/OOK/GFsK. The CAN bus driver uses the CTM8251A general-purpose CAN transceiver chip from Zhiyuan Electronics. This chip integrates the opto-isolation of the traditional CAN bus driver circuit and the CAN driver into a single chip, improving communication reliability. 2.1 Interface Circuit between PIC18F458O and CTM8251A: The PIC18F4580 has a CAN control module, supporting CAN1.2, CAN2.0A, and CAN2.0B protocols. Only an external CAN driver is needed to implement the CAN module hardware design. The interface circuit is shown in Figure 3. The CTM8251A CAN transceiver chip features DC2500V isolation, complies with ISO11898 standards, has a maximum data rate of 1Mbps, and includes automatic thermal shutdown protection. The CAN bus will not be affected by power-off or undervoltage nodes. 2.2 Interface Circuit between PIC18F4580 and ADF7020: The PIC18F4580 microcontroller sends programming control words to the ADF7020 via its serial data input pin SDATA to control its operation. It can also read the ADF7020's operating status via the serial data readback pin SREAD. The SLE pin serves as the latch signal for the control word. The DATAI/O pin is a time-division multiplexed pin for transmit and receive signal output, operating in half-duplex mode. Therefore, the MCU operates in half-duplex synchronous communication mode, receiving or transmitting data through the serial synchronous interface. When the ADF7020 receives a valid signal from the antenna, it sends an interrupt signal to the MCU via the INT/LOCK pin. 3. System Software Design The programming environment for this design is MPLABIDE software with embedded MPLAB-C18, supporting C language programming. The system software is mainly divided into PIC18F4580 initialization, ADF7020 initialization, CAN data transmission and reception, and communication algorithms between the reader and the electronic tag. PIC18F4580 initialization mainly involves initializing various functional modules on the chip, including: CAN module initialization, USART module initialization, WDT initialization, and setting the direction of each port. ADF7020 initialization mainly includes: setting the crystal oscillator circuit connection mode, signal modulation/demodulation mode (ASK is used in the ISO/IEC18000-6c standard), defining the modulation output power of the modulation signal, and enabling VCO, PLL, and input/output clocks. In the CAN data transmission and reception program, the reader's MCU sends the relevant information of the tag identified by the reader to the host computer in real time via the CAN bus, while the CPU receives control command data from the host computer. This system requires the reader to recognize all tags within its coverage area. However, tags within the reader's coverage area may respond to the reader's commands almost simultaneously, causing signal collisions and communication failures, preventing the reader from correctly recognizing the tags. Therefore, the reader software system must incorporate an anti-collision algorithm to ensure the reader can correctly exchange information with the electronic tags. This system uses electronic tags that support the ISO/IEC 18000-6c protocol and specifies the use of a probability-based time-slot random anti-collision algorithm. The algorithm works as follows: After the electronic tag enters the reader's coverage area, it enters the Ready state; the reader sends Select and Query command signals (starting a new Round cycle) and listens for response signals; upon receiving the Query command, the electronic tag loads a 16-bit random (or pseudo-random) number (ranging from 0000H to 3FFFH, meaning up to 215 time slots are available) into the time slot counter and enters the Arbitrate state. Each time the electronic tag receives a QueryRep command, the time slot counter performs a subtraction operation (the Query command specifies the subtraction value Q, and the QueryAdjust command can be used to modify the Q value specified in the previous Query command). When the counter reaches 0, the electronic tag enters the Reply state, at which point it sends a 16-bit (pseudo) random number to the reader as an acknowledgment signal. If the electronic tag receives a valid ACK signal (correctly containing the 16-bit random number it sent to the reader), then the electronic tag enters the Acknowledged state. Otherwise, if no correct ACK is received, it indicates a collision and returns to the Arbitrate state. In the acknowledgment state, the electronic tag sends information to the reader containing its own PC (Protocol Control), EPC (Electronic Product Code), and a 16-bit CRC checksum. Afterward, the reader issues a Read command to the electronic tag, which can read part or all of the EPC and TID of the tag. After reading, the tag returns to the Ready state. Because the ISO/IEC 18000-6c protocol uses a probabilistic, slotted random anti-collision algorithm, compared to the ALOHA algorithm of the ISO/IEC 18000-6a protocol and the adaptive binary number algorithm of the ISO/IEC 18000-6h protocol, the slotted random anti-collision algorithm greatly simplifies the programming of the reader CPU and improves the efficiency of the reader because it uses a slot counter in the tag for anti-collision. 4. Conclusion This paper designs a mine positioning system based on RFID technology to meet the needs of safe production in coal mines. To improve system reliability and reduce the difficulty of explosion-proof safety certification, highly integrated chips are used in the design to reduce the number of discrete components. The reader implements software design based on the latest ISO/IEC 18000-6c international standard protocol, which not only reduces the probability of collisions but also greatly improves the efficiency of the reader CPU. The communication between the reader and the host computer uses the highly reliable CAN bus technology widely used in mines, enabling the ground monitoring room to understand the working status underground in a timely manner.