| With the development of society, electrical equipment and the use of power surge become more and more, the related electrical fires in the proportion of various types of fire is rising, and also the electrical fires cause more and more serious damage. The most effective method of electrical fires prevention is the installation of alarm and control system for electrical fire prevention.At present, for alarm and control system, the related national standards and regulations need to be improved, and the quality of its related products is uneven. So developing an instrument which is strict conformity with national standards, using current advanced information technologies, gathering fusion features of most products, easy installation, reliable, intelligent, network-based, using this instrument to form an intelligent system, has an important market prospect.The instrument designed in this paper is strictly accorded with national standards requirements of the proposed system. It uses 32-bit high-performance embedded microcontroller STM32, relies on its rich A/D converter, SPI interface, the timer and other hardware resources, uses its powerful vector interrupt controller to complete software task management. It uses 8-bit microcontroller STM8 to complete communication based on CAN BUS which is compatible with Modbus instructions. Using it we can form an intelligent, network-based system.In this paper, we firstly study national standards, then analysis what functions this instrument needs to achieve, such as measuring, alarm, protection, self-check, system time, fault self-identification, records, human computer interaction, operating level, and so on. System can measure on-site leakage current, temperature, current and voltage, and it can alarm based on user settings and do protective operations. System forms a real-time monitoring network which can quickly locate fault and alarm points. You can easily check the operational status of circuit, record and query alarm and fault operations. In this paper, we firstly focus on the overall design ideas and methods of this intelligent system, then propose overall design of hardware and software, and design each module of hardware and software tasks, finally do system test in the laboratory and field until system meets design requirements.Software and hardware design of system include signal processing, data storage management, human-computer interaction, alarm, protection, communication and other modules. Hardware design bases on the microprocessor core of the system, according to system requirements, select the relevant functional chip, and design each circuit. Software design implement system task management, data management and communications management, according to the functional module, achieve the orderly scheduling of software tasks.System uses the RMS algorithm to calculate the value of current and voltage, uses fast Fourier transform to calculate the harmonic content of the current which is an new electrical fire hazard, uses quick sort algorithm, binary look-up table and linear interpolation method to calculate the temperature, uses the image compression algorithm for the LCD image display.System debugging and anti-jamming throughout the software and hardware design. We constantly debug to find problems, improve hardware and software design methods and anti-jamming design to ensure system performance indexes. According to system requirement, we complete tests, such as human-machine interaction test, measurement test, parameter test, self-check test, system time test, alarm test, communications test. The anti-jamming design methods System uses are optocoupler isolation, relay isolation, wiring isolation, hardware filtering, power interference, CPU interference, software filter, protection of key parameters technology.Finally this paper summarizes the work completed and introduces what the system needs to be improvements. |