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
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.
Previous article:PR818S Media Storage Box System Design
Next article:Design of Prepayment Heat Meter Based on HT46R65
- Popular Resources
- Popular amplifiers
- Microcontroller Principles and Applications Tutorial (2nd Edition) (Zhang Yuanliang)
- Getting Started and Improving MSP430 Microcontrollers - National Undergraduate Electronic Design Competition Training Course
- Practical Tutorial on Integrated Design of Single Chip Microcomputer
- Improving Larger LCD Displays with Two-Segment MSP430s
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWorld interviews Toshiba PCIM booth engineer: 2-minute short video shows you key products and solutions
- Is it necessary to learn TI's KeystoneII series multi-core heterogeneous processors?
- cc2540 cc2541 low power consumption measurement and summary - and precautions - low power consumption less than 10uA
- Design of Serial Universal Asynchronous Receiver/Transmitter Based on FPGA
- I am looking for a book that explains in detail the pronunciation rules of English words, such as the relationship between open syllables, closed syllables, stress and open syllables.
- Inductive whistle problem in digital phase-shifted full-bridge circuit, please help
- FPGA error, added clock timing, and how to solve this error
- [Project source code] FPGA-based Gigabit Ethernet module UDP design example program
- Here it comes! Summary of 2021 National College Entrance Examination Essay Questions
- LE Audio audio sharing will stimulate a new wave of audio innovation