摘 要
随着经济和科学技术的快速发展,人们对生活质量的提高和生活环境的改善越来越重视。煤气作为一种清洁型能源进入家庭得到广泛使用,为人们的生活带来了方便,减少了城市的污染,提高了生活质量和效率,但是同时,煤气也是潜在的“危险品”,煤气在使用过程中,若管道和阀门密封不好,一旦泄漏出去极易爆炸,危及人们的生命财产安全。面对燃气泄漏而造成的种种事故威胁,我们需要一个解决办法。然而使用天燃气检测系统成为了一个重要的研究课题。
本毕业设计的题目是煤气泄漏检测报警装置设计。本设计主要是由一个MQ-4传感器采集甲烷浓度信号,系统建立浓度与电压关系,进行浓度电压转换,浓度显示,声光报警构成的报警装置。本系统由ADC0832处理数据,MCU采用STC89C52,完成甲烷浓度信号的采集显示内容的传输、显示等功能。本设计的可燃甲烷报警器由六个部分组成:传感器、数码管显示器、声光报警器、控制电路、A/D转换和电源模块。软件上采用C语言编程,结构简单运行稳定。
该检测系统能够检测煤气浓度,当检测甲烷浓度低于设定报警阈值的时候,数码管显示器仅仅显示测得的可燃甲烷浓度;当检测煤气浓度超出设定报警阈值时给出声光报警,并伴有语音提醒。
关键词:MQ-4传感器;ADCO832;STC89C52;数码管;声光报警
Abstract
With the rapid development of economy and the science technology , people pay more and more attention to the quality of life and the improvement of living environment. Natural gas are widely used in our daily life and brings convenience for people's lives as a cleaner fuel, reduce the city's pollution and improve the life quality and efficiency. but at the same time, natural gas is also potential dangerous, If not sealed pipes and valves, they leaked,easily caused by fire ,endangering people's lives and property. Facing the gas leak all kinds of accidents caused by threats, we need a solution. And it is obviously very important to study on the inspection methods and sensors of all kinds of gases.
This graduation design is a gas leak detection alarm system based on single chip microcomputer. This design mainly by an MQ - 4 gas concentration sensor acquisition signals, Concentration and voltage relations system,To convert the concentration of voltage, concentration of voltage conversion, concentration, according to the sound and light alarm alarm device.This system by ADC0832 processing data, use STC89C52 MCU, complete the gas concentration signal collection and display content transmission, display, and other functions.The design of the combustible gas alarm is composed of six parts: sensor,digital tube, sound and light alarm, control circuit, A/D conversion and power module.The software system is based on the C language programming, whose structure is simple and running stable.
This detection alarm system can detect the density of gas , When detecting gas concentration is lower than the set alarm threshold, digital tube display show only measured concentration of combustible gas; When detecting gas concentration exceeds the alarm threshold acousto-optic alarm.
Keywords:MQ-4;ADC0832;STC89C52;Digital tube;Sound and light alarm
目 录
摘 要 1
Abstract 2
绪 论 1
1基于单片机的煤气泄漏检测报警装置概述 2
1.1煤气泄漏检测报警器的概述 2
1.2家用煤气泄漏检测报警器现状 2
1.3家庭燃气泄漏报警的发展趋势 2
1.4煤气泄漏检测报警设计意义 3
2煤气泄露检测报警系统的方案设计 4
2.1煤气泄漏检测报警系统简介 4
2.2甲烷传感器的选型 4
2.3 煤气泄露报警系统的整体设计方案 5
2.3.1煤气泄漏报警器工作原理 5
2.3.2煤气泄漏报警器的结构 5
2.3.3报警器各模块的功能 6
3煤气泄露报警的硬件部分设计 7
3.1主控电路设计 7
3.1.1STC89C52单片机简介 7
3.1.2 STC89C52单片机的基本结构 7
3.1.3 STC89C52RC单片机的引脚 8
3.2电源电路设计 10
3.3可燃甲烷信号采集部分 11
3.4 MQ-4甲烷传感器 11
3.5 A/D转换部分 13
3.5.1 A/D转换电路 13
3.6 甲烷结果测量计算 15
3.7 声光报警部分 15
3.8 计数器译码显示电路 16
3.8.1 LED 的综述 16
3.8.2 LED 的结构 16
3.8.3 LED数码管的显示方法 17
3.9 复位电路 18
3.10 最小系统及按键 18
4燃气泄漏检测报警系统的软件部分 20
4.1程序设计流程与编程 20
4.2系统调试 21
结 论 22
参考文献 23
附录A 基于单片机的煤气泄漏检测报警装置原理图 25
附录B 基于单片机的煤气泄漏检测报警装置结果图 26
附录C C程序 27
致 谢 35