选用STC89C52单片机作为核心控制器件,选用MQ-2型半导体可燃气体敏感元件烟雾传感器来获取烟雾浓度和可燃气体浓度,选用DS18B20温度传感器来获取温度信息
摘 要:伴随着经济的发展,物质生活条件的丰富,人民生活质量水平的提高,对火灾的防范意识越来越强,做好对火灾的防范工作就显得犹为重要。从而减少人民的财产损失保障人民的生活质量。文本设计了一种比较通用的烟雾报警器。系统的设计是由硬件的构成配合软件来实现功能,其中硬件主要部分选用STC89C52单片机作为核心控制器件,选用MQ-2型半导体可燃气体敏感元件烟雾传感器来获取烟雾浓度和可燃气体浓度,选用DS18B20温度传感器来获取温度信息,选用5V继电器作为保护电路,选用ADC0832模数转化器进行A/D转换及其它硬件构成。软件部分以C语言来编程协调硬件达到实现功能的目的。由硬件和软件组成烟雾报警系统分为检测部分和报警部分,当检测部分检测到烟雾、热量、可燃气体、温度等物理量达到预定值时检测部分激活,将相应的物理量转化电信号,传输到单片机处理并作出判断显示出烟雾浓度等级和温度并反馈到报警部分和其它部分、实现声光报警,水泵开始工作喷水降温,继电器工作切断主电源完成保护电路工作,从而避免了不必要的损失。此设计的特点有,灵敏度高,操作简便,多种模式设置,耗电量小,成本可控,便于实现实际的应用价值。
关键词:单片机;烟雾报警器;A/D 转换器
The Design of The Intelligent Smoke Alarm
Abstract: With the development of economy, the rich material life conditions, the improvement of people's quality of life, a growing awareness of fire, do a good job of fire prevention is is especially important. To reduce people's property loss guarantee the quality of life of the people. The text designs a more general smoke alarm. Design of the system is composed of hardware with software to implement the functions, the hardware part mainly chooses STC89C52 single-chip microcomputer as the core control device, use the MQ - 2 type semiconductor gas sensitive element smoke sensors to get the smoke concentration and the concentration of combustible gas, selects the DS18B20 temperature sensor for temperature information, choose A 5 v relay is A protective circuit, selects the ADC0832 modulus converter for A/D conversion and other hardware. Software part to coordinate the C programming language to hardware to achieve the purpose of the functionality. Consist of hardware and software of smoke alarm system can be pided into detection and alarm part, when the detection section detects smoke, heat, combustible gas, temperature and other physical quantities to the expected value when testing parts of activation, the corresponding physical quantities into electrical signal, judge for transmission to the single chip and shows that the smoke concentration level and temperature and feed back to the alarm and other parts, realize the sound and light alarm, water pump start work spray cooling, relay work complete protection circuit to cut off the main power supply, so as to avoid the unnecessary loss. This design has the characteristics of high sensitivity, simple operation, multiple mode, small power consumption, cost control, easy to realize the value of practical application.
Key Words: Single chip microcomputer; Smoke alarm; A/D converter
目 录
摘要 1
引言 2
1.绪论 3
1.1课题背景 3
1.2设计任务分析 3
2.总体方案设计 3
3.系统硬件设计 4
3.1 STC89C52单片机简介 4
3.2 MQ-2 烟雾检测传感器简介 6
3.3 AD采集模块 7
3.4 烟雾检测AD采集电路 8
3.5 温度传感器(DS18B20)电路 8
3.6 声音报警电路 10
3.7 按键控制电路 11
3.8 显示模块 11
3.9 保护电路 12
4.系统软件的设计 13
5.总结评价 15
参考文献 16
致谢 17
附录 18
附录1:整体原理仿真图设计 18
附录2:部分源程序 21