【正文】
清華大學本科畢業(yè)論文 基于單片機的恒溫箱智能控制系統的設計所 在 學 院專 業(yè) 名 稱 自動化 申請學士學位所屬學科 工 學 年 級 2008級 學生姓名、學號指導教師姓名、職稱完 成 日 期 摘 要溫度的測量與控制在工業(yè)、農業(yè)、國防等行業(yè)有著廣泛的應用。隨著微電子技術的發(fā)展,各種高性能的半導體集成溫度傳感器,在溫度測控領域得到了極為廣泛的應用。恒溫箱的智能控制系統是用半導體溫度傳感器做測溫器,用單片機控制溫度平衡,最終達到恒溫的目的。本文對系統所能實現的功能做了簡單介紹,并簡單介紹了系統使用的單片機的性能和發(fā)展情況;對系統使用的模/數轉換芯片TLC2543做了性能方面的簡單說明;同時對測量溫度在55℃~+150℃之間的集成型恒流測溫元件AD590做了介紹。本文重點介紹了系統硬件的分析與設計,對硬件各部分的電路一一進行了介紹。繪制了電路原理圖,并進行了電路的焊接,完成了系統的硬件調試。根據硬件的設計和系統所要實現的功能,本設計對軟件也進行了設計,并經過反復的模擬運行、調試,完成了系統的軟件設計,最后形成了一套完整的智能溫度控制系統。關鍵詞:溫度傳感器;A/D轉換;單片機ABSTRACTMeasurement and control of temperature has broad application in industry such as industry, agriculture, national defense. Go with the development of the microelectronics technology, the integrated various highperformance semiconductor temperature sensor has got extremely broad application in the field of temperature measurement and control. In the intelligent control system of constant temperature box, semiconductor temperature sensor is used to measure its temperature。 microcontroller unit is applied to control temperature balance to achieve the end of constant temperature.This article introduces the function of the system and the performance and developing condition of microcontroller unit used by the system specifically。 the Mold/Number transformation chip TLC2543 which the system used gives the performance aspect simple introduction。 Meanwhile introduces integration constant flow temperature element AD590 which surveys temperature from 55℃ to +150℃.This article mainly introduces the analyses and design of the system hardware electric circuit. It carries on the introduction to each part of electric circuits. Draw up the electric circuit schematic diagram and weld the part of the system, plete the hardware debugging. According to the hardware design and the function which the system will realize, this design carries on designs to the software. And after the repeatedly simulation run, debugging and revision, pletes the design of system software, finally forms a set of intelligent temperature control system. Key words: Temperature sensor;Mold/Number;Microcontroller unit目 錄1 引言 42 系統設計分析 4 系統功能分析 4 系統結構方案確定 53 系統硬件的分析與設計 7 直流穩(wěn)壓電源的設計 7 溫度采集電路的設計 9 AD的選擇及接口電路 11 AT89C52最小系統設計 12 強電控制及過零檢測電路 164 軟件的仿真與調試 19 軟件控制方案 19 系統的干擾及軟件處理措施 19 軟件控制方案 20 控制框圖 215 整體系統調試 27 硬件電路的調試 27 軟件程序調試 28結 論 28參考文獻 29致 謝 301 引言近年來為了保證產品的質量,各個行業(yè)行為規(guī)范就越來越高,眾多機械類、醫(yī)藥類、化工類、建筑類等工業(yè)和企業(yè)都離不開恒溫箱的使用;為了確保恒溫箱許多主要技術的指標可以達到國家技術所要求的規(guī)定,必須對其進行檢測,保證產品的質量[1]。本系統所設計、研發(fā)的數字恒溫箱能非常好地解決這些問題。溫度的控制系統是自動控制系統較為復雜的控制,其控制的滯后性是整個系統中最難克服的難題,因為溫度的變化是純滯后環(huán)節(jié),而溫度的控制也是一個慣性大,應變慢的控制對象[2]。在溫度的控制系統中一般用到的是較為先進的控制系統理論和控制算法。本系統中采用了PID算法,其算法應用到了系統軟件的設計中,對整個加熱過程使用模糊PID控制方案,對于加熱過程中所產生的各種干擾和恒溫箱的慣性問題都進行了分析[3]。恒溫箱的智能控制系統采用半導體集成溫度傳感器滿足溫度測量要求,溫度傳感器將采集的溫度信號轉換成電流信號,然后再由轉換電路將電流信號轉換為電壓信號,通過放大電路和模/數轉換芯片將電壓信號轉換成數字信號,由單片機處理后,將測量得到的溫度值顯示于液晶顯示器上。系統的全部輸入輸出控制集中由單片機統一管理,各有關運行參數的設定,可通過鍵盤輸入,設定溫度、箱溫實時值在液晶顯示模塊上顯示,操作方便。該系統具有實時溫度顯示和溫度設定功能,還具有溫度上、下限報警和自動控制功能。當溫度高于或低于設定值一定程度時,發(fā)出生光報警,消除由于單片機系統意外失控所造成的危險,提高了恒溫箱工作的可靠性和使用安全性。設計任務為:用單片機設計一個控制溫度范圍在30℃~80℃的智能溫度控制系統。設計要求:完成該系統的軟硬件設計,學習掌握單片機采集測控系統的設計方法,提高學習新知識、新技能的能力,培養(yǎng)獨立設計的能力。2 系統設計分析 系統功能分析恒溫箱的智能控制系統由核心處理模塊、溫度采集模塊、鍵盤輸入模塊、液晶顯示模塊、及控制執(zhí)行模塊等組成。本控制系統有以下功能及指標: 溫度控制設定波動范圍小于177。1%,測量精度小于177。1%,控制精度小于177。2%; 實現功能:可以升溫、控溫; 溫度實時顯示; 按鍵輸入,設定可控制范圍內任意溫度值; 溫度上、下限越限報警。