Design of an Electrical Fire Monitoring System Based on CAN Bus
2026-04-06 06:41:35··#1
1. Introduction According to the *China Fire Statistics Yearbook*, from 1993 to 2002, a total of 203,780 electrical fires occurred nationwide, accounting for nearly 30% of all fires and ranking first among all fire causes. Most electrical fires in China are caused by short circuits, especially grounding arc short circuit accidents. Taking effective measures to prevent and curb electrical fires is now imperative. The widespread application and installation of electrical fire monitoring devices in various buildings and other fields can effectively prevent and reduce electrical fires caused by leakage. Using online detection technology, parameters such as overcurrent and leakage current of power lines can be continuously monitored year-round. This allows for real-time monitoring of changes in electrical fire hazard parameters, faults, and abnormal states of electrical lines or equipment, enabling timely detection and elimination of fire hazards, preventing fires before they occur, and protecting the safety of national and public life and property. 2. Composition of the Electrical Fire Monitoring System The system consists of a centralized electrical fire controller, a main controller, branch controllers, and a signal acquisition and conditioning section. The system block diagram is shown in Figure 1. [align=center]Figure 1 System Composition Block Diagram[/align] The centralized controller for electrical fire monitoring adopts an embedded industrial computer with a touch screen. The human-machine interface uses MCGS configuration software and communicates with the main controller of the electrical fire monitoring system via CAN bus. The main controller completes keyboard input, processes the data transmitted by the branch controllers, promptly sends the status of each branch to the centralized controller, and displays the various operating statuses and parameters of the monitored lines in real time on the LCD. It also accurately records historical data such as changes in the operating status of the monitored lines, fault characteristics, fault addresses, and times. The branch controllers are responsible for A/D conversion and digital filtering, comparing and analyzing the status characteristics of the lines such as overcurrent and leakage current, and making corresponding early warning, alarm, and tripping actions. They also complete bidirectional communication with the main controller via I2C bus. The signal acquisition and conditioning section uses high-precision current transformers and leakage current transformers to sample electrical signals and perform signal conditioning, voltage tracking, and opto-isolation to send the 0-5V standard signal to the A/D converter. The A/D converter uses a 12-bit TI TLC2543 A/D converter. 3. Branch Controller Design The branch microprocessor used is the Philips LPC932A1 microcontroller, a high-speed, low-power 8-bit microcontroller based on the 8051 core. Its instruction execution time is only 2 to 4 clock cycles, which is 6 times that of a standard 8051 device. The branch controller system block diagram is shown in Figure 2. [align=center] Figure 2 Branch Controller System Block Diagram[/align] In the branch controller system, precision resistors are used to sample and amplify the current signals of the four current transformers (ia, ib, ic, and in). Then, a precision rectifier circuit is used to convert the AC voltage signal into a DC voltage signal. After processing by the microcontroller, the signal is transmitted to the main controller via the I2C bus. Due to the large number of interference factors in the field, anti-interference issues must be considered in the hardware and software design of the branch controller. Anti-interference design mainly includes the following aspects: power supply anti-interference design, microcontroller anti-interference design, process channel anti-interference design, printed circuit board and circuit anti-interference design, and software anti-interference design. The system power supply uses a DC-DC converter to obtain stable ±12V and 5V DC voltages. A high-speed optocoupler 6N137 is used for signal isolation. Digital filters are incorporated into the software design to further improve the system's anti-interference capability. 4. Main Controller Design The main controller consists of an audible and visual alarm, a keyboard and LCD display, a CAN bus controller, external flash memory, and a clock/calendar generator. The main microprocessor used is a Philips P89V51RD2 microcontroller. The main controller's functions include: acquiring parameter data such as IA, IB, IC, and IN transmitted from each branch controller, as well as fault characteristic data, and displaying them in real-time on the LCD, transmitting them to the central controller via the CAN bus. In addition, the main controller displays the operating status signals of each branch controller using corresponding dual-color LEDs; when an alarm signal occurs in a channel, the main controller drives a buzzer and saves the real-time fault characteristic data to the flash memory. The main controller system structure block diagram is shown in Figure 3. [align=center]Figure 3 Main Controller System Structure Diagram[/align] The CAN interface hardware of this system mainly adopts the CAN independent controller SJA 1000 and the CAN transceiver PCA82C250. CAN bus technology belongs to the fieldbus category. CAN bus has strong error correction capability, supports differential transmission and reception, and is therefore suitable for high-noise environments and has a long transmission distance; therefore, the CAN protocol is very attractive to distributed measurement and control systems in many fields, especially suitable for small distributed measurement and control systems. CAN bus can work in multi-master mode, and any node on the network can actively send information to other nodes on the network at any time. It can be divided into different priorities to meet different real-time needs. The communication medium uses twisted pair cable, with no special requirements, and the user interface is simple. The microprocessor fire monitoring system based on CAN bus provides a new method and means to solve the fire alarm problem, which not only improves the accuracy and reliability of the system, but also greatly facilitates engineering design and construction wiring. The LCD display interface of this system is shown in Figure 4. Real-time current data can be viewed through the system monitoring interface, and the data is displayed in a scrolling form. Users can set the current time and the address of the branch controller through the system settings interface. Add and delete branches, and set the warning current value, alarm current value, current transformer ratio, warning delay time, and alarm delay time for each branch. Setting the delay time can prevent system malfunctions. The alarm cause, alarm time, and alarm channel number can be queried through the historical data query interface. [align=center] Figure 4 LCD display interface[/align] 5 System Software Design The flowchart of the monitoring system software design is shown in Figure 5. After the system starts working and initializes, the main microcontroller begins to set the parameters of the branches, setting the current transformer ratio, alarm, and warning delay time. Then, it receives real-time data from each branch board every 50ms. When the current of channels ia, ib, ic, and in exceeds the set current value, the branch microcontroller drives the relay and transmits the channel status to the main controller. [align=center]Figure 5 Flowchart of the Main Controller System[/align] 6 Conclusion In the field experiment, the three-phase current transformer used was the Ruitai Electronics CT-2000 current transformer, and the leakage current transformer used was the CT-800L current transformer. A Mastertech MS2007B leakage current clamp meter was used for current measurement, and the experimental data are shown in the attached table. The experiment shows that this system has high accuracy, safety and reliability, low false alarm rate, and convenient operation and maintenance, and has broad application prospects. It is suitable for the fire protection needs of large buildings in China.