【正文】
apid development of science and technology, especially the development of microprocessor and sensor since twentyfirst Century, making more and more extensive application of singlechip microcontroller, so will technology applied to room temperature and humidity measurement and control system. This paper first describes the background and significance of the subject, then the whole system hardware design and software design are emphatically analyzed, which in the hardware design of the selected device are described, such as LED, LCD1602, STC89C52 microcontroller, DHT11 temperature and humidity sensor and the buzzer button, then the this design is summarized. This design uses digital temperature and humidity sensor DHT11 to detect the temperature and humidity inside the room, through the button to set upper and lower values of temperature and humidity, the detected value is pared with the set value of the drive and corresponding cooling heating and humidifying dehumidifying device. The whole control process using passive buzzer as the alarm, select the system LCD1602 as a liquid crystal display, realtime display of temperature and humidity detection value. The hardware of this system has the advantages of simple structure, flexible operation, with the language C language development, KEIL4 application development software development tools and design. Key Words: STC89C52 microcontroller。整個(gè)控制過(guò)程使用無(wú)源蜂鳴器作為超限報(bào)警,選擇液晶 LCD1602 作為整個(gè)系統(tǒng)的顯示器,實(shí)時(shí)顯示檢測(cè)的溫濕度值。本文首先對(duì)背景及意義進(jìn)行敘述切入主題,然后對(duì)整個(gè)系統(tǒng)的硬件設(shè)計(jì)和軟件設(shè)計(jì)重點(diǎn)分析,其中在硬件 設(shè)計(jì)中還分別對(duì)所選器件做了一個(gè)簡(jiǎn)單的敘述介紹,比如 LED, LCD1602, STC89C52 單片機(jī), DHT11溫濕度傳感器及蜂鳴器按鍵等,最后再對(duì)這一設(shè)計(jì)進(jìn)行總結(jié)。福建農(nóng)林大學(xué)金山學(xué)院本科畢業(yè)設(shè)計(jì)說(shuō)明書 目錄 摘要 ................................................................... I Abstract .............................................................. II 1 引言 ................................................................ 1 課題的研究背景及意義 ............................................ 1 單片機(jī)的意義和本設(shè)計(jì)特點(diǎn) ........................................ 1 2 硬件設(shè)計(jì) ............................................................ 3 系統(tǒng)總設(shè)計(jì)結(jié)構(gòu)圖 ................................................ 3 LCD1602 液晶簡(jiǎn)介 ................................................ 3 DHT11 溫濕度傳感器簡(jiǎn)介 .......................................... 4 按鍵、 LED 和蜂鳴器簡(jiǎn)介 .......................................... 4 主控芯片 STC89C52 單片機(jī)的簡(jiǎn)介 ................................... 5 系統(tǒng)電路設(shè)計(jì) .................................................... 7 晶振電路 .................................................. 7 復(fù)位電路 .................................................. 8 電源電路 .................................................. 9 LCD1602 顯示電路 ........................................... 9 溫濕度檢測(cè)電路 ........................................... 10 按鍵電路 ................................................. 10 報(bào)警電路 ................................................. 10 加熱加濕電路 ............................................. 11 降溫去濕電路 ............................................. 12 總電路設(shè)計(jì) ..................................................... 12 3 軟件設(shè)計(jì) ........................................................... 14 系統(tǒng)概述 ....................................................... 14 程序設(shè)計(jì)流程圖 ................................................. 14 4 仿真及程序調(diào)試 ..................................................... 16 程序調(diào)試用到的軟件及工具 ...................................... 16 KEIL C51 簡(jiǎn)介 ................................................. 16 調(diào)試過(guò)程 ....................................................... 16 Proteus 介紹 ................................................... 16 仿真電路設(shè)計(jì) ................................................... 17 5 結(jié)束語(yǔ) ............................................................. 18 參考文獻(xiàn) .............................................................. 19 致謝 .................................................................. 20 福建農(nóng)林大學(xué)金山學(xué)院本科畢業(yè)設(shè)計(jì)說(shuō)明書 附錄 .................................................................. 21 附錄 1 完整電路圖 .................................................. 21 附錄 2 完整 PCB 圖 .................................................. 21 附錄 3 源程序 ...................................................... 22 福建農(nóng)林大學(xué)金山學(xué)院本科畢業(yè)設(shè)計(jì)說(shuō)明書 I 摘要 本設(shè)計(jì)研究基于單片機(jī)的溫濕度檢測(cè)系統(tǒng),旨在實(shí)現(xiàn)對(duì)機(jī)房?jī)?nèi)溫濕度自動(dòng)控制,解決人才資源浪費(fèi),管理不及時(shí)的問題。隨著科學(xué)技術(shù)的快速發(fā)展,尤其是進(jìn)入 21世紀(jì)以來(lái)微處理器及傳感器的發(fā)展,使得單片機(jī)的應(yīng)用越來(lái)越廣泛,因此也將單片機(jī)技術(shù)應(yīng)用到機(jī)房溫濕度檢測(cè)控制系統(tǒng)上。本設(shè)計(jì)中采用 數(shù)字溫濕度傳感器 DHT11 對(duì)機(jī)房?jī)?nèi)溫度及濕度的檢測(cè),通過(guò)按鍵來(lái)設(shè)定溫濕度的上下限值,將檢測(cè)值與設(shè)定值比較驅(qū)動(dòng)對(duì)應(yīng)的加熱加濕和降溫去濕裝置。 本系統(tǒng) 硬件結(jié)構(gòu)簡(jiǎn)單,操作靈活,以高級(jí)語(yǔ)言 C語(yǔ)言開發(fā), KEIL4 程序開發(fā)軟件為開發(fā)工具設(shè)計(jì)而成 。 DHT11 temperature and humidity sensor。 LCD1602 crystal。這時(shí)負(fù)責(zé)采樣記錄的人員就不能花時(shí)