資源描述:
《基于網(wǎng)絡(luò)的遠(yuǎn)程溫度檢測系統(tǒng)設(shè)計(jì)》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、華北電力大學(xué)本科畢業(yè)設(shè)計(jì)(論文)基于網(wǎng)絡(luò)的遠(yuǎn)程溫度檢測系統(tǒng)設(shè)計(jì)摘要遠(yuǎn)程溫度檢測系統(tǒng)是一種不需人員到達(dá)現(xiàn)場就能完成遠(yuǎn)程溫度監(jiān)控的系統(tǒng),它可以有效地解決傳統(tǒng)人工檢測存在的諸如效率低、成本高、錯(cuò)誤率高的問題。遠(yuǎn)程溫度檢測系統(tǒng)中最重要的部分就是數(shù)據(jù)傳輸方法的選擇,根據(jù)現(xiàn)有的幾種數(shù)據(jù)傳輸方法的優(yōu)缺點(diǎn),本文提出了一種基于以太網(wǎng)傳輸數(shù)據(jù)的遠(yuǎn)程溫度檢測系統(tǒng)方案。以太網(wǎng)具有不需單獨(dú)布線,兼容性強(qiáng),技術(shù)支持廣泛的優(yōu)點(diǎn),采用以太網(wǎng)作為傳輸方法的遠(yuǎn)程溫度檢測系統(tǒng)有良好的發(fā)展前景。而且隨著網(wǎng)絡(luò)應(yīng)用的普及,本方案只需要經(jīng)過小量修改,則可應(yīng)用到其他網(wǎng)絡(luò)通
2、信設(shè)計(jì)。具有較強(qiáng)的示范意義。本系統(tǒng)分為三大模塊,分別為數(shù)據(jù)采集模塊,數(shù)據(jù)傳輸模塊和上位機(jī)軟件。數(shù)據(jù)采集模塊通過8位單片機(jī)ATmega32采集溫度數(shù)據(jù),將其儲存到外圍串行EEPROM中,防止意外斷電造成數(shù)據(jù)丟失。數(shù)據(jù)傳輸模塊分為以太網(wǎng)接口和ATmega32上的TCP/IP協(xié)議棧兩部分。以太網(wǎng)接口硬件部分主要由ATmega32,以太網(wǎng)卡芯片Enc28j60組成,由于8位單片機(jī)資源有限,ATmega32上的TCP/IP協(xié)議棧只包含ARP,ICMP,IP,TCP和UDP協(xié)議,并且根據(jù)本系統(tǒng)需要實(shí)現(xiàn)的功能,這些協(xié)議經(jīng)過了相應(yīng)簡化,例如
3、,在ICMP協(xié)議中僅實(shí)現(xiàn)了Ping應(yīng)答功能;在護(hù)協(xié)議中去掉了路由和數(shù)據(jù)報(bào)分片功能,僅實(shí)現(xiàn)數(shù)據(jù)報(bào)的發(fā)送和接收;在TCP協(xié)議簡化了狀態(tài)機(jī),滑動窗口和定時(shí)重傳機(jī)制,減少了連接數(shù)。上位機(jī)軟件利用VC++的SOCKET編程實(shí)現(xiàn),具有測試連接,顯示即時(shí)數(shù)據(jù)的功能。經(jīng)過測試,本系統(tǒng)可以實(shí)現(xiàn)實(shí)時(shí)顯示數(shù)據(jù),與上位機(jī)進(jìn)行通信,以及在上位機(jī)上實(shí)時(shí)查詢數(shù)據(jù)的基本功能。關(guān)鍵詞:遠(yuǎn)程溫度檢測系統(tǒng),以太網(wǎng),TCP/IP協(xié)議53華北電力大學(xué)本科畢業(yè)設(shè)計(jì)(論文)AbstractTheremotetemperaturereadingsystemisanewmo
4、deinwhichtemperaturedatacanbereadwithoutpeopleonthespot.Itcaneffectivelysolvetheproblemssuchaslowefficiency,highcostandhigherrorrate.Thedatatransmissionisthemostimportantpartinaremotetemperaturereadingsystem,basedonadvantagesanddisadvantagesofcurrentdatatransmissio
5、nmethods,aremotetemperaturereadingsysteminwhichdataistransmittedbasedonEthernetispresented.ForEthernettechnologyhasmanyadvantagessuchasgoodcompatibility、extensivetechnicalsupport,andtheresearchinthisfieldissignificative.Thissystemconsistsofthreemainmodules:datacoll
6、ectionmodule.datatransmissionmoduleandsoftwareonthecomputer.Indatacollectionmodule,the8-bitMCUATmega32isusedtocollectdataandstoredinEEPROMtoavoiddatalostcasedbyaccidentalpoweroff.thedatatransmissionmoduleconsistsoftheEthernetinterfaceandsimpleTCP/IPprotocolstackonA
7、Tmega32.ThehardwarepartoftheEthernetinterfaceismadeupofATmega32,EthernetcontrollerEnc28j60.Forthelimitedresourceof8-bitMCU,TCP/IPprotocolstackonATmega32onlyhasprotocolsincludingARP,ICMP,IP,TCPandUDP.Inaddition,theseprotocolsaresimpleaccordingtothefunctionsthissyste
8、mneedtohave.InICMPprotocol,onlyPingfunctionisreserved.InIPprotocol,theroutingandpacketsegmentfunctioniscancelled,onlypacketsendandreceivefunction