【正文】
bright future. Key words: AT89S52; CAN bus; DS18B20; PC; Cold Storage Control 本科生畢業(yè)設(shè)計(jì)(論文) III 目 錄 第 1 章 緒 論 ........................................................................................................... 1 課題背景 ..................................................................................................... 1 冷庫(kù)的國(guó)內(nèi)外現(xiàn)狀 ..................................................................................... 1 冷庫(kù)控制系統(tǒng)的現(xiàn)狀及發(fā)展 ..................................................................... 3 第 2 章 冷庫(kù)溫度測(cè)控系統(tǒng)總體設(shè)計(jì) ..................................................................... 5 課題總體分析 ............................................................................................. 5 方案論證 ..................................................................................................... 5 系統(tǒng)總體框架 ............................................................................................. 6 各模塊功能介紹 ......................................................................................... 7 第 3 章 系統(tǒng)硬件電路設(shè)計(jì) ..................................................................................... 8 單片機(jī)系統(tǒng)的設(shè)計(jì) ..................................................................................... 8 單片機(jī)的選擇 .................................................................................. 8 單片機(jī)外圍電路設(shè)計(jì) .................................................................... 10 鍵盤和顯示電路的設(shè)計(jì) ........................................................................... 11 直流穩(wěn)壓電源的設(shè)計(jì) ............................................................................... 13 RS232 接口電路的設(shè)計(jì) ........................................................................... 14 溫度傳感器模塊的設(shè)計(jì) ........................................................................... 15 溫度傳感器的選擇 ........................................................................ 15 溫度傳感器電路設(shè)計(jì) .................................................................... 16 CAN 總線模塊的設(shè)計(jì) ............................................................................. 17 控制電路的設(shè)計(jì) ....................................................................................... 21 第 4 章 系統(tǒng)軟件設(shè)計(jì) ........................................................................................... 23 PC 機(jī)監(jiān)測(cè)軟件設(shè)計(jì) ................................................................................. 23 Visua1 Basic 軟件介紹 .................................................................. 23 串行通信控件介紹 ........................................................................ 23 PC 機(jī)人機(jī)界面設(shè)計(jì) ...................................................................... 25 單片機(jī)軟件設(shè)計(jì) ...................................................................................... 26 上節(jié)點(diǎn)單片機(jī)程序設(shè)計(jì) ................................................................ 27 下節(jié)點(diǎn)單片機(jī)程序設(shè)計(jì) ................................................................ 31 第 5 章 系統(tǒng)的可靠性和抗干擾性設(shè)計(jì) ............................................................... 38 本科生畢業(yè)設(shè)計(jì)(論文) IV 系 統(tǒng)的硬件抗干擾設(shè)計(jì) ........................................................................... 38 系統(tǒng)的軟件抗干擾設(shè)計(jì) ........................................................................... 39 第 6 章 總 結(jié) ........................................................................................................... 40 參考文獻(xiàn) ................................................................................................................. 41 致 謝 ....................................................................................................................... 43 附 錄Ⅰ ................................................................................................................... 44 附 錄 Ⅱ ................................................................................................................... 45 附 錄Ⅲ ................................................................................................................... 46 附 錄Ⅳ ................................................................................................................... 61 本科生畢業(yè)設(shè)計(jì)(論文) 1 第 1章 緒 論 課題背景 隨著人們生活水平的提高,人們對(duì)水果、蔬菜的需求量也與日俱增,食用鮮果已成為一種新的發(fā)展趨勢(shì)。 系統(tǒng)通過 CAN 總線 實(shí)現(xiàn)對(duì)冷 庫(kù)所有倉(cāng)庫(kù)的 遠(yuǎn)程 管理,控制各個(gè)倉(cāng)庫(kù) 的信息采集、數(shù)據(jù)傳輸和溫度 的調(diào)節(jié),大大提高了管理效率,節(jié)省了人力資本;系統(tǒng)結(jié)構(gòu)簡(jiǎn)單、可靠性高、應(yīng)用靈活、 前景十分廣闊。選用 DS18B20 單總線數(shù)字溫度傳感器,測(cè)量精度可以達(dá)到 ℃ 。 同時(shí),可現(xiàn)場(chǎng)設(shè)定溫度值。 本系統(tǒng)由上位機(jī)和下位機(jī)兩大部分組成 。 本科生畢業(yè)設(shè)計(jì)(論文) I 摘 要 介紹了一種基于 CAN 總線技術(shù)的冷庫(kù)溫度控制系統(tǒng)的設(shè)計(jì) 。 CAN 總線是目前最流行的現(xiàn)場(chǎng)總線技術(shù) , 它具有可靠性高、價(jià)格低廉、實(shí)時(shí)性強(qiáng)等優(yōu)點(diǎn) , 在自動(dòng)控制領(lǐng)域廣泛應(yīng)用。 上位機(jī) 主要完成與 PC 機(jī)的通信功能 , 通過 PC 機(jī) 可 設(shè)置及顯示各冷庫(kù)的溫度,將設(shè)置的溫度通過上位機(jī)送至下位機(jī) ; 下位機(jī)完成對(duì)冷庫(kù)的溫度檢測(cè)以及實(shí)現(xiàn)自動(dòng)恒溫控制。 上位機(jī)與下位機(jī)均以 AT89S52 為核心,下位機(jī)使用 LED 進(jìn)行溫度顯示。 將測(cè)量值與設(shè)定值 進(jìn)行 比較后由下位機(jī)控制制冷壓縮機(jī)或電加熱器進(jìn)行溫度調(diào)整,達(dá)到 恒溫控制,實(shí)現(xiàn)系統(tǒng)智能化。 關(guān)鍵詞: AT89S52; CAN 總線; DS18B20; PC 機(jī) ;冷庫(kù)控制 本科生畢業(yè)設(shè)計(jì)(論文) II Abstract The temperature of cold storage control system based on CAN bus technology is introduced in the subject. CAN bus is the most popular fieldbus technology, which has high reliability, low cost, realtime etc.. It is widely used in the field of automatic control. The system is posed of two major parts which consists of upper and lower machine. The main host puter plete the PCmunication functions, the temperature of the cold storage is set up and displayed by the PC, the temperature which be set up will be sent through the upper machine to the lower machine, the lower machine plete to measure and automatic control the temperature of the cold storage. At the same time, the temperature value can be set at the scene. AT89S52 is the core of the upper and lower machine, the lower machine use LED for displaying the temperature. DS18B20 is selected for the singlebus digital temperature sensor, the measurement accuracy can reach ℃ . The measured values will be pared with the set value, after that the lower meachine control the refrigeration pressor or electric heater to adjustment the temperature, achieve the constant temperature control, the intelligent