【正文】
SHANDONGUNIVERSITY OF TECHNOLOGY 畢業(yè)設計說明書 溫室大棚中溫濕度測控系統(tǒng)的研究與設計 學 院: 電氣與電子工程學院 專 業(yè): 電子信息科學與技術 學生姓名 : 學 號: 指導教師 : 20 11 年 6 月 摘 要 I 摘 要 隨 著大棚技術的普及,溫室大棚數(shù)量不斷增多,溫室大棚的溫度控制成為一個難題。目 前應用于溫室大棚的溫度檢測系統(tǒng)大多采用由模擬溫度傳感器、多路模擬開關、 A /D 及單片機等組成的傳輸系統(tǒng)。這種溫度采集系統(tǒng)需要在溫室大棚內布置大量的測溫電纜,才能把現(xiàn)場傳感器的信號送到采集卡上,安裝和拆卸繁雜,成本也高。 本課題提出一種基于單片機并采用數(shù)字化單總線技術的溫度測控系統(tǒng)應用于溫室大棚的的設計方案,該方案是利用溫度傳感器將溫室大棚內溫度的變化,變換成電流的變化,其值由單片機處理,最后由單片機去控制數(shù)字顯示器,顯示溫室大棚內的實際溫度。一旦該溫度值超過我們預先設定的上、下限,單片機便啟動報警系統(tǒng)進行報 警,進而對大棚內溫度進行控制。這種設計方案能對多點的溫度進行實時巡檢,各檢測單元能獨立完成各自功能,同時能夠根據主控機的指令對溫度進行定時采集,測量結果不僅能在本地顯示,而且可以利用單片機串行口,通過 RS 一 485 總線及通信協(xié)議將采集的數(shù)據傳送到計算機,進行進一步的存檔、處理。主控機負責控制指令的發(fā)送,控制各個從機進行溫度采集,收集測量數(shù)據,并對測量結果 (包括歷史數(shù)據 )進行整理、顯示和存儲。該測控系統(tǒng)不需要任何固定網絡的支持,安裝簡單方便,系統(tǒng)穩(wěn)定可靠、可維護性好 . 關鍵詞 :溫、濕度測控, AT89S52 單片 機, PC 機, RS485 通信 Abstract II Abstract With the popularization of greenhouse technology, the amount of greenhouse is larger and larger. However, the temperature control of greenhouse is being a difficult Problem. Currently, the temperature control system of greenhouse is mostly using a transfers system which consists of analog temperature sensors, multiplexing analog switches, A/D conversion units and SCM. This kind of temperature collection System needs a lot of cables which is laid to make the signal of the sensor be sent to the collection card in the greenhouse. Thus the work of fixing and take down is miscellaneous, and the cost is high. This Paper gives a greenhouse temperature control project which 15 based upon the SCM and digital monobus technology. In this project, the change of temperature in the greenhouse is transformed into the change of electric current and then into the change of voltage by using the temperature result is dealt with by SCM. At last the real time temperature in the greenhouse is displayed on the monitor under the control of SCM. Once the value of the temperature in the greenhouse exceeds the minimum and maximum which is preestablished, the SCM will give an alarm and auto control the temperature in the greenhouse. This Project can make real time patrol checking to the different nod?s temperature in the greenhouse, and every separate checking unit can finish its task independently. At the same time , very separate checking unit can make timing collection according to the instruction from the main control, and the measure results can not only be displayed at home but also can be further Processed and be kept in the archives by using the SCM?s serial interface and RS454 bus and munication Protocols. This temperature control system whose stabilization and maintainability is good doesn?t need any fixed work to support and is easily fixed. Key words: humiture measuring and controlling, AT89S52 MCU, PC, RS485bus目 錄 III 目 錄 摘 要 ............................................................................................................................ I Abstract ..........................................................................................................................II 目 錄 ......................................................................................................................... III 第一章 引 言 ............................................................................................................. 1 選題背景 .......................................................................................................1 現(xiàn)實狀況及未來發(fā)展方向 ...........................................................................2 本設計的主要內容 .......................................................................................3 第二章 溫室大棚測控方案的設計 ........................................................................... 5 系統(tǒng)方案的整體設計 ...................................................................................5 溫度的測量和控制 .......................................................................................5 溫度傳感器的選擇 ............................................................................. 5 DS18B20 的介紹 ................................................................................ 6 溫度測控電路圖 ................................................................................. 9 濕度的測量和控制 .....................................................................................10 濕度傳感器的選擇 ........................................................................... 10 HS1101 濕度傳感器介紹 ................................................................. 11 濕度傳感器測量電路 ....................................................................... 12 單片機系統(tǒng)設計 .........................................................................................14 單片機選擇 ....................................................................................... 14 AT89S52 簡介 ................................................................................. 14 AT89S52 基本電路 ......................................................................... 17 顯示系統(tǒng) ........................................................................................................18 顯示系統(tǒng)選擇 ................................................................................... 18 顯示系統(tǒng)電路 ................................................................................... 19 通信系統(tǒng) .....................................................................................................21 通信方式選擇 ................................................................................... 21 通信 MAX485 電路 ............................................................................. 22 信號采集通道的選擇 ...................................................................................23 采集通道選擇 ................................................................................... 23