【正文】
I 摘 要 隨著中國(guó)經(jīng)濟(jì)的不斷發(fā)展,人民生活水平的提高,人們對(duì)于環(huán)境信息的了解越來(lái)重視,比如根據(jù)室外和室內(nèi)的溫度或者濕度的情況,人們可以調(diào)整好一天的作業(yè)安排,也可以根據(jù)環(huán)境的信息參數(shù)了解最近我們所居住的周圍的空氣的質(zhì)量的好壞,提醒人們做好環(huán)境保護(hù)工作。 基于這種 現(xiàn)狀 ,設(shè)計(jì)出了 溫濕度檢測(cè)儀 ,它 是 一個(gè)以 溫濕度傳感器采集數(shù)字信 號(hào),通過單片機(jī)為其提供時(shí)序時(shí)鐘,實(shí)現(xiàn)實(shí)時(shí)采集環(huán)境 濕 度和溫度的 儀器。本設(shè)計(jì)是以 stc12c5A602 單片機(jī)為主控, DHT11為溫濕度傳感器,采用 LCD12864 顯示 單元,并 用 NRF2401 為無(wú)線發(fā) 送和接收裝置,外加一 個(gè)遙控器和按鍵 為人機(jī)交互,綜合這幾個(gè)模塊實(shí)現(xiàn)溫濕度采集,顯示,無(wú)線發(fā)送, 及 報(bào)警于一體的綜合系統(tǒng),是方便人們 居家 及 出行 的一個(gè)好的幫手,更有甚是人們對(duì)于陌生環(huán)境的探測(cè)的有效的利器。 本系統(tǒng)設(shè)計(jì)詳細(xì)的介紹了溫濕度數(shù)據(jù)的采集,無(wú)線數(shù)據(jù)的發(fā)送與接收,顯示遙控 等控制的原理,詳細(xì)的介紹了各個(gè)模塊的硬件和軟件的設(shè)計(jì),包括電路設(shè)計(jì),和程序的設(shè)計(jì)以及各個(gè)硬件子系統(tǒng)的軟件的實(shí)現(xiàn)。 該設(shè)備可以用于家庭的室內(nèi)的數(shù)據(jù)采集,也可以用于室外的溫濕度的檢測(cè),其溫度范圍為 0~50 度 , 濕度范圍為 20%~90%RH 關(guān) 鍵詞: 溫濕度測(cè)量;無(wú)線傳輸; 單片機(jī); 液晶顯示 溫濕度無(wú)線傳輸設(shè)計(jì) II The design of wireless tempture and humidity detection bases on microputer Abstract With the continuous development of China39。s economy, and the improvement of people39。s living standard, people pay more attention to understanding of environmental information, such as according to the outdoor and indoor temperature or humidity condition, people can adjust good day job arrangement, can also according to the environment information parameters of recently we live in the surrounding air quality, remind people to do a good job of environmental protection. Temperature. Humidity meter is a kind of to a digital signal, temperature and humidity sensors to collect by single chip microputer with timing clock, realtime acquisition environment temperature and the temperature of an instrument. This design is based on stc12c5A602 singlechip microputer as the master, for temperature and humidity sensor DHT11, adopting LCD12864 for display, and using NRF2401 wireless sending and receiving devices, plus some buttons for humanputer interaction, of which several modules to achieve temperature and humidity collecting, display, wireless transmission, the alarm in an integrated system, is to facilitate people to travel and a good helper that occupy the home, more what is effective for detection of a strange environment for people. This design detailed introduces the temperature and humidity data acquisition system, wireless data sending and receiving, according to the principle of control, such as various modules are introduced in detail the design of hardware and software, including the circuit design, and the procedure of design and the realization of the various hardware subsystems of the software. The device can be used for indoor data acquisition of the family and the detection of outdoor temperature and humidity, whose temperature ranges from 0 to 50 degrees and humidity ranges from 20 percent to 90 percent RH. Key Words : temperature and humidity measurement。 wireless transmission。 microcontroller。 liquid crystal display III 目 錄 摘 要 .............................................................................................................................I Abstract .......................................................................................... 錯(cuò)誤 !未定義書簽。 1 概述 .......................................................................................................................... 1 設(shè)計(jì)目的和意義 ............................................................................................ 1 設(shè)計(jì)思想 ........................................................................................................ 1 方案比較 ........................................................................................................ 1 方案一: .............................................................................................. 1 方案二: .............................................................................................. 2 方案三: .............................................................................................. 2 系統(tǒng)的總體設(shè)計(jì) ............................................................................................ 2 系統(tǒng)設(shè)計(jì)重點(diǎn)與難點(diǎn) .................................................................................... 3 2 系統(tǒng)硬件的設(shè)計(jì) ...................................................................................................... 4 STC12C5A60S2 系列單片機(jī)簡(jiǎn)介 ................................................................ 4 STC12C5A60S2 單片機(jī)管腳圖 .................................................................... 4 單片機(jī)最小系統(tǒng)電路圖 ................................................................................ 4 1602 字符型 LCD 簡(jiǎn)介 ................................................................................. 5 LCD1602 主要技術(shù)參數(shù) ..................................................................... 6 LCD1602 與單片機(jī)連接原理圖 ......................................................... 6 12864 漢字型 LCD 簡(jiǎn)介 .................................................................................. 6 按鍵設(shè)計(jì) ........................................................................................................ 7 報(bào)警電路 ........................................................................................................ 7 溫濕度傳感器電 路 ........................................................................................ 8 紅外遙控接收電路 ........................................................................................ 8 NRF2401 無(wú)線模塊電路 ............................................................................. 8 系統(tǒng)電路原理圖 .......................................................................................... 9 3 系統(tǒng)軟件的設(shè)計(jì) .................................................................................................... 12 主程序流程圖 .............................................................................................. 12 LCD12864 指令說明及操作時(shí)序圖 ........................................................... 14 液晶顯示流程圖 .......................................................................................... 15 按鍵檢測(cè) ........................................................................................................