【正文】
TA,接口簡(jiǎn)單,支持CRC傳輸校驗(yàn),傳輸可靠性高;③ 測(cè)量精度可編程調(diào)節(jié),內(nèi)置A/D轉(zhuǎn)換器(分辨率為8~12位,可以通過對(duì)芯片內(nèi)部寄存器編程選擇); ④ 測(cè)量精確度高,由于同時(shí)集成溫濕度傳感器,可以提供溫度補(bǔ)償?shù)臐穸葴y(cè)量值和高質(zhì)量的露點(diǎn)計(jì)算功能; ⑤ 封裝尺寸超小( mm mm),測(cè)量和通信結(jié)束后,自動(dòng)轉(zhuǎn)入低功耗模式; ⑥ 高可靠性,采用CMOSens工藝,測(cè)量時(shí)可將感測(cè)頭完全浸于水中。 傳感電路設(shè)計(jì)此模塊是整個(gè)電路設(shè)計(jì)的信號(hào)采集及初步處理的模塊,由溫濕度傳感器芯片SHT11構(gòu)成。每月的天數(shù)和閏年的天數(shù)可自動(dòng)調(diào)整,時(shí)鐘操作可通過AM/PM指示決定采用24或12小時(shí)格式。 實(shí)時(shí)時(shí)鐘電路此模塊產(chǎn)生實(shí)時(shí)的系統(tǒng)時(shí)間和日歷,能對(duì)某個(gè)確定環(huán)境的實(shí)時(shí)溫濕度控制起到一定的作用。由于將多功能8位CPU和閃爍存儲(chǔ)器組合在單個(gè)芯片中,89C51單片機(jī)為很多嵌入式控制系統(tǒng)提供了一種靈活且價(jià)廉的方案[1]。 整體電路框圖89C51是一種帶4k字節(jié)可編程可擦除的低電壓高性能CMOS8位微處理器,俗稱單片機(jī)。 在軟件設(shè)計(jì)部分有對(duì)測(cè)量的溫濕度進(jìn)行上下值的設(shè)定,當(dāng)測(cè)量超過限定值時(shí),通過超限報(bào)警處理電路對(duì)其進(jìn)行處理后分別控制不同的二極管燈亮,蜂鳴器產(chǎn)生長(zhǎng)鳴。5%RH。溫濕度的控制是我們研究的主要內(nèi)容。例如通過采用傳統(tǒng)電子儀器進(jìn)行設(shè)計(jì)研發(fā)而成的多種動(dòng)態(tài)測(cè)試系統(tǒng)、氣體傳感器智能測(cè)試系統(tǒng)等等,這些成績(jī)都體現(xiàn)了我國(guó)在傳感器領(lǐng)域取得的成就。因此,依托于數(shù)據(jù)采集結(jié)構(gòu)而發(fā)展的溫濕度傳感器測(cè)量系統(tǒng)在實(shí)際應(yīng)用中也發(fā)揮著越來(lái)越重要的作用。1987年我國(guó)吳子丹等報(bào)道了儲(chǔ)糧機(jī)械通風(fēng)的計(jì)算機(jī)控制系統(tǒng),根據(jù)在倉(cāng)房?jī)?nèi)通風(fēng)試驗(yàn)得到的數(shù)據(jù),建立一個(gè)數(shù)學(xué)模型表示糧食平衡水分的關(guān)系,用該模型編制電算程序,觀察糧食的通風(fēng)效果,并根據(jù)物理參數(shù)的變化,確定控制通風(fēng)的有效方式;1988年王善順等報(bào)道了機(jī)械通風(fēng)儲(chǔ)糧與自動(dòng)控制,并介紹了機(jī)械通風(fēng)控制器的試驗(yàn)情況;2004年湯慶設(shè)計(jì)了糧庫(kù)溫度監(jiān)控系統(tǒng),該系統(tǒng)從溫度傳感器、數(shù)據(jù)傳輸方式、上位機(jī)監(jiān)控軟件三個(gè)方面入手對(duì)糧庫(kù)系統(tǒng)加以改進(jìn);2005年施偉徉研究了基于CAN總線的糧食監(jiān)控系統(tǒng),該系統(tǒng)完成了對(duì)各倉(cāng)房的溫濕度的實(shí)時(shí)巡檢,并通過對(duì)采集到數(shù)據(jù)進(jìn)行處理分析來(lái)掌握糧食的儲(chǔ)存情況。研究表明:在低溫氣候下,從夏季到秋季經(jīng)2~3次通風(fēng),每次要持續(xù)幾個(gè)晚上,每天4~10小時(shí),可將溫度從300C降到SC(在英國(guó)氣候條件下)。在儲(chǔ)藏過程中,糧食受溫度、濕度及其它因素的影響,可能出現(xiàn)發(fā)熱、霉變、蟲害等情況。但國(guó)家的糧食儲(chǔ)備狀況自建國(guó)以來(lái)卻沒有得到明顯改善,全國(guó)80%左右的糧食仍采用原始的存儲(chǔ)方式。糧倉(cāng)設(shè)施的關(guān)鍵技術(shù)是環(huán)境控制,主要是溫濕度的控制,其目的是提高控制及作業(yè)精度。目前我國(guó)農(nóng)業(yè)正處于從傳統(tǒng)農(nóng)業(yè)向以優(yōu)質(zhì)、高產(chǎn)、高效益為目標(biāo)的現(xiàn)代農(nóng)業(yè)轉(zhuǎn)化的新階段。這就迫使我們必須將糧食產(chǎn)后的損失降低到最低限度,減少糧食的儲(chǔ)藏?fù)p失無(wú)疑是利國(guó)利民的好事,是保證國(guó)家糧食安全的大事。近年來(lái),隨著農(nóng)業(yè)科學(xué)技術(shù)的不斷進(jìn)步,農(nóng)業(yè)生產(chǎn)持續(xù)而穩(wěn)定地增產(chǎn),農(nóng)戶生產(chǎn)糧食數(shù)量也日益增多,絕大部分農(nóng)民不僅解決了溫飽問題,而且有了更多的糧食,糧食年產(chǎn)量和常年儲(chǔ)存量均居世界首位。系統(tǒng)采用集溫濕度傳感器與A/D轉(zhuǎn)換器為一體的SHT11芯片,通過單片機(jī)處理進(jìn)行顯示,其它模塊包括了實(shí)時(shí)時(shí)鐘/日期產(chǎn)生電路和超限報(bào)警處理電路,對(duì)所測(cè)量的值進(jìn)行實(shí)時(shí)顯示和報(bào)警處理。因此設(shè)計(jì)智能糧倉(cāng)溫濕度監(jiān)控系統(tǒng),提高工作效率,實(shí)現(xiàn)糧倉(cāng)溫濕度的實(shí)時(shí)監(jiān)控,是倉(cāng)儲(chǔ)單位亟待解決的重要問題。目前我國(guó)許多糧食倉(cāng)儲(chǔ)單位采用測(cè)溫儀器與人工抄錄、管理相結(jié)合的傳統(tǒng)方法,消耗了大量的人力和財(cái)力,但是效果不佳,發(fā)霉變質(zhì)等現(xiàn)象大量存在。本設(shè)計(jì)實(shí)現(xiàn)的是單片機(jī)溫濕度測(cè)量與控制系統(tǒng),通過液晶顯示器(LCD)顯示所測(cè)量的溫濕度。 關(guān)鍵詞:?jiǎn)纹瑱C(jī);SHT11;LCD;DS1302;溫濕度控制 I AbstractIn the process of grain storage, grain deteriorates due to the abnormal of the barn’s temperature and humidity, and the economic losses which brought about are amazing. At present many grain storage units in our country use the traditional methods which is bined of thermometer device, artificial transcription and artificial management, consuming a lot of manpower and financial resources, and the results are poor, the phenomena of mildewing and metamorphism exists in large quantities. Therefore, designing the temperature and humidity monitor system on barn, improving efficiency and achieving realtime monitoring of barn’s temperature and humidity, is an important problem demanding prompt solution by storage units. The temperature and humidity is an important physical quantity, is the most mon and important technical parameters in grain storages. With the progress of the times, the development of society, science and technology unceasing renewal, the temperature and humidity measurement accuracy requirements continue to increase, so the temperature and humidity detection has bee an important research topic.The design and implementation of measurement and control temperature and humidity is MCU system, through which the temperature and humidity measurement liquid crystal displays (LCD). System adopts set temperature and humidity sensor and A/D converter for SHT11 chip microcontroller processing, through that other modules including realtime clock/date produce circuit and the offgauge alarm circuit, the value of measurement for realtime display and alarm. The paper introduces the ATMEL pany based on AT89C51 singlechip series of temperature and humidity measurement and control system and realtime display system design, including the hardware structure and principle, and the corresponding software design, including the design of the software and its key process and procedure. System structure is simple, practical, and improve the measuring precision and efficiency. Key Words: MCU, SHT11, LCD, DS1302, Temperature and humidity control III 目 錄摘 要 IAbstract II目 錄 III1 緒論 1 問題的提出背景及研究意義 1 國(guó)內(nèi)外現(xiàn)狀 2 課題的研究目的及內(nèi)容 32 控制系統(tǒng)的硬件電路設(shè)計(jì) 4 整體設(shè)計(jì)方案 4 微控制器模塊 4 復(fù)位電路設(shè)計(jì) 4 時(shí)鐘電路設(shè)計(jì) 5 傳感電路設(shè)計(jì) 6 顯示電路設(shè)計(jì) 9 超限處理電路設(shè)計(jì) 12 硬件電路PCB版圖設(shè)計(jì) 123 控制系統(tǒng)的軟件設(shè)計(jì) 14 軟件開發(fā)平臺(tái)介紹 14 主程序流程設(shè)計(jì) 15 溫濕度采集及處理流程設(shè)計(jì) 16 LCD顯示流程設(shè)計(jì) 17 超限處理流程設(shè)計(jì) 174 仿真與調(diào)試 18 仿真軟件介紹 18 系統(tǒng)的調(diào)試 18結(jié) 論 21致 謝 22參考文獻(xiàn) 23附錄A 系統(tǒng)程序 24蘭州交通大學(xué)畢業(yè)設(shè)計(jì)(論文)1 緒論 問題的提出背景及研究意義農(nóng)業(yè)是國(guó)民經(jīng)濟(jì)的基礎(chǔ),糧食是基礎(chǔ)的基礎(chǔ)。長(zhǎng)期以來(lái)由于種種原因,忽視了農(nóng)戶糧食儲(chǔ)藏技