【正文】
集四大部分。該煙霧報警器的基本組成部分應包括:字符顯示電路、單片機控制電路、信號采集模數轉換電路、安全保護電路和聲光報警電路等部分組成。按照軟件實現的功能,主要分為主程序、初始化子程序、濃度顯示子程序、報警子程序、報警限值設置子程序。 安徽新 華學院 2020 屆本科畢業(yè)論文(設計) 2 設計任務分析 本篇論文是煙霧報警器的設計: (1) 對系統(tǒng)進行整體規(guī)劃和結構設計。傳感器好比人的鼻子,是信息時代的感官器件, “鼻子 ”的靈敏度直接導致了系統(tǒng)的反應速度。單片機在傳感器和報警器中起著橋梁 樞紐作用,在工農業(yè)生產及人們的日常生活中已深入應用,隨著社會的發(fā)展需求,各種類型的單片機應運而生。為了早期發(fā)現和通報火災,減少和防止火災危害,防止火災引起的燃燒和爆炸等事故,造成嚴重的人員傷亡以及經濟損失,以及影響社會主義現代化建設。煙霧報警器主要由模數轉換電路、單片機控制電路、聲音報警電路、煙霧信號采集及前置放大電路、安全保護電路和顯示電路構成,設計比較合理并且價格低廉、簡單易懂,使單片機在整個煙霧報警器系統(tǒng)控制中得到了較為充分的應用,并且具有很高的的實用價值。因此,我們很有必要設計一種結構簡單、經濟實用的家庭煙霧報警器來滿足市場的需求。 本科畢業(yè)論文(設計) 題目:基于單片機的煙霧報警器的設計 姓 名: 韋阿俊 學 號: 1042051334 專 業(yè): 電子信息工程 院 系: 電子通信工程學院 指導老師: 秦永平 職稱學位: 副教授/碩士 完成時間: 2020 年 5 月 教務處制 安徽新華學院本科畢業(yè)論文(設計)獨創(chuàng)承諾書 本人按照畢業(yè)論文(設計)進度計劃積極開展實驗(調查) 研究活動,實事求是地做好實驗(調查)記錄,所呈交的畢業(yè)論文(設計)是我個人在導師指導下進行的研究工作及取得的研究成果。 畢業(yè)論文(設計)作者簽名: 日期: 安徽新華學院 2020 屆本科畢業(yè)論文(設計) I 基于單片機的煙霧報警器的設計 摘 要 隨著社會和經濟的發(fā)展,防火工作無疑變得越來越重要了,但是目前國內的許多研發(fā)都在專注大型場所的火災報警。設計中選用 STC89C52 單片機作為控制器,選用MQ2 型 半導體可燃氣體敏感元件傳感器來實現煙霧的檢測。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 安徽新華學院 2020 屆本科畢業(yè)論文(設計) 目 錄 1 緒 論 ......................................................................................................... 1 課題背景 ..................................................................................................... 1 設計概述 ..................................................................................................... 1 設計任務分析 ............................................................................................. 2 2 總體方案設計 ................................................................................................ 2 煙霧傳感器的介紹 ..................................................................................... 4 MQ2 半導體氣體煙霧傳感器 ................................................................. 4 STC89C52 單片機簡介 ............................................................................... 5 單片機的引腳功能描述 .......................................................................... 5 溫度采集模塊 ............................................................................................. 6 3 系統(tǒng)的硬件電路 ............................................................................................ 8 單片機最小系統(tǒng) ......................................................................................... 8 單片 機的時鐘電路與復位電路設計 .......................................................... 9 煙霧檢測 AD 采集電路 ........................................................................... 10 顯示模塊 ................................................................................................... 10 聲音報警電路 ............................................................................................11 按鍵控制電路 ........................................................................................... 12 電源模塊 ................................................................................................... 12 溫度傳感器 (DS18B20)電路 ..................................................................... 13 DSl8B20 具體參數 ................................................................................. 14 安徽新華學院 2020 屆本科畢業(yè)論文(設計) DSl8B20 接口電路 ................................................................................. 15 4 系統(tǒng)軟件的設計 .......................................................................................... 17 STC89C52 系列單片機開發(fā)工具 .............................................................. 17 系統(tǒng)主程序設計及流程圖 ....................................................................... 17 主程序初始化流程圖 ............................................................................ 19 報警子程序設計及流程圖 ..................................................................... 19 按鍵輸入設計子程序流程圖 ................................................................. 20 5 調試 ............................................................................................................. 22 軟件調試的步 驟 ....................................................................................... 22 硬件調試的步驟 ....................................................................................... 23 調試過程中遇到的問題及解決方法 ....................