單片機溫濕度控制系統(tǒng).doc
約46頁DOC格式手機打開展開
單片機溫濕度控制系統(tǒng),1.4萬字46頁包括總體電路圖,流程圖,程序清單摘 要本文設計基于,完成對系統(tǒng)的溫度、濕度的檢測、控制和顯示。控制芯片選用at89c2051單片機,主要用溫度傳感器ad590來檢測溫度,用濕度傳感器hs1101來檢測濕度,用三個控制按鍵來實現(xiàn)按鍵控制,用8位led控制驅動器max...
![](http://img.queshao.com/images/pcgzh.gif)
![](http://preview.queshao.com/tobuy/34137.gif)
內容介紹
此文檔由會員 小甜甜 發(fā)布
單片機溫濕度控制系統(tǒng)
1.4萬字 46頁
包括總體電路圖,流程圖,程序清單
摘 要
本文設計基于單片機溫濕度控制系統(tǒng),完成對系統(tǒng)的溫度、濕度的檢測、控制和顯示。
控制芯片選用AT89C2051單片機,主要用溫度傳感器AD590來檢測溫度,用濕度傳感器HS1101來檢測濕度,用三個控制按鍵來實現(xiàn)按鍵控制,用8位LED控制驅動器MAX7219芯片來完成顯示部分,用8位串行控制的模數(shù)轉換器TLC0834芯片來完成轉換部分。數(shù)據(jù)采集部分是將溫濕度傳感器置于烤煙房內部,測出烤煙房內的溫濕度值,經(jīng)過數(shù)據(jù)的調理轉換為數(shù)字信號之后送入AT89C2051單片機中,然后LED顯示出溫濕度測量值。單片機將預設值與測量值進行比較,根據(jù)比較結果作出判斷,經(jīng)過程序分析處理發(fā)送相應指令控制執(zhí)行機構動作,接通或關閉各種執(zhí)行機構的繼電器,近而控制爐灶風門及進風洞機械門開啟的大小,以次來調節(jié)烤煙房內溫濕度。如此循環(huán)不斷,使溫濕度值與設定值保持一致。當溫濕度值超過允許的誤差范圍,系統(tǒng)將發(fā)出報警,如果有必要,煙農(nóng)可以根據(jù)煙葉烘烤的程度通過按紐來人工修改片內存儲的烘烤溫濕度預設值。通過對整個系統(tǒng)的核心單片機部分的設計,達到優(yōu)化控制溫濕度的目標。這些硬件電路在設計中都有詳細的介紹??刂扑惴ú捎肞ID控制。
本設計用單片機控制易于實現(xiàn)溫濕度的檢測,。
關鍵詞:AT89C2051;PID算法;溫度;濕度
Abstract
This paper-based microcontroller design temperature and humidity control system, the completion of the system of temperature, humidity detection, control and display.
Selection AT89C2051 control chip microcontroller, the main AD590 temperature sensor to detect temperature and humidity sensors used to detect HS1101 humidity, with the three control buttons to achieve key control, with eight LED control drive MAX7219 chip to complete the display part, with 8 Serial control of the ADC TLC0834 to complete the conversion of the chip. Data acquisition is part of temperature and humidity sensors will be placed in the internal flue-cured tobacco, measured temperature and humidity inside the flue-cured tobacco value, after the data into a digital signal conditioning into the AT89C2051 after the SCM, and then LED display to temperature and humidity measurements. SCM will default and to compare measurements, to make judgments based on the results, after analysis of treatment procedures accordingly sent instructions control executive body movements, or connected to the closure of various implementing agencies of the relay, which control nearly stove and into the throttle Mechanical wind tunnel opened the door to the size, Yici to regulate tobacco room temperature and humidity. This cycle so that the temperature and humidity values consistent with the settings. When the temperature and humidity of over allowed range of error, the system will issue a warning, if necessary, according to tobacco growers can be baked through the button to the extent of on-chip memory to amend the baking temperature and humidity default. Through the system as a whole the core part of the microcontroller design, to achieve optimal
of all details. Control algorithms using PID control.
This design is easy to realize with MCU control temperature and humidity testing。
Key words: AT89C2051; PID algorithm; temperature and humidity
目 錄
第1章 緒 論 1
1.1 本文的主要工作 1
1.2 系統(tǒng)的設計意義 1
第2章 方案論證 2
2.1 系統(tǒng)的總體方案及技術指標 2
2.2 系統(tǒng)的方案論證 3
第3章 硬件設計 5
3.1 溫度檢測電路的設計 5
3.1.1 溫度傳感器 5
3.1.2 溫度檢測電路 5
圖3.2 AD590基本圖 6
3.2 濕度檢測電路的設計 7
3.2.1 濕度傳感器 7
3.2.2 濕度檢測電路 9
3.3 主芯片的選擇 10
3.4 單片機最小系統(tǒng)的設計 12
3.4.1 MAX813L芯片簡述 12
3.4.2最小系統(tǒng) 13
3.5 鍵盤和顯示電路 14
3.5.1 顯示電路 14
3.5.2 鍵盤電路 17
3.6 轉換電路的設計 18
3.6.1 TLC0834芯片介紹 18
3.7 控制電路的設計 20
3.8 電源電路的設計 21
3.9 擴展電路的設計 22
3.9.1 I/O口的擴展 22
3.9.2 數(shù)據(jù)、程序存儲器的擴展 22
3.10 報警電路的設計 24
第4章 軟件設計 25
4.1 控制算法的選擇 25
4.2 主程序 27
4.3 中斷程序 28
4.4 A/D轉換程序 28
4.5 溫度控制程序 28
4.6 濕度控制程序 28
4.7 控制算法程序 33
第5章 結論 34
參考文獻 35
致 謝 37
附 錄Ⅰ 38
附錄Ⅱ 43
參考文獻
[9] 潘其光.常用測溫儀表技術問答.國防工業(yè)出版社
[10] 楊世成.信號放大電路.電子工業(yè)出版社
[11] 高光天.儀表放大器應用.科學出版社
[12] 潘立民,王燕芳.微型計算機控制技術.人民郵電出版社
[13] 邵敏權,劉剛.單片機原理實驗及應用.吉林科學技術出版社
[14] 陳汝全.實用微機與單片機控制技術.電子科技大學出版社
[15] 王森.儀表使用數(shù)據(jù)手冊.化學工業(yè)出版社
附 錄Ⅰ
程序清單
⑴主程序
MAIN:
MOV SP , #60H
MOV P2 , #0FFH
MOV R2, #8
MOV R0, #40H
OVER
......
附 錄II 總體電路圖
1.4萬字 46頁
包括總體電路圖,流程圖,程序清單
摘 要
本文設計基于單片機溫濕度控制系統(tǒng),完成對系統(tǒng)的溫度、濕度的檢測、控制和顯示。
控制芯片選用AT89C2051單片機,主要用溫度傳感器AD590來檢測溫度,用濕度傳感器HS1101來檢測濕度,用三個控制按鍵來實現(xiàn)按鍵控制,用8位LED控制驅動器MAX7219芯片來完成顯示部分,用8位串行控制的模數(shù)轉換器TLC0834芯片來完成轉換部分。數(shù)據(jù)采集部分是將溫濕度傳感器置于烤煙房內部,測出烤煙房內的溫濕度值,經(jīng)過數(shù)據(jù)的調理轉換為數(shù)字信號之后送入AT89C2051單片機中,然后LED顯示出溫濕度測量值。單片機將預設值與測量值進行比較,根據(jù)比較結果作出判斷,經(jīng)過程序分析處理發(fā)送相應指令控制執(zhí)行機構動作,接通或關閉各種執(zhí)行機構的繼電器,近而控制爐灶風門及進風洞機械門開啟的大小,以次來調節(jié)烤煙房內溫濕度。如此循環(huán)不斷,使溫濕度值與設定值保持一致。當溫濕度值超過允許的誤差范圍,系統(tǒng)將發(fā)出報警,如果有必要,煙農(nóng)可以根據(jù)煙葉烘烤的程度通過按紐來人工修改片內存儲的烘烤溫濕度預設值。通過對整個系統(tǒng)的核心單片機部分的設計,達到優(yōu)化控制溫濕度的目標。這些硬件電路在設計中都有詳細的介紹??刂扑惴ú捎肞ID控制。
本設計用單片機控制易于實現(xiàn)溫濕度的檢測,。
關鍵詞:AT89C2051;PID算法;溫度;濕度
Abstract
This paper-based microcontroller design temperature and humidity control system, the completion of the system of temperature, humidity detection, control and display.
Selection AT89C2051 control chip microcontroller, the main AD590 temperature sensor to detect temperature and humidity sensors used to detect HS1101 humidity, with the three control buttons to achieve key control, with eight LED control drive MAX7219 chip to complete the display part, with 8 Serial control of the ADC TLC0834 to complete the conversion of the chip. Data acquisition is part of temperature and humidity sensors will be placed in the internal flue-cured tobacco, measured temperature and humidity inside the flue-cured tobacco value, after the data into a digital signal conditioning into the AT89C2051 after the SCM, and then LED display to temperature and humidity measurements. SCM will default and to compare measurements, to make judgments based on the results, after analysis of treatment procedures accordingly sent instructions control executive body movements, or connected to the closure of various implementing agencies of the relay, which control nearly stove and into the throttle Mechanical wind tunnel opened the door to the size, Yici to regulate tobacco room temperature and humidity. This cycle so that the temperature and humidity values consistent with the settings. When the temperature and humidity of over allowed range of error, the system will issue a warning, if necessary, according to tobacco growers can be baked through the button to the extent of on-chip memory to amend the baking temperature and humidity default. Through the system as a whole the core part of the microcontroller design, to achieve optimal
of all details. Control algorithms using PID control.
This design is easy to realize with MCU control temperature and humidity testing。
Key words: AT89C2051; PID algorithm; temperature and humidity
目 錄
第1章 緒 論 1
1.1 本文的主要工作 1
1.2 系統(tǒng)的設計意義 1
第2章 方案論證 2
2.1 系統(tǒng)的總體方案及技術指標 2
2.2 系統(tǒng)的方案論證 3
第3章 硬件設計 5
3.1 溫度檢測電路的設計 5
3.1.1 溫度傳感器 5
3.1.2 溫度檢測電路 5
圖3.2 AD590基本圖 6
3.2 濕度檢測電路的設計 7
3.2.1 濕度傳感器 7
3.2.2 濕度檢測電路 9
3.3 主芯片的選擇 10
3.4 單片機最小系統(tǒng)的設計 12
3.4.1 MAX813L芯片簡述 12
3.4.2最小系統(tǒng) 13
3.5 鍵盤和顯示電路 14
3.5.1 顯示電路 14
3.5.2 鍵盤電路 17
3.6 轉換電路的設計 18
3.6.1 TLC0834芯片介紹 18
3.7 控制電路的設計 20
3.8 電源電路的設計 21
3.9 擴展電路的設計 22
3.9.1 I/O口的擴展 22
3.9.2 數(shù)據(jù)、程序存儲器的擴展 22
3.10 報警電路的設計 24
第4章 軟件設計 25
4.1 控制算法的選擇 25
4.2 主程序 27
4.3 中斷程序 28
4.4 A/D轉換程序 28
4.5 溫度控制程序 28
4.6 濕度控制程序 28
4.7 控制算法程序 33
第5章 結論 34
參考文獻 35
致 謝 37
附 錄Ⅰ 38
附錄Ⅱ 43
參考文獻
[9] 潘其光.常用測溫儀表技術問答.國防工業(yè)出版社
[10] 楊世成.信號放大電路.電子工業(yè)出版社
[11] 高光天.儀表放大器應用.科學出版社
[12] 潘立民,王燕芳.微型計算機控制技術.人民郵電出版社
[13] 邵敏權,劉剛.單片機原理實驗及應用.吉林科學技術出版社
[14] 陳汝全.實用微機與單片機控制技術.電子科技大學出版社
[15] 王森.儀表使用數(shù)據(jù)手冊.化學工業(yè)出版社
附 錄Ⅰ
程序清單
⑴主程序
MAIN:
MOV SP , #60H
MOV P2 , #0FFH
MOV R2, #8
MOV R0, #40H
OVER
......
附 錄II 總體電路圖