【正文】
畢業(yè)設(shè)計(jì)說明書基于單片機(jī)的倉儲(chǔ)溫度測控系統(tǒng)的設(shè)計(jì) 學(xué) 院: 專 業(yè): 學(xué)生姓名: 學(xué) 號: 指導(dǎo)教師: 2013 年 6 月摘 要摘 要溫度監(jiān)測與控制是個(gè)生產(chǎn)工藝流程極為重要的環(huán)節(jié),自古以來就受到人們的關(guān)注,與人們的生活息息相關(guān)。近年來,隨著社會(huì)的發(fā)展,人們對溫度監(jiān)控的精度以及范圍等有了更高層次的要求,無論是在工農(nóng)業(yè)生產(chǎn)或科學(xué)研究方面,對溫度監(jiān)控都尤為重要。因此對溫度監(jiān)控的研究設(shè)計(jì)十分必要。本課題介紹了以STC89C52單片機(jī)為控制核心,DS18B20作為傳感器的集采集、處理、顯示、自動(dòng)控制為一體的倉儲(chǔ)溫度測控系統(tǒng)。整個(gè)系統(tǒng)中,以PC作為上位機(jī)監(jiān)控模塊,STC89C52單片機(jī)作為下位機(jī)控制模塊,上位機(jī)與下位機(jī)數(shù)據(jù)傳輸與交流以串口通信的方式進(jìn)行。本文采用智能溫度傳感器DS18B20進(jìn)行溫度的采集與轉(zhuǎn)換,其具有測溫范圍寬,精度高等優(yōu)點(diǎn),同時(shí)具有單總線接口,從而使得電路設(shè)計(jì)更加簡潔。STC89C52單片機(jī)具有運(yùn)算速度快,處理能力強(qiáng)等特點(diǎn),使其在溫度測控系統(tǒng)中成為一個(gè)極為重要的組成部分,伴隨著電子技術(shù)的發(fā)展,利用單片機(jī)進(jìn)行溫度測控,將成為發(fā)展趨勢。該系統(tǒng)同時(shí)設(shè)置溫度顯示模塊與報(bào)警裝置,可人為地控制溫度上、下限,可自動(dòng)調(diào)節(jié)溫度,使用戶可以更好的對溫度進(jìn)行控制。關(guān)鍵詞:單片機(jī)、DS18B溫度監(jiān)控III AbstractAbstractTemperature monitoring and control is a very important part of the production process, since ancient times by people concerned with people39。s lives. In recent years, with the development of society, people on the accuracy of temperature monitoring and scope have higher level requirements, both in industrial and agricultural production, or scientific research, are particularly important for temperature monitoring. So the temperature monitoring study design is necessary.This topic introduces the STC89C52 microcontroller core, DS18B20 sensor set as the collection, processing, display, automatic control as one of the storage temperature monitoring system. Throughout the system, the PC as a PC monitor module, STC89C52 microcontroller as the nextbit machine control module, the PC and the next crew to serial data transmission and exchange of munication manner. In this paper, intelligent sensor DS18B20 temperature acquisition and conversion, which has a wide temperature range, high precision, but also has a single bus interface, which makes circuit design more concise. STC89C52 microcontroller with a puting speed, processing power and other characteristics, so that in the temperature measurement and control systems to bee a very important part, along with the development of electronic technology, the use of singlechip temperature measurement and control, will bee a trend. The system is also set temperature display module and alarm device, can artificially control the temperature, the lower, it can automatically adjust the temperature, so that users can better control the temperature.Keywords: microcontroller, DS18B20, temperature monitoring.目 錄目 錄摘 要 IAbstract II目 錄 III第一章 緒 論 1 1 1 2 2 2 3 4 5第三章 硬件電路設(shè)計(jì) 6 單片機(jī)的設(shè)計(jì) 6 單片機(jī)的選擇 6 STC89C52單片機(jī)功能特性 6 引腳功能(摘自參考目錄中《單片機(jī)原理及應(yīng)用》一書) 7 溫度傳感器的設(shè)計(jì) 9 DS18B20溫度傳感器的特點(diǎn) 9 DS18B20引腳定義 9 DS18B20工作原理 10 DS18B20與單片機(jī)連接 11 串口通信 12 輸入模塊 12 顯示電路 13 數(shù)碼管的選擇 13 LED數(shù)碼管工作原理 13 LED數(shù)碼管顯示方式 14 蜂鳴報(bào)警器設(shè)計(jì) 15 繼電器電路設(shè)計(jì) 16 電源電路設(shè)計(jì) 16第四章 系統(tǒng)軟件設(shè)計(jì) 18 軟件設(shè)計(jì)原則 18 程序結(jié)構(gòu)分析 18 溫度信號處理子程序 20 鍵盤輸入模塊掃描子程序 21 數(shù)碼管顯示子程序 22 繼電器控制子程序 22 報(bào)警子程序 23 串口通信子程序 23總 結(jié) 25參考文獻(xiàn) 26附 錄 28第一章 緒 論第一章 緒 論溫度是一個(gè)普遍但又極為重要的參數(shù),在工業(yè)生產(chǎn),科學(xué)研究等諸多領(lǐng)域?qū)囟鹊目刂婆c檢測都有極高的要求。在日常生活中,人們時(shí)刻都在關(guān)注溫的變化,但在不同的歷史時(shí)期,或不同的生產(chǎn)科研領(lǐng)域,對溫度的測量精度,測量方法都有不同的要求,因此所用到的測量元件,測量系統(tǒng)就有所差異。隨著社會(huì)的發(fā)展,人們對測溫精度、控制范圍的要求也越來越高,有時(shí)極小的溫度差異也會(huì)對工業(yè)生產(chǎn),科研等帶來極大地影響。在倉儲(chǔ)環(huán)境中,對環(huán)境溫度的檢測控制顯得尤為重要。傳統(tǒng)的溫度測量方法即使用溫度計(jì)對環(huán)境溫度進(jìn)行測量,然后根據(jù)環(huán)境對溫度的要求再選擇加熱或降溫處理,這種測控方法不僅流程繁瑣,需要大量的人力物力,又不能對超出控制范圍的情況作出即時(shí)反應(yīng),對生產(chǎn)、儲(chǔ)藏帶來極大的影響,同時(shí),滿足不了當(dāng)今社會(huì)人們對溫度檢測控制精度的要求,給生產(chǎn)、科研等帶來不必要的麻煩。因此