【正文】
本科畢業(yè)論文(設(shè)計(jì)) 題目:基于單片機(jī)的煙霧報(bào)警器的設(shè)計(jì) 姓 名: 韋阿俊 學(xué) 號(hào): 1042051334 專 業(yè): 電子信息工程 院 系: 電子通信工程學(xué)院 指導(dǎo)老師: 秦永平 職稱學(xué)位: 副教授/碩士 完成時(shí)間: 2020 年 5 月 教務(wù)處制 安徽新華學(xué)院本科畢業(yè)論文(設(shè)計(jì))獨(dú)創(chuàng)承諾書 本人按照畢業(yè)論文(設(shè)計(jì))進(jìn)度計(jì)劃積極開展實(shí)驗(yàn)(調(diào)查) 研究活動(dòng),實(shí)事求是地做好實(shí)驗(yàn)(調(diào)查)記錄,所呈交的畢業(yè)論文(設(shè)計(jì))是我個(gè)人在導(dǎo)師指導(dǎo)下進(jìn)行的研究工作及取得的研究成果。據(jù)我所知,除文中特別加以標(biāo)注引用參考文獻(xiàn)資料外,論文(設(shè)計(jì))中所有數(shù)據(jù)均為自己研究成果,不包含其他人已經(jīng)發(fā)表或撰寫過(guò)的研究成果。與我一同工作的同志對(duì)本研究所做的工作已在論文中作了明確說(shuō)明并表示謝意。 畢業(yè)論文(設(shè)計(jì))作者簽名: 日期: 安徽新華學(xué)院 2020 屆本科畢業(yè)論文(設(shè)計(jì)) I 基于單片機(jī)的煙霧報(bào)警器的設(shè)計(jì) 摘 要 隨著社會(huì)和經(jīng)濟(jì)的發(fā)展,防火工作無(wú)疑變得越來(lái)越重要了,但是目前國(guó)內(nèi)的許多研發(fā)都在專注大型場(chǎng)所的火災(zāi)報(bào)警。因此,我們很有必要設(shè)計(jì)一種結(jié)構(gòu)簡(jiǎn)單、經(jīng)濟(jì)實(shí)用的家庭煙霧報(bào)警器來(lái)滿足市場(chǎng)的需求?;诠┘彝ナ褂玫臒熿F報(bào)警器應(yīng)該具備的基本要求和功能,因此設(shè)計(jì)了一種比較合理適用的煙霧報(bào)警器。 該設(shè)計(jì)以單片機(jī) STC89C52 和傳感器 MQ2 作為煙霧報(bào)警器的核心元器件,并配合其它元器件來(lái)實(shí)現(xiàn)聲音報(bào)警等功能。設(shè)計(jì)中選用 STC89C52 單片機(jī)作為控制器,選用MQ2 型 半導(dǎo)體可燃?xì)怏w敏感元件傳感器來(lái)實(shí)現(xiàn)煙霧的檢測(cè)。煙霧報(bào)警器主要由模數(shù)轉(zhuǎn)換電路、單片機(jī)控制電路、聲音報(bào)警電路、煙霧信號(hào)采集及前置放大電路、安全保護(hù)電路和顯示電路構(gòu)成,設(shè)計(jì)比較合理并且價(jià)格低廉、簡(jiǎn)單易懂,使單片機(jī)在整個(gè)煙霧報(bào)警器系統(tǒng)控制中得到了較為充分的應(yīng)用,并且具有很高的的實(shí)用價(jià)值。論文主要針對(duì)煙霧報(bào)警的各個(gè)功能以及組成部分進(jìn)行詳細(xì)的介紹和說(shuō)明,并對(duì)其外圍設(shè)備電路和主控電路之間的接口連接方式,以及系統(tǒng)軟件設(shè)計(jì)進(jìn)行了重點(diǎn)的講解和分析。 關(guān)鍵字 : 煙霧報(bào)警器;單片機(jī);傳感器 安徽新華學(xué)院 2020 屆本科畢業(yè)論文(設(shè)計(jì)) II The Design of Smoke Alarm Based on MCU Abstract With the development of society and economy, fire prevention is being more and more important. However, many of the Ramp。D in China focus on fire alarm for large scale places at present. Therefore, it is necessary to design a economical and practical family smoke detector of simple structure to meet the demand of the market. Based on the basic requirements and functions of smoke alarm for family use, this applicable smoke alarm is designed. Taking STC89C52 MCU and MQ2 sensor as the core ponents, the smoke alarm can realize the function of sound alarm and other functions with the help of other ponents and this design, STC89C52 MCU is chosen as the controller and MQ2 semiconductor inflambale gas sensitive ponent is used to realize the smoke detection. The device is mainly posed of analogtodigital conversion circuit, MCU control circuit, voice alarm circuit, smoke signal acquisition and preamplifier circuit, protection circuit and display circuit. The design at a low cost is rational and easy to understand. By making full use of MCU in the system control of the device, the design is of great practical value. Providing detailed introduction and explanation to the functions and positions of the smoke alarm, the paper elaborates on and analyzes the connection interface between the peripherals and major control circuits and the design of system software. Key Words: The Smoke Alarm; MCU; Sensor 安徽新華學(xué)院 2020 屆本科畢業(yè)論文(設(shè)計(jì)) 目 錄 1 緒 論 ......................................................................................................... 1 課題背景 ..................................................................................................... 1 設(shè)計(jì)概述 ..................................................................................................... 1 設(shè)計(jì)任務(wù)分析 ............................................................................................. 2 2 總體方案設(shè)計(jì) ................................................................................................ 2 煙霧傳感器的介紹 ..................................................................................... 4 MQ2 半導(dǎo)體氣體煙霧傳感器 ................................................................. 4 STC89C52 單片機(jī)簡(jiǎn)介 ............................................................................... 5 單片機(jī)的引腳功能描述 .......................................................................... 5 溫度采集模塊 ............................................................................................. 6 3 系統(tǒng)的硬件電路 ............................................................................................ 8 單片機(jī)最小系統(tǒng) ......................................................................................... 8 單片 機(jī)的時(shí)鐘電路與復(fù)位電路設(shè)計(jì) .......................................................... 9 煙霧檢測(cè) AD 采集電路 ........................................................................... 10 顯示模塊 ................................................................................................... 10 聲音報(bào)警電路 ............................................................................................11 按鍵控制電路 ........................................................................................... 12 電源模塊 ................................................................................................... 12 溫度傳感器 (DS18B20)電路 ..................................................................... 13 DSl8B20 具體參數(shù) ................................................................................. 14 安徽新華學(xué)院 2020 屆本科畢業(yè)論文(設(shè)計(jì)) DSl8B20 接口電路 ................................................................................. 15 4 系統(tǒng)軟件的設(shè)計(jì) .......................................................................................... 17 STC89C52 系列單片機(jī)開發(fā)工具 .............................................................. 17 系統(tǒng)主程序設(shè)計(jì)及流程圖 ....................................................................... 17 主程序初始化流程圖 ............................................................................ 19 報(bào)警子程序設(shè)計(jì)及流程圖 ..................................................................... 19 按鍵輸入設(shè)計(jì)子程序流程圖 ................................................................. 20 5 調(diào)試 ............................................................................................................. 22 軟件調(diào)試的步 驟 ....................................................................................... 22