Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

MCU

Fire alarm system MCU


Design of fire alarm system based on single chip computer


The number of fires in the world is increasing year by year, among which fires in residential areas account for the largest proportion, causing serious casualties and economic losses. At present, many fire alarm systems are widely used in various places, but they generally have the problem that they cannot send alarm signals to management personnel in time. Therefore, it is urgent to design a multi-channel fire alarm system with fast response and automatic alarm, so as to accurately detect the disaster in the early stage of the fire and send alarm messages to the mobile phones of the management personnel in time.


1. Fire alarm system scheme


The structure of the fire alarm system is shown in Figure 1. The whole system can be divided into two parts. One is the monitoring and display alarm part of the receiving end of the upper computer, and the other is the temperature and smoke concentration testing subsystem of the lower computer. In this design system, there are three groups of test subsystems. The upper computer subsystem and the lower computer subsystem are connected by NRF24 L01 wireless communication module, and the communication mode is one-to-three.


In each subsystem of the lower computer, the single-chip microcomputer msp430 is used as the central control unit, and the temperature and smoke concentration of the surrounding environment are detected by the smoke detection module and the temperature detection module, and the data is transmitted to the upper computer subsystem through the wireless communication module NRF24L01, which is the monitoring display terminal. The control chip in the monitoring display terminal also adopts msp430. When the system receives the data sent by the lower computer, it will display the data through the LCD 12864. If the received data value is higher than the set value of the system, the system will sound an alarm, and at the same time send an alarm message to the administrator's mobile phone through the GSM module to remind. Among them, the upper computer can adjust the limit value of the alarm through the keyboard module.


2. Hardware design of fire alarm system


The hardware part of the fire alarm system mainly includes the monitoring and display part of the receiving end of the upper computer, the NRF24L01 wireless communication module, and the temperature and smoke concentration acquisition unit of the lower computer.


The hardware part of the receiving end of the upper computer mainly includes the core controller, 12864 liquid crystal display module, keyboard module for setting the alarm range, the minimum system module of single-chip microcomputer, GSM communication module and NRF24L01 interface circuit.


(1) Core controller: MSP430 single-chip microcomputer is a 16-bit ultra-low power consumption microprocessor, which has the characteristics of powerful processing capability, high integration, stable working status and rich on-chip peripheral modules. The fire alarm system chooses the msp430f169 of the msp430 series as the core controller, because the system not only includes a one-to-three NRF24L01 wireless communication module, but also adds a GSM communication module. These modules need many input and output ports, and require high program processing ability, which is difficult to realize with 51 single-chip microcomputer, but the upper computer subsystem and lower computer subsystem can solve these problems by using msp430 as the central controller.


(2) GSM communication module: GSM communication module adopts SIM300, the main reason is that SIM300 can work at three frequencies of EGSM 900MHz, DCS1800MHz and PCS1900MHz. The shape and structure of the SIM is also very light, and its size is suitable for almost all industrial applications. SIMs are also frequently used in mobile devices such as smartphones and PDAs. In addition, the SIM has the function of voice call and short message sending, and the standby power consumption is low. The design system uses its SMS sending function. The receiving end and sending end of the GSM communication module need to be connected to the P1.0 and P1.1 pins of the microcontroller respectively. The module needs to set up three aspects to send SMS. First, set the GSM working mode; second, you need to set the PDU mode to send Chinese text messages; third, set the length of the text messages.


(3) 12864 liquid crystal display and button circuit design: the system uses a three-way data acquisition module to collect temperature and smoke concentration. In order to facilitate the display of three-way detection values at the receiving end, a QC12864B liquid crystal display is specially used, which can display 4 lines of data while the picture is clear. Because the system contains 3 lower computer test systems, when the upper computer is displayed, it is set to display in three lines, and each line displays a group of temperature and smoke concentration, such as "No. 1: temperature 29 thick 10%", in the LCD screen Another line says "Settings: Temp **Concentrated**". Although the price of QC12864 LCD is higher than that of LCD1602, and the display program is complicated, its display effect has obvious advantages and can display information completely. The LCD1602 is only convenient for displaying numbers and letters, and can only display two lines, and the size of the display font is also limited.


A button circuit is added to the upper computer system to adjust the alarm limit value of temperature and concentration. During actual use, the system will encounter seasonal changes, and the ambient temperature will change accordingly. Therefore, it is necessary to adjust the alarm temperature value. For example, if the ambient temperature is high in summer, the alarm temperature value needs to be raised appropriately, while in winter, the normal ambient temperature is low, and the alarm temperature value needs to be adjusted downward. Since it only needs to increase, decrease and confirm three function keys to work smoothly, and the matrix keyboard programming is more complicated, the key circuit does not use matrix keys when designing, but chooses 3 independent keys.


2.2 NRF24L01 wireless communication module


The fire alarm system consists of two parts: the upper computer subsystem and the lower computer subsystem. The communication between the upper computer and the lower computer adopts NRF24L01 wireless communication module. NRF24L01 is connected with the central controller by means of SPI communication. The working frequency of NRF24L01 is 2.4-2.5GHz, which is highly versatile and can be connected to various single-chip microcomputer chips to complete wireless data transmission. In addition, it has low current consumption, with a current consumption of approximately 11.3 mA in transmit mode, approximately 12.3 mA in receive mode, and even lower power consumption in standby mode.


In the circuit connection of the host computer subsystem, the 24L01 chip should be connected with the 6 pins of the microcontroller. Among them, CSN is the chip selection signal of the wireless module, which needs to be connected to P1.2, and the single chip microcomputer sends a signal to control whether to allow data input and writing to 24L01. MOSI is an input signal, which is connected to P1.3 of the single-chip microcomputer, and the single-chip microcomputer sends data to the wireless module. MISO is the output signal of the module, and it is the interface for the wireless module to send data to the single-chip microcomputer, and it is connected with P1.4 of the single-chip microcomputer. IRQ is the module output interface, which is the interface through which the wireless module generates an interrupt signal and sends it to the microcontroller, and is connected to P1.5 of the microcontroller. SCK is the input interface of the wireless module, the serial clock signal is connected with the P1.6 of the single-chip microcomputer, and the single-chip microcomputer sends a signal to control the operation rhythm of the wireless module's reading or writing. CE is the input signal of the wireless module, which is connected to P1.7 of the single-chip microcomputer, and the signal given by the single-chip microcomputer controls whether the internal radio frequency circuit of 24L01 starts to work. In the lower computer subsystem, the pins of the wireless communication module are connected to P2.0-P2.5 of the microcontroller. In the entire fire alarm system, a one-to-three communication mode is adopted, that is, one node receives and three nodes send. The upper computer works in the receiving mode, while the wireless modules in the three lower computers work in the sending mode, and then the detected temperature and smoke concentration data are sent to the upper computer system and displayed.


2.3 Lower computer temperature and smoke concentration acquisition unit


(1) Smoke concentration detection circuit design: The smoke concentration detection circuit adopts HIS-07 sensor. It is an ion-type smoke sensor, its performance is far superior to that of gas-sensitive resistance sensors, and it is particularly sensitive to tiny smoke particles. In addition, the line uses Motorola's MC14468. MC14468 is a special chip for ion smoke detection and alarm, with short alarm response time. Its pin 1 is the input signal terminal. When it detects that the smoke concentration changes, it outputs a high level from pin 1 to the P1.1 pin of the microcontroller.


(2) Temperature detection circuit design: DS18B20 sensor is used in the temperature detection circuit, which can accurately and effectively collect the ambient temperature. Its advantages are high sensitivity and accurate data. DS18B20 has 3 pins, the pins on both sides are respectively grounded and the positive pole of the power supply, and the middle pin is the data output port, which is connected to the P1.2 port of the msp430 microcontroller. The microcontroller inputs the temperature detected by the temperature sensor to the inside through the P1.2 port. The temperature data collected by DS18B20 is an analog signal, and the msp430 microcontroller has an analog-to-digital conversion unit inside, and the circuit does not need to be connected to an additional analog-to-digital conversion chip. The analog signal is converted into a digital signal by content, and then displayed on the display screen.


(3) Data display of the lower computer: LCD1602 display screen is used for the display circuit of the lower computer detection system. Since only the temperature and smoke concentration of the system need to be observed in the acquisition system of the lower computer, the LCD1602 can be used for complete display. The circuit wiring and driver of LCD1602 are relatively simpler than 12864, and it is the best choice for the lower computer system.


3. Software design of fire alarm system


The software program of the system is divided into upper computer program and lower computer program. Among them, the upper computer program part includes liquid crystal display, button program, upper computer communication program and GSM alarm program. The lower computer program includes temperature sensor data acquisition, smoke sensor smoke detection and wireless communication program.


The execution process of the GSM alarm program: Enter the alarm program, input 1, the display will output the alarm of test group A, input 2, the display will output B alarm, input 3, the display will output and display the alarm signal of test group C. All alarm signals need to be transmitted to the SMS sending program, and finally the program is terminated.


in conclusion


The innovation of this system lies in the following aspects. First, the use of smoke sensors. The system uses the ion smoke sensor HIS-07 and the special chip for ion smoke detection and alarm, which can detect the occurrence of fire faster and more sensitively. Second, the main control chip selects msp430 single-chip microcomputer. Compared with 51 single-chip microcomputer, msp430 single-chip microcomputer has lower power consumption and stronger processing ability, and the place where the system is used is a fire scene. When the fire causes indoor power failure, the msp430 single-chip microcomputer with small system power consumption is the best choice. Third, the design uses the GSM module to send SMS alarms, and the fire situation will be sent to the inspector at the first time, so as to rescue the victims in time.


The above are the design details of the fire alarm system based on the single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.


  • TOP