基于單片機(jī)的便攜式氣象儀設(shè)計(jì)_第1頁(yè)
基于單片機(jī)的便攜式氣象儀設(shè)計(jì)_第2頁(yè)
基于單片機(jī)的便攜式氣象儀設(shè)計(jì)_第3頁(yè)
基于單片機(jī)的便攜式氣象儀設(shè)計(jì)_第4頁(yè)
基于單片機(jī)的便攜式氣象儀設(shè)計(jì)_第5頁(yè)
已閱讀5頁(yè),還剩70頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、目 錄設(shè)計(jì)總說(shuō)明IIntroductionV第1章 緒論11.1 研究的背景11.2 國(guó)內(nèi)外研究現(xiàn)狀11.3 課題研究的內(nèi)容和意義2第2章 系統(tǒng)方案選擇與論證32.1 設(shè)計(jì)要求32.2 總體設(shè)計(jì)方案32.3 各模塊方案選擇和論證32.3.1主控制器模塊32.3.2風(fēng)向風(fēng)速測(cè)量模塊42.3.3溫度測(cè)量模塊62.3.5氣壓測(cè)量模塊92.3.7定位模塊102.3.8無(wú)線通信模塊112.4 系統(tǒng)各模塊的最終方案確定11第3章 系統(tǒng)硬件設(shè)計(jì)123.1 系統(tǒng)核心控制單元AT89C52123.2 系統(tǒng)電源的設(shè)計(jì)133.3 系統(tǒng)數(shù)據(jù)的采集133.3.1 測(cè)溫模塊電路設(shè)計(jì)133.3.2 濕度模塊電路設(shè)計(jì)153.

2、3.3 風(fēng)向風(fēng)速模塊電路設(shè)計(jì)163.3.4 氣壓模塊電路設(shè)計(jì)173.4 單片機(jī)與傳感器連接電路設(shè)計(jì)183.5 分頻電路設(shè)計(jì)203.6 通信模塊電路設(shè)計(jì)213.6.1 GPS簡(jiǎn)介213.6.2 GPRS模塊簡(jiǎn)介223.7 顯示單元的設(shè)計(jì)243.8 獨(dú)立鍵盤(pán)模塊設(shè)計(jì)26第4章 系統(tǒng)軟件設(shè)計(jì)274.1 軟件設(shè)計(jì)概述274.2 溫度傳感器模塊的軟件設(shè)計(jì)274.2.1 DS18B20的的初始化274.2.2 單片機(jī)與DS18B20的通信284.2.3 DS18B20內(nèi)部結(jié)構(gòu)294.2.4 讀取溫度值304.3 模數(shù)轉(zhuǎn)換模塊的軟件設(shè)計(jì)314.4 通信模塊的軟件設(shè)計(jì)324.3.1 串口工作方式1介紹324.

3、3.2 GPS模塊軟件設(shè)計(jì)334.3.3 GPRS模塊軟件設(shè)計(jì)344.5 顯示模塊的軟件設(shè)計(jì)344.6 Proteus仿真36第5章 總結(jié)38參考文獻(xiàn)39附錄A 原理圖40附錄B 程序及注釋41致謝53設(shè)計(jì)總說(shuō)明氣候?qū)τ谌祟惖膭谧?、生活的影響是顯而易見(jiàn)的,良好的氣候能給人帶來(lái)高效的工作效率、舒適的休閑環(huán)境,但是惡劣的氣候卻常常給人導(dǎo)致難以承擔(dān)的后果。 眾所周知,我國(guó)的氣象災(zāi)害是十分頻繁的,各種惡劣的氣象災(zāi)害,如干旱、臺(tái)風(fēng)、寒潮等等,對(duì)個(gè)人來(lái)說(shuō),工作、生活甚至生命安全受到了嚴(yán)重影響;對(duì)國(guó)家來(lái)說(shuō),農(nóng)業(yè)、漁牧業(yè)的生產(chǎn)活動(dòng)乃至于經(jīng)濟(jì)發(fā)展都受到了威脅。由于一直遭受著惡劣氣候帶來(lái)的嚴(yán)重后果,我國(guó)對(duì)氣象事業(yè)

4、投入了大量的時(shí)間、金錢(qián)、人力物力,希望能夠增強(qiáng)對(duì)惡劣氣候的預(yù)知水平及防范能力。其中,氣象儀的研究、發(fā)展、應(yīng)用是必不可少的。目前,我國(guó)投入使用了大量的氣象站,分布在全國(guó)各個(gè)省市,全面掌控著我國(guó)氣象的變化,對(duì)我國(guó)的氣象事業(yè)發(fā)揮了重要的作用。但是一些環(huán)境惡劣、偏僻的地點(diǎn),比如沙漠、山區(qū)、海島等人員難以駐扎的地方卻成了我國(guó)氣象監(jiān)測(cè)的盲點(diǎn)。這時(shí),能自動(dòng)發(fā)送氣象數(shù)據(jù)的便攜式氣象儀就應(yīng)運(yùn)而生。本文先簡(jiǎn)單說(shuō)明了氣侯檢測(cè)的重要性、國(guó)內(nèi)外氣象檢測(cè)技術(shù)的研究成果以及本課題研究的主要內(nèi)容及其意義,其中分析了當(dāng)前氣象的檢測(cè)所有的一些問(wèn)題及發(fā)展方向,得出發(fā)展便攜式、高性能的氣象儀的迫切性。之后對(duì)各個(gè)測(cè)量模塊的芯片使用或傳

5、感器進(jìn)行選擇與論證,分析各個(gè)芯片或傳感器的優(yōu)缺點(diǎn),然后對(duì)便攜式氣象檢測(cè)儀的設(shè)計(jì)方案進(jìn)行總體概述。本系統(tǒng)是以單片機(jī)為系統(tǒng)核心,控制各個(gè)測(cè)量氣象的傳感器,將傳感器等測(cè)得的數(shù)據(jù)通過(guò)液晶顯示,另外,本設(shè)計(jì)擁有無(wú)線通信模塊,既可以通過(guò)GPS得到當(dāng)前的地理位置和標(biāo)準(zhǔn)時(shí)間,也能通過(guò)GPRS發(fā)送所有的氣象數(shù)據(jù)。關(guān)于系統(tǒng)的主控制器模塊,最終采用單片機(jī)AT89C52作為系統(tǒng)的核心控制器,在各種各樣的單片機(jī)中,AT89C52本身相當(dāng)于一部微型的計(jì)算機(jī),各種部件集成在一塊芯片上。AT89C52具有高性能、低功耗的特點(diǎn),有8K的可以編程的程序存儲(chǔ)器。以上種種,使得AT89C52在大量嵌入式系統(tǒng)電路設(shè)計(jì)中被廣泛的應(yīng)用。電

6、源模塊是采用兩節(jié)12V干電池為整個(gè)系統(tǒng)供電,但系統(tǒng)有的模塊需要用到5V,4.3V電壓驅(qū)動(dòng),所以為了整個(gè)系統(tǒng)的正常工作,必須對(duì)12V的電壓進(jìn)行DC-DC變換。本系統(tǒng)使用了芯片LM1084-5.0,輸入端直接接上12V電壓,在輸出端即可得到5V的電壓,然后再串聯(lián)一個(gè)硅二極管即可得到4.3V的電壓。測(cè)溫模塊本系統(tǒng)使用的是DS18B20,它是一種數(shù)字式溫度傳感器,只有3個(gè)引腳需要連接,其中兩根分別接電源正極和負(fù)極,剩下的一個(gè)引腳可直接與單片機(jī)的I/O相連,事實(shí)上,它與單片機(jī)連接的只有一根線,單片機(jī)對(duì)它的所有操作,都是通過(guò)這根線來(lái)執(zhí)行的,所以又說(shuō),DS18B20是一種單總線器件。單片機(jī)都是通過(guò)這根線向其

7、寫(xiě)入指令,比如跳過(guò)ROM操作指令,溫度轉(zhuǎn)換指令,讀取溫度指令等等,之后就能通過(guò)這根總線讀取它的溫度了。風(fēng)向風(fēng)速測(cè)量模塊所用的是TFX系列風(fēng)速風(fēng)向一體傳感器,它將風(fēng)向與風(fēng)速測(cè)量器件集成到了一起。大大縮減了體積,這是它其中的優(yōu)勢(shì)所在,其中風(fēng)向測(cè)量部分是尾翼式設(shè)計(jì),而風(fēng)速測(cè)量部分則是經(jīng)典的三杯式設(shè)計(jì),當(dāng)傳感器感受到風(fēng)時(shí),它會(huì)將其中的風(fēng)向及風(fēng)速信息轉(zhuǎn)換成電壓或電流信號(hào)通過(guò)輸出,經(jīng)過(guò)AD芯片轉(zhuǎn)換后接到單片機(jī)的I/O口上。 氣壓模塊使用PTH501緊線螺母接頭壓力傳感器/變送器,它的量程是01150(MPa),由于本系統(tǒng)是氣象儀,而一個(gè)標(biāo)準(zhǔn)大氣壓是101.325kPa,所以在此選用01MPa的量程即可達(dá)到

8、要求。它能將檢測(cè)到的氣壓輸出為電信號(hào),而且當(dāng)外界氣壓變化,電信號(hào)也能隨之線性變化,同風(fēng)向風(fēng)速傳感器一樣,它也需要經(jīng)過(guò)AD轉(zhuǎn)換接到單片機(jī)的I/O口上。濕度模塊本系統(tǒng)所使用的是RH10,它的內(nèi)部有一濕敏元件,這種元件的原理是濕敏電阻或濕敏電容的值會(huì)隨著濕度變化而變化。RH10內(nèi)的濕敏元件是電容式,它使用了先進(jìn)的半導(dǎo)體厚膜技術(shù),整體附在一片非常小的玻纖板上,長(zhǎng)13mm,寬7mm,厚度為0.2mm,由此可見(jiàn)它的體積非常小,當(dāng)RH10內(nèi)的濕敏元件感受到空氣中濕度的變化,它所輸出的相應(yīng)電壓或電流信號(hào)也會(huì)隨之線性變化。根據(jù)本系統(tǒng)的設(shè)計(jì),所用的傳感器除了DS18B20以外,其他傳感器件輸出的信號(hào)都是420mA

9、電流信號(hào)。單片機(jī)與模擬輸出型的傳感器連接模塊主要分為兩部分,其中之一為電流電壓轉(zhuǎn)換模塊,這個(gè)模塊的主要作用是將4-20mA的電流信號(hào)轉(zhuǎn)換為電壓信號(hào)再接到AD轉(zhuǎn)換芯片的輸入端。本系統(tǒng)所用的運(yùn)放是LM324,通過(guò)電路設(shè)計(jì),得到0.84.0V的電壓信號(hào)。第二個(gè)部分則是AD/模數(shù)轉(zhuǎn)換部分,本系統(tǒng)所使用的芯片是ADC0809,它允許8位模擬量分時(shí)間輸入,使用同一個(gè)AD轉(zhuǎn)換器轉(zhuǎn)換。ADC0809有3位地址輸入線,用于選通8位模擬輸入中的一路,而本設(shè)計(jì)只有4個(gè)傳感器需要進(jìn)行AD轉(zhuǎn)換,所以8位模擬輸入完全夠用。分頻模塊使用的芯片是74HC74,為什么要分頻?這是因?yàn)锳DC0809在正常進(jìn)行模數(shù)轉(zhuǎn)換時(shí),需要在它

10、的CLOCK引腳,即時(shí)鐘脈沖輸入端輸入時(shí)鐘頻率不高于640KHz時(shí)鐘脈沖。那么從哪得到時(shí)鐘脈沖?我注意到單片機(jī)在正常工作是在其ALE引腳會(huì)輸出1/6晶振頻率的脈沖信號(hào),因?yàn)槭褂镁д竦念l率是12MHz,所以在單片機(jī)的ALE引腳輸出的就是2MHz的時(shí)鐘脈沖,如果能再對(duì)它四分頻的話,就能得到500KHz的脈沖信號(hào),這個(gè)信號(hào)完全能滿足模數(shù)轉(zhuǎn)換的要求。通信模塊也分為兩部分,第一部分的GPS模塊,這一模塊使用的器件是GR-87,它是一個(gè)完整的衛(wèi)星定位接收器,用來(lái)接收一些定位信息,而本系統(tǒng)只需要接收有關(guān)經(jīng)緯度以及標(biāo)準(zhǔn)時(shí)間的信息,具體實(shí)現(xiàn)方法會(huì)在軟件部分詳細(xì)介紹;第二部分則是GPRS模塊,本系統(tǒng)使用的是SIM

11、300C,SIM300C是SIMCOM公司推出的一種三頻/四頻GSM/GPRS解決方案,通過(guò)它,可以將測(cè)得的氣象數(shù)據(jù)發(fā)送到手機(jī)上。SIM300C與單片機(jī)之間也是通過(guò)串口通信的,單片機(jī)主要通過(guò)AT指令對(duì)其進(jìn)行控制?,F(xiàn)在,又出現(xiàn)了一個(gè)問(wèn)題,那就是AT89C52單片機(jī)只有一個(gè)串行口,而GR-87與SIM300C與單片機(jī)都是使用串口通信,所以,本系統(tǒng)使用了芯片CD4053來(lái)完成串口的復(fù)用,CD4053是數(shù)字控制模擬開(kāi)關(guān),它極低的導(dǎo)通阻抗和極低的截止漏電流。顯示模塊使用的是LCD1602液晶顯示器,它的體積很合適,不會(huì)顯得大而臃腫,但能滿足系統(tǒng)的顯示要求。另外,它的耗電量很低,顯示的字符也很清晰,不會(huì)出

12、現(xiàn)閃爍的問(wèn)題。LCD1602通過(guò)8位數(shù)據(jù)口與單片機(jī)的I/O連接,單片機(jī)就是通過(guò)這8位數(shù)據(jù)口對(duì)LCD1602進(jìn)行一系列的讀寫(xiě)操作,最終可以將氣象儀所測(cè)除的數(shù)據(jù)顯示到液晶顯示屏上。獨(dú)立鍵盤(pán)模塊,本系統(tǒng)總共用到4個(gè)開(kāi)關(guān),S3是系統(tǒng)的電源開(kāi)關(guān),控制氣象儀是否工作,直接接在12V干電池的負(fù)極。S4是單片機(jī)的復(fù)位按鍵。S1,S2是用來(lái)控制LCD1602的整屏移動(dòng)按鍵。由于本系統(tǒng)測(cè)量的氣象數(shù)據(jù)較多,32個(gè)字節(jié)的屏幕并不能全部顯示測(cè)得的氣象數(shù)據(jù),所以要把部分?jǐn)?shù)據(jù)寫(xiě)在1602不顯示的地址,然后按一下S1,LCD1602整屏左移16位,顯示未按開(kāi)關(guān)之前不會(huì)顯示的氣象數(shù)據(jù);再按一下S2,LCD1602整屏右移16位

13、,恢復(fù)原狀。最后,設(shè)計(jì)本系統(tǒng)相應(yīng)的軟件程序,流程如下:先對(duì)LCD進(jìn)行初始化,然后程序進(jìn)入一個(gè)循環(huán),在這個(gè)循環(huán)中,氣象儀的各個(gè)模塊開(kāi)始工作,首先是DS18B20開(kāi)始讀取溫度,將讀取到的溫度值顯示在1602液晶顯示器上,然后ADC0809地址鎖存端選中風(fēng)向傳感器輸入端,將測(cè)得的氣象信息通過(guò)軟件處理后顯示到液晶上,之后,分別對(duì)濕度,風(fēng)速,氣壓傳感器等測(cè)得的數(shù)據(jù)進(jìn)行AD轉(zhuǎn)換,處理并顯示,之后打開(kāi)串口中斷,單片機(jī)的RXD口接受大GR-87傳輸?shù)臄?shù)據(jù),這些數(shù)據(jù)再被顯示到液晶顯示屏上,之后在軟有一個(gè)鍵盤(pán)檢測(cè)程序,當(dāng)S1按下,LCD1602會(huì)整屏左移,當(dāng)S2按下,LCD1602會(huì)整屏右移。只要沒(méi)有關(guān)閉掉氣象儀

14、的總電源,程序就會(huì)一直執(zhí)行下去,也就是說(shuō),氣象儀會(huì)實(shí)時(shí)的檢測(cè)當(dāng)前的氣象數(shù)據(jù)。本系統(tǒng)完全可以通過(guò)仿真,所設(shè)計(jì)的便攜式氣象檢測(cè)儀可以百分之百實(shí)現(xiàn)系統(tǒng)的技術(shù)要求,并達(dá)到所要求的性能指標(biāo),具有高精度、全天候和低成本的特點(diǎn)。另外,該便攜式氣象儀能夠很好的完成一般的氣象測(cè)量要求,而且還可以在各種惡劣環(huán)境下工作。擁有了這些優(yōu)勢(shì),該便攜式測(cè)量?jī)x能夠廣泛應(yīng)用于各種場(chǎng)景的氣象測(cè)量。關(guān)鍵詞:氣象儀;AT89C52;ADC0809;GPS;GPRSIntroductionClimate for human labor, life is obvious, good weather can bring efficient

15、 work efficiency, comfortable leisure environment, but bad weather often to lead to difficult to bear the consequences. As is known to all, Chinas meteorological disaster is very frequent, all kinds of bad meteorological disasters, such as drought, typhoons, cold wave and so on, to individuals, work

16、, life and even life safety by seriously affected; for the country, agriculture, fishery and animal husbandry production activities but as for economic development are under threat.Because it has been subjected to Portable meteorological input to the harsh climate brings serious consequences, China

17、Meteorological cause a lot of time, money, manpower and material resources, hope to be able to enhance the harsh climate of anticipation and prevention ability. Among them, the meteorological instrument research, development and application is essential. At present, our country put into use a large

18、number of meteorological station, located in the national various provinces and municipalities, the full control of the weather changes, the China Meteorological institutions play an important role. But some harsh environment, remote locations, such as desert, mountains, islands and other personnel

19、to stationed, but the China Meteorological Monitoring blind spot. At this time, can automatically send data The meteorological instrument was born.The paper briefly describes the importance of Hou and gas detection, research achievements at home and abroad meteorological detection technology and the

20、 main content of this research and its significance, which analyzes the current weather detection all of some of the problems and development direction, draws the development of portable, the urgency of the high performance of the meteorological instrument. After measurement of each module of chip u

21、se or sensor were selection and demonstration and analysis of the advantages and disadvantages of each chip or sensor, and then outline the design scheme of portable meteorological instrument.This system is based on single-chip microcomputer as the core of the system, control the various sensors to

22、measure the weather Sensors and other measured data through the liquid crystal display, in addition, this design has a wireless communication module, both through the GPS to get the current location and the standard time, but also through the GPRS to send all the meteorological data.A system of main

23、 controller module, in the end, the AT89C52 microcontroller as the core controller of the system, in a variety of single chip microcomputer, AT89C52 itself is in a miniature computer, various components integrated in a chip.AT89C52 with high performance and the characteristics of low power consumpti

24、on, with 8K can programming memory. Above all, the at8 9C52 is widely used in a large number of embedded system circuit design.Power supply module uses two 12V batteries power supply for the entire system, but some modules of the system need to use 5V, driving voltage 4.3v, so in order to normal ope

25、ration of the whole system must the 12V voltage DC-DC converter. This system uses the chip LM1084-5.0, input is directly connected to the 12V voltage, in the output terminal can get 5V voltage, and then is connected in series with a silicon diode can get 4.3v voltage.The temperature measurement modu

26、le used in this system is DS18B20, which is a number Digital temperature sensor, only three pins need to be connected, two of which are connected to the power supply of the cathode and the anode, remaining a pin can be directly connected with the microcontroller I / O, in fact, it connected with the

27、 single chip microcomputer of has only a single line, SCM of all operations are through the thread to perform the, so said, DS18B20 is a 1-wire devices. MCU is through the wire to the write instruction, such as skip ROM operating instructions, temperature conversion instruction, read temperature ins

28、truction and so on could be through the root bus read its temperature.Wind direction and wind speed measurement module is used in TFX series of wind Speed and direction of various sensors, it will wind direction and wind speed measuring devices are integrated into together. Greatly reduced the volum

29、e, this is it the advantage, in which direction measurement part is fin design and wind speed measuring part is the classic three cup design, when the sensor to the wind, it will the wind direction and wind speed information is converted into a voltage or current signal through the output, through t

30、he AD conversion chip connected to the MCU I / O port.The pressure module uses the PTH501 fastening nut joint pressure transducer / transmitter, which is 01150 (MPa), and the system is a meteorological instrument. Standard atmospheric pressure is 101.325kPa, so in this selection 01MPa range can meet

31、 the requirements. It can detected the output pressure into electrical signals and the pressure change of the outside world, electrical signals can also followed a linear change with wind speed and direction sensor as, it also needs after AD converter connected to the MCU I / O port.Humidity module

32、of this system uses the rh10 and inside of it with a humidity sensitive element, the principle of this kind of element is hygristor or humidity sensitive capacitance value with the humidity change and change.RH10 wet sensitive element is capacitive, it uses advanced semiconductor thick film technolo

33、gy. Overall attached on a piece of very small glass fiber board, 13 mm long, 7mm thickness is 0.2mm, which shows the volume is very small, when rh10 humidity sensitive element to feel the change of moisture in the air, the output of the corresponding voltage or current signals will with a consequent

34、 change in linear.According to the design of the system, the sensor used in addition to DS18B20, the output signal of the other sensors are 420mA current signal.Single chip and analog output type of sensor connection module is divided into two parts, one of which is the current and voltage conversio

35、n module, the main function of this module will be 4- 20mA current signal is converted into a voltage signal and then received ad conversion chip input end. The op amp is a LM324, through the circuit design, 0.84.0V voltage signal of the. The second part is AD/ analog to digital converter, the syste

36、m used in the chip ADC0809, it allows many 8-bit analog input time, using the same ad converter.ADC0809 3 bit address input lines, for gated 8-bit analog input in the way, and this design only four sensors need for AD conversion, so 8 bit analog input quite enough.Frequency divider Chip is sn74hc74,

37、 why to divide? This is because ADC0809 in normal analog to digital conversion and need it at the clock pin, real-time clock pulse input end of the input clock frequency is not higher than 640KHz clock pulse. Then from where did you get the clock pulse? My attention to the MCU in normal work is in t

38、he ale pin will output 1 / 6 of the oscillator frequency pulse signal, because is 12Mhz crystal oscillator frequency, so the ale pin of the microcontroller output is 2MHz clock pulse. If any of its four frequency, can get 500 kHz pulse signal , this signal can meet the requirements of analog digital

39、 conversion.Communication module is divided into two parts, the first part of the GPS module, this module uses the device is gr-87, it is a complete satellite positioning receiver, for receiving location information, and the system only need to receive information on longitude, latitude, and the sta

40、ndard time, the concrete realization method will be discussed in detail in the part of the software; the second part is the GPRS module. The system uses is SIM300c, SIM300c is simcom company launched a triple / Quad Band GSM / GPRS solutions, through it, can will be measured The weather data was sen

41、t to the phone.SIM300C is also through the serial communication with the microcontroller, the microcontroller is mainly controlled by the AT command.Now, a problem has emerged, that is AT89C52 single chip computer has only one serial port, and gr-87 and SIM300c and MCU are the use of serial communic

42、ation, so the system used chip CD4053 to complete serial port multiplexing, the CD4053 is digitally controlled analog switch and guide it low pass impedance and very low cut-off leakage current.The display module uses the LCD1602 LCD monitor, which Volume is appropriate, do not look big and fat, but

43、 can meet the system requirements. In addition, its power consumption is very low, the characters of the show is also very clear, does not appear flicker problem.LCD1602 connected by 8-bit I / O data interface with SCM, SCM is through the 8-bit data port on the LCD1602 were a series of read and writ

44、e operations can eventually will meteorological instrument measured data in addition to the display to LCD.Independent keyboard module, the system used a total of 4 switches, S3 is the systems power switch, control the weather meter is working, directly connected to the negative 12V.S4 dry battery i

45、s a single Tablet press the reset button.S1, S2 is used to control the LCD1602 screen the whole movement keys. Due to the meteorological data measured by the system is more, 32 bytes of the screen does not show all the measured meteorological data, so to write data in 1602 does not display the addre

46、ss, and then click the S1, LCD1602 the whole screen left shift 16 bit, show not according to the switch does not appear until the meteorological data; click the S2, LCD1602 the entire screen right shifted 16 bit, restore to the original state.Finally, the design of the corresponding software program

47、, the process is as follows:First LCD initialization, and then the program Enter a cycle, in this cycle, the various modules of the meteorological instrument began to work, the first is the DS18B20 will begin to read temperature, will read the temperature value is displayed in the 1602 liquid crysta

48、l display, and then ADC0809 address lock save end selected wind direction sensor input end will be measured the meteorological information by processing software after the show on the LCD, respectively to humidity, wind speed and air pressure sensor measured data for AD conversion, processing and di

49、splay, open the serial port interrupt, MCU RXD accept gr-87 transmission of data, the data to be displayed to the LCD screen, then in the soft A keyboard detection program, when you press the S1, LCD1602 will the whole screen left shift, when you press the S2, LCD1602 will the whole screen is shifte

50、d to the right. As long as there is no shut off the total power of meteorological instrument, the program will continue, that is, the meteorological instrument can real-time detection of the current meteorological data.The system can completely through the simulation, the design of a portable weathe

51、r detection instrument can achieve absolutely system technical requirements, and achieve the required performance index, which has the advantages of high precision, all-weather and low cost characteristics. In addition, the portable meteorological instrument can very good complete meteorological mea

52、surements of the general requirements, but also in the In a variety of harsh environment work, with these advantages, the portable measuring instrument can be widely used in various scenarios of meteorological measurements.Keywords:meteorological instrument;AT89C52; ADC0809;GPS;GPRS1 緒論1.1 研究的背景 天氣預(yù)

53、報(bào)對(duì)現(xiàn)代社會(huì)的重要性是不言而喻的。為了獲得準(zhǔn)確的天氣預(yù)報(bào),很重要的環(huán)節(jié)就是測(cè)量和搜集大量的氣象數(shù)據(jù)、氣象資料。在這個(gè)過(guò)程中,氣象儀是必不可少的。氣象儀能夠?qū)崿F(xiàn)對(duì)測(cè)量點(diǎn)溫度、濕度、風(fēng)向、風(fēng)速、氣壓等氣象參數(shù)的實(shí)時(shí)測(cè)量,它有助于我們了解環(huán)境的變化情況,對(duì)工業(yè)、農(nóng)業(yè)、漁業(yè)等都起著非常重要的作用。便攜式氣象儀除了能夠?qū)崟r(shí)測(cè)量和傳輸氣象信息外,還具有方便攜帶,能夠滿足小范圍氣候監(jiān)測(cè)的要求等特點(diǎn)??梢灶A(yù)知,未來(lái)的氣象儀將向著小型化、實(shí)時(shí)化、便攜化的方向發(fā)展,便攜式氣象儀是其發(fā)展的大勢(shì)所趨。目前,應(yīng)用于工業(yè)、農(nóng)業(yè)、漁業(yè)、氣象等方面的便攜式溫度、氣壓、濕度數(shù) 據(jù)采集系統(tǒng)基本上是采用有線式的,其便攜式性能主要體

54、現(xiàn)在移動(dòng)和架設(shè)的方便 程度等方面,在實(shí)際使用過(guò)程中仍然需要系統(tǒng)布線、建立連接等,并且體積較大, 攜帶不便,不能滿足便攜式設(shè)備的要求。運(yùn)用氣象儀器進(jìn)行大氣測(cè)量,是分析研究大氣活動(dòng)和正確預(yù)報(bào)天氣的必要 手段。因此,氣象儀器和測(cè)量方法的提高和改進(jìn),是大氣科學(xué)研究正常開(kāi)展和天 氣預(yù)報(bào)的關(guān)鍵。微控制技術(shù)的發(fā)展,已使傳統(tǒng)的氣象儀器儀表是“精密機(jī)械”的 概念發(fā)生了深刻的變革,氣象儀器也朝著智能化、網(wǎng)絡(luò)化發(fā)展,高性能的單片機(jī) 在自動(dòng)化氣象儀中起著重要的作用。1.2 國(guó)內(nèi)外研究現(xiàn)狀以前,人們?cè)O(shè)立氣象站,在荒無(wú)人煙的地方設(shè)立氣象站成本很大,而且供電、人員駐站、數(shù)據(jù)傳輸?shù)榷际菃?wèn)題。為了徹底解決這些問(wèn)題,世界各國(guó)都在

55、研制自動(dòng)氣象儀或者便攜式氣象儀。我國(guó)從20世紀(jì)80年代中期始研制便攜式氣象站。目前,很多地方還在繼續(xù)使用國(guó)外的進(jìn)口產(chǎn)品,在采集的精度,抗干擾能力,可測(cè)參數(shù)以及數(shù)據(jù)的傳輸速度和可靠性上都已經(jīng)大幅落后于如今的主流氣象儀技術(shù)。目前國(guó)外最新型的便攜式數(shù)字氣象儀可測(cè)風(fēng)向、風(fēng)速、風(fēng)標(biāo)、側(cè)風(fēng)、順風(fēng)、溫度、大氣壓、相對(duì)濕度、雨量,讀數(shù)并帶數(shù)字羅盤(pán)功能,測(cè)量精度更高,外殼符合復(fù)雜環(huán)境的使用要求。所有可測(cè)的參數(shù)及功能有:以度為單位、順風(fēng)讀數(shù)、溫度、風(fēng)寒指數(shù),顯示到小數(shù)點(diǎn)后一位、背光功能,可配三腳架、防水是一個(gè)一體化設(shè)計(jì)。太陽(yáng)能供電的自動(dòng)氣象站,可靠耐用,在無(wú)太陽(yáng)情況下,正常運(yùn)行60天;無(wú)需電力線,避免雷擊;可直接

56、測(cè)量風(fēng)速風(fēng)向,通過(guò)計(jì)算可得出露點(diǎn),風(fēng)寒等參數(shù),性能非常優(yōu)異。缺點(diǎn)是價(jià)格非常昂貴,不容易普及。1.3 課題研究的內(nèi)容和意義本文研究一種基于無(wú)線傳輸?shù)谋銛y式氣象儀系統(tǒng)。系統(tǒng)是以單片機(jī)AT89C52芯片為主要部件,利用各種傳感器檢測(cè)天氣數(shù)據(jù),實(shí)現(xiàn)了風(fēng)向、風(fēng)速、溫度、濕度和地理位置等要素的測(cè)量與顯示,并通過(guò)無(wú)線網(wǎng)絡(luò)傳輸氣象數(shù)據(jù)。便攜式氣象儀就是針對(duì)上述市場(chǎng)需求,為適應(yīng)小區(qū)域氣候監(jiān)測(cè)而設(shè)計(jì)的產(chǎn) 品,可以廣泛用于局域氣候參數(shù)變化的及時(shí)測(cè)量,為各種生產(chǎn)生活活動(dòng)提供及時(shí) 的氣象信息。該系統(tǒng)集成了溫度、濕度、氣壓、風(fēng)向、風(fēng)速、標(biāo)準(zhǔn)時(shí)間等氣象參 數(shù)的測(cè)量,其精度已經(jīng)達(dá)到標(biāo)準(zhǔn)氣象測(cè)量的要求,并可以實(shí)時(shí)的將各種氣象參

57、數(shù)通過(guò)GPRS通信網(wǎng)絡(luò)發(fā)送至各種地方,為未來(lái)氣象測(cè)量的小型化、實(shí)時(shí)化、便捷化,專業(yè)化提供了堅(jiān)實(shí)保證,具有很強(qiáng)實(shí)用價(jià)值。2 系統(tǒng)方案選擇與論證本設(shè)計(jì)以便攜式移動(dòng)氣象儀為研發(fā)目標(biāo),針對(duì)環(huán)境參數(shù)測(cè)量與傳輸?shù)奶厥庖?,采用各種先進(jìn)技術(shù),提高系統(tǒng)的集成度,實(shí)現(xiàn)移動(dòng)監(jiān)測(cè)氣象參數(shù)、精確定位、 移動(dòng)通信傳輸、氣象信息管理等功能,達(dá)到數(shù)據(jù)可靠穩(wěn)定、實(shí)時(shí)便捷的設(shè)計(jì)理念和目的。2.1 設(shè)計(jì)要求設(shè)計(jì)一個(gè)便攜式氣象檢測(cè)儀(包括測(cè)量裝置和接收裝置,通過(guò)無(wú)線方式通信)。測(cè)量并顯示風(fēng)向、風(fēng)速、溫度、濕度、氣壓等基本氣象要素。提供測(cè)試點(diǎn)的位置(經(jīng)緯度、海拔高度),時(shí)間參數(shù)。使用單片機(jī)控制,要具有鍵盤(pán)電路、顯示電路,無(wú)線通信接口

58、電路,電源電路。主要技術(shù)指標(biāo):溫度范圍:-4060(測(cè)量精度在20時(shí)為0.2);相對(duì)濕度:0100%(測(cè)量精度在20時(shí)為1%);風(fēng)速:0.475m/s(測(cè)量精度為0.17m/s);氣壓:95105kpa(測(cè)量精度為0.1 kpa)。2.2 總體設(shè)計(jì)方案整個(gè)系統(tǒng)測(cè)量部分利用風(fēng)速、風(fēng)向、氣溫、濕度、氣壓等傳感器采集氣象信息,轉(zhuǎn)化為電流信號(hào),參數(shù)顯示在LCD液晶屏幕上,同時(shí)顯示的還有由GPS全球定位系統(tǒng)采集的所在地經(jīng)緯度、海拔高度和標(biāo)準(zhǔn)時(shí)間等。使用GPRS無(wú)線短信模塊實(shí)現(xiàn)數(shù)據(jù)的通信傳輸。2.3 各模塊方案選擇和論證2.3.1主控制器模塊根據(jù)設(shè)計(jì)要求,控制器主要用與各個(gè)傳感器信號(hào)的接收和辨認(rèn)、控制無(wú)線傳輸模塊發(fā)送和接受數(shù)據(jù),控制液晶顯示等。對(duì)于控制

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論