MSP43O realizes home smoke alarm

Publisher:chang_riLatest update time:2011-09-16 Keywords:MSP43O Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

The current "Code for Fire Protection Design of Buildings" (GB 50016-2006) in China does not have any provisions for the installation of automatic fire alarm systems in residential areas. Through research, it was found that existing smoke detectors are prone to failure, disconnection or battery damage, lack of battery undervoltage detection, false alarms, and extremely unstable operation. Therefore, this paper designs a household smoke alarm with low power consumption, high reliability and strong real-time performance.

1 Overall system design

The system consists of four parts: main control chip, smoke detection module, alarm module and power module. The main control chip uses 16-bit ultra-low power single-chip microcomputer MSP430F2012, performs smoke detection every 8 seconds, outputs 32768Hz signal through the I/O port of F2012 chip to drive the infrared emission part to emit infrared rays, and uses the 10-bit ADC on the chip to perform 4 consecutive data acquisition conversions on the amplified infrared signal, and takes the average value as the detection result. At the same time, the detection result is compared with the preset alarm threshold value to send early warning information. At the same time, the internal low-frequency clock VLO of 430 is used for accurate timing, and the high-frequency clock DCO works at high speed, which reduces the system cost and improves the reliability of the system.

2 System Hardware Circuit Design

2.1 Main control chip MSP430F2012

MSP430F2012 is a high-performance 16-bit microcontroller newly launched by TI. Its features are as follows: the power supply voltage adopts a low voltage of 1.8 to 3.6V; ultra-low power consumption, active mode (1MHz, 200 μA at 2.2V), standby mode (0.7 μA), power-down mode (RAM data retention, 0.1 μA); 5 power saving modes; no more than 1 μs from standby to wake-up; 16-bit reduced instruction set, instruction cycle 125ns; 16-bit timer (TIMERA) with two capture/compare registers; A/D converter; 10-bit 200-ksps, universal serial interface USI; support SPI and I2C; program code fuse protection; zero power BOR reset protection function. This article uses the Spy-Bi-Wire JTAG debugging interface, which only needs to connect four wires to realize online programming and debugging of the program using the emulator. At the same time, MSP430F2012 has 2kB+256B of FLASH memory and 128B of RAM, which are sufficient to meet the system code requirements.

2.2 Smoke Detection Module Circuit

Smoke detection module circuit

The main smoke detection methods are ion smoke detection and photoelectric smoke detection. Ion smoke detection has high requirements for circuits and processes. The detector is greatly affected by humidity and airflow, and the maintenance cost is higher than the manufacturing cost. This article adopts the photoelectric smoke detection method, and the circuit is shown in Figure 2. A special optical maze is used as a smoke receiving device, which is equipped with an infrared emitting diode (IRdiode) and an infrared receiving diode (IR receiver). The P2.7 port of the main control chip MSP430F2012 regularly drives the infrared emitting part to emit infrared rays. If smoke enters the optical maze, light scattering occurs. After the infrared receiving diode receives the light signal, it generates a current signal, which is converted into a voltage signal by the operational amplifier LM358 and sent to the main control chip ADC module channel A3 for sampling and conversion. When it is determined that smoke appears in the maze, the main control chip drives the piezoelectric buzzer to emit a smoke alarm sound.

2.3 Alarm circuit

The system alarm circuit uses RE46C100 to drive the piezoelectric buzzer. The chip has a wide voltage operating range (6-16V), low power consumption (idle current is less than 100nA), and is powered by a 9V battery. The chip enable terminal HRNEN is connected to the P2.6 port of the MSP430. When HRNEN is high, the piezoelectric buzzer generates self-excited oscillation and emits an alarm sound. By setting different timing outputs of Timer A through software, it can emit two different alarm signals: smoke detection and battery undervoltage.

2.4 Power Circuit

The system needs to provide two working voltages, 9V and 3.3V. 9V is supplied to RE46C100, and 3.3V is the working voltage of the microcontroller MSP430F2012. This circuit uses the voltage regulator TPS715333.

TPS71533 is a high input voltage LDO (low dropout) regulator in SC-70 package. It is owned by the same American company TI as the microprocessor chip MSP430F1232. The characteristics of this regulator are: high input, low voltage drop, low power consumption and small package. The input voltage range of the chip is 2.5~24V. The low voltage drop and low quiescent current (maximum quiescent current is 3.2 μA) make the power consumption of this chip very low, which is suitable for battery-powered occasions.

At the same time, the system also implements battery undervoltage detection, which directly introduces the power supply voltage into the input P1.2 port of the MSP430F2012 ADC module and compares it with the threshold voltage preset in the program. When the power supply voltage is too low, the alarm circuit reminds the user to replace the battery in time. [page]

3. Design and Implementation of System Software

In order to facilitate system maintenance and function expansion, the system software adopts a modular design method and is programmed in C language. The system software includes the main program, interrupt wake-up subroutine, smoke signal detection subroutine, and battery voltage detection subroutine. The main program flow chart is shown in Figure 3.

During initialization, the calibrated 1MHz DCO value is sent to the DCO control register, and then the VLO is calibrated according to the calibrated DCO clock source, and the MCU works in the low power mode LPM3. TA0 interrupts once every 8s, the MCU exits the LPM3 mode, and calls the smoke signal detection subroutine. In order to avoid false alarms, the system will only start the alarm circuit alarm after detecting the smoke signal three times in a row. After the smoke signal is detected for the first time, the VLO clock source is divided by 4 as the timer A signal source, that is, the second sampling interval is 4s; if the smoke signal is still detected for the second time, the timer A clock source is directly sampled by the VLO input for 1s; if the smoke signal is still detected for the third time, the system starts the alarm, and the smoke detector continues to sample with a 1s period. In order to reduce system power consumption, the MCU enters the LPM3 mode during the smoke sampling conversion.

In the smoke signal detection subroutine, first turn on the LED and op amp through P2.7 and P1.4 respectively, set ADC10 to 4 single-channel continuous conversions, and temporarily store the conversion results in the MCU's RAM through the DTC feature of ADC10. After the op amp is stabilized by a delay, the ADC is started, and the MCU enters the LPM3 mode. After completing 4 AD conversions, the DTC interrupt is triggered, the DTC interrupt service program returns, and the MCU enters the active mode. Then the infrared transmitting tube is turned on, and another round of 4 continuous AD conversions is performed after the delay is stabilized. After the sampling is completed, the op amp, infrared transmitting tube, ADC and light-emitting diode are turned off. Finally, the average calculation subroutine is called to calculate the average of two consecutive 4 AD conversions. The main program calls the calculation result to determine whether a smoke signal is detected.

4 Conclusion

This system complies with the national standard GB20517-2006 "Independent Smoke Fire Detection Alarm" certification requirements. Practice has proved that this system has the characteristics of small size, low power consumption, high sensitivity, flexible application, high reliability, strong real-time performance, etc. It is the best choice for high-performance household smoke detection.

Keywords:MSP43O Reference address:MSP43O realizes home smoke alarm

Previous article:PR818S Media Storage Box System Design
Next article:Design of Prepayment Heat Meter Based on HT46R65

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号