【正文】
基于單片機(jī) AT89S52 的水溫控制系統(tǒng) I 畢業(yè)設(shè)計(jì)(論文)報(bào)告 課題名稱: 基于單片機(jī) AT89S52 的水溫控制系統(tǒng) 摘 要 溫度是工業(yè)控制對(duì)象主要被控參數(shù)之一,在溫度控制中,由于受到溫度被控對(duì)象特性(如慣性大、滯后大、非線性等)的影響,使得控制性能難以提高, 有些工藝過程其溫度控制 好壞 直接影響著產(chǎn)品的質(zhì)量 , 因而設(shè)計(jì)一種較為理想的溫度控制系統(tǒng)是非常有價(jià)值的。 本設(shè)計(jì) 介紹了 以 AT89S52單 片機(jī)為核心的溫度控制系統(tǒng)的工作原理和設(shè)計(jì)方法。溫度信號(hào)由線性度較好的電流型溫度傳感器 AD590 采集,經(jīng)過電流 電壓轉(zhuǎn)換及放大電路后將信號(hào)輸 入模數(shù)轉(zhuǎn)換器 ADS7818P 轉(zhuǎn)換為數(shù)字信號(hào),最后 傳送給單片機(jī) ,并通過可控硅的通斷控制加熱裝置的平均功率 。文中介紹了該控制系統(tǒng)的硬件部分,包括:溫度采集 電路、 信號(hào)變換電路,溫度控制電路 ,溫度顯示電路 。單片機(jī)通過對(duì)信號(hào)進(jìn)行相應(yīng)處理,從而實(shí)現(xiàn)溫度控制的目的。文中還 介紹了軟件設(shè)計(jì)部分,在這里采用模塊化結(jié)構(gòu),主要模塊有: 數(shù)碼管顯示程序、鍵盤掃描及按鍵處理程序、溫度信號(hào)處理程序 和 PWM 控制程序 。 實(shí)驗(yàn)結(jié)果表明 該系統(tǒng)可實(shí)現(xiàn)對(duì)溫度的測量,并能根據(jù)設(shè)定值對(duì)溫度進(jìn)行調(diào)節(jié),實(shí)現(xiàn)控溫的目的 。 關(guān)鍵字 : AT89S52 , 水溫控 制 , 可控硅 , M0C3041基于單片機(jī) AT89S52 的水溫控制系統(tǒng) II Abstract The temperature is one of the mainly charged parameters which are industrial control targets. It is difficult to enhance the control performance due to the characteristics of the temperature charged object. Such as inertia, hysteresis and nonlinear, etc…Its temperature control process will have a direct impact on the quality of the product in some technological process. Therefore it is absolute valuable to design an ideal temperature control system. The paper introduces the theory and the design method of temperature control system,the systematic core of which is temperature can be gathered by the temperature transducer AD590 with a good linearization and then the signals should be turned through the CurrentVoltage circuit and finally the signal should be sent to ADS7818P to be changed from analog signals to digital signals and then to the single chip and control the average power of the heater through controlled silicon’s breakover. The paper introduces the hardare of the control hardware circuit includes temperature gathering, signal convert,temperature control ,temperature display,and keyboard input .The single chip can control the temperature by dealing with the signals paper also introduces the software of the design .The main procedures are designed with the modularize structure ,which is easy to main procedures include: nixietube display procedure, keyboard scan procedure ,keypress processing procedure,temperature signals processing procedure and PWM control results demonstrate that the system can realize to survey the water temperature, and it can adjust the temperature according to the setting value. KeyWords : AT89S52 , Temperature control , Controlled silicon , M0C3041 基于單片機(jī) AT89S52 的水溫控制系統(tǒng) III 目 錄 摘 要 ............................................................ I Abstract ............................................................ II 目 錄 ........................................................... III 第一章 引 言 ...................................................... 1 水溫控制系統(tǒng)概述 .............................................. 1 水溫控制系統(tǒng)設(shè)計(jì)任務(wù)與要求 .................................... 1 第二章 水溫控制系統(tǒng)基本設(shè)計(jì)方案 .................................... 1 水溫控制系統(tǒng)總體方框圖 ........................................ 1 水溫控制系統(tǒng)方案論證 .......................................... 2 控制器模塊設(shè)計(jì)方案 ............................................... 2 加熱裝置模塊設(shè)計(jì)方案 .............................................. 3 溫度采集模塊設(shè)計(jì)方案 .............................................. 3 鍵盤與顯示模塊設(shè)計(jì)方案 ............................................ 3 第三章 水溫控制系統(tǒng)硬件電路設(shè)計(jì) .................................... 4 溫度采集部分 .................................................. 4 溫度傳感器 AD590簡介 .............................................. 4 AD590的工作原理 ................................................. 5 信號(hào)轉(zhuǎn)換部分 .................................................. 6 電流 電壓轉(zhuǎn)換及放大電路 ........................................... 6 模 /數(shù)轉(zhuǎn)換電路 .................................................... 7 單片機(jī)控制部分 ................................................ 8 單片機(jī)時(shí)鐘電路 ................................................... 8 單片機(jī)復(fù)位電路 ................................................... 9 單片機(jī)鍵盤與顯示電路 .............................................. 9 電源電路部分 ................................................. 10 執(zhí)行部分電路 ................................................. 11 第四章 水溫控制系統(tǒng)軟件電路設(shè)計(jì) ................................... 12 軟件設(shè)計(jì)總體框圖 ............................................. 12 主程序流程圖 ................................................. 12 數(shù)據(jù)采集轉(zhuǎn)換程序設(shè)計(jì) ......................................... 13 鍵盤與顯示程序設(shè)計(jì) ........................................... 14 基于單片機(jī) AT89S52 的水溫控制系統(tǒng) IV 光耦可控硅控制程序設(shè)計(jì) ....................................... 15 第五章 系統(tǒng)的調(diào)試與結(jié)果分析 ....................................... 16 AD590 測 溫電路調(diào)試 ........................................... 16 攝氏溫度電路調(diào)試 ............................................. 16 攝氏溫度電路調(diào)試方法 ............................................. 16 攝氏溫度電路部分誤差分析 ......................................... 17 控制電路的調(diào)試 ............................................... 17 控制電路調(diào)試方法 ................................................ 17 控制電路調(diào)試過程應(yīng)注意的問題 ..................................... 18 測試結(jié)果及分析 ............................................... 18 設(shè)計(jì)過程中遇到的問題及解決方法 ............................... 18 總 結(jié) ........................................................... 20 謝 辭 ........................................................... 21 參考文獻(xiàn) ........................................................... 22 附 錄 ........................................................... 23 附錄 1:水溫控制系統(tǒng)各模塊程序 ................................... 23 附錄 2:系統(tǒng)電路圖 ............................... 錯(cuò)誤 !未定義書簽。 附錄 3:系統(tǒng)實(shí)物圖 ............................... 錯(cuò)誤 !未定義書簽。 1 第一章 引 言 水溫控制系統(tǒng)概述 溫度控制系統(tǒng)廣泛應(yīng)用于社會(huì)生活的各個(gè)領(lǐng) 域 ,如家電、汽車、材料、電力電子等 ,常用的控制電路根據(jù)應(yīng)用場合和所要求的性能指標(biāo)有所不同 , 在工業(yè)企業(yè)中 ,如何提高溫度控制對(duì)象的運(yùn)行性能一直以來都是控制人員和現(xiàn)場技術(shù)人員努力解決的問題。這類控制對(duì)象慣性大 ,滯后現(xiàn)象嚴(yán)重 ,存在很多不確定的因素 ,難以建立精確的數(shù)學(xué)模型 ,從而導(dǎo)致控制系統(tǒng)性能不佳 ,甚至出現(xiàn)控制不穩(wěn)定、失控現(xiàn)象。傳統(tǒng)的繼電器調(diào)溫電路