【正文】
中有廣泛的應(yīng)用。 圖 1 系統(tǒng)框架圖 本系統(tǒng)上位機(jī)與無線收發(fā)模塊通過 RS232 連接,主要完成單片機(jī)與 PC 機(jī)的數(shù)據(jù)傳輸。溫度測量用到了一線式數(shù)字溫度傳感器 DS18B20,該器件體積小 ,集成度高,自帶 A/D 轉(zhuǎn)換功能,更重要的是功耗低。在生產(chǎn)過程中,可以實(shí)現(xiàn)對(duì)人類難以或無法到達(dá)的工作現(xiàn)場的監(jiān)測,應(yīng)用這一系統(tǒng)可對(duì)生產(chǎn)現(xiàn)場的工藝參數(shù)進(jìn)行采集、監(jiān)視和記錄,為提高產(chǎn)品質(zhì)量、降低成本提供了信息和手段。無線數(shù)字信號(hào) 傳輸方式消除了長電纜傳輸帶來的噪聲干擾,整個(gè)測量系統(tǒng)具有極高的測量精度和抗干擾能力。 Temperature sensor。傳輸距離 50m,溫度范圍達(dá)到 0 至125 攝氏度,精度 1 攝氏度。隨著生活水平的提高和科學(xué)技術(shù)的進(jìn)步,無論是工業(yè)還是農(nóng)業(yè)或者是日常生活中對(duì)溫度檢測的要求越來越高,要求能進(jìn)行一定距離的傳輸?;谶@點(diǎn) 本設(shè)計(jì)主要基于 MCS51單片機(jī)并由溫度傳感器、無線傳輸器、 LED 數(shù)碼管和上位機(jī)組成的同步顯示的溫度采集系統(tǒng) 解決了這個(gè)日常生活工作中的問題。 關(guān)鍵字 : MCS51; nRF24L01; LED 顯示;溫度傳感器;無線傳輸 The Wireless Temperature Measurement System Based on Single Chip Microputer Abstract:Temperature detection in the daily life, work, and has important application in engineering practice. With the improvement of living standards and the progress of science and technology, whether agricultural or requirement for temperature detection in daily life can request for a distance of transmission. Based on that this design is mainly based on MCS 51 single chip microputer and the temperature sensor, wireless transmitter, LED digital tube and upper unit into synchronous display of temperature acquisition system solved the problems in daily life. Workplace sampling to temperature chip DS18B20 temperature to achieve the precision and accuracy, the last of the collected temperature data by module nRF24L01 wireless transmission and through digital tube display the current temperature controlled by single chip microputer, which can break the traditional operating temperature, is limited by distance of defects and easy to read temperature. After the hardware and software testing, we basically achieved with a temperature sensor to collect temperature, after a certain distance transmission with nRF24L01 in accept the PC software displayed on the model. Transmission distance 50 m, the temperature range of 0 to 125 degrees Celsius, the precision of 1 c. Keywords: MCS51。 Wireless transmission 目 錄 引 言 ............................................................................................................................... 1 1 系統(tǒng)結(jié)構(gòu)及工作原理 ................................................................................................... 2 系統(tǒng)結(jié)構(gòu) ............................................................................................................ 2 系統(tǒng)控制核心 —— AT89C52 ............................................................................ 2 單片機(jī)的引腳介紹 ................................................................................. 2 單片機(jī)內(nèi)部資源介紹 ............................................................................. 4 系統(tǒng)工作原理簡介 ............................................................................................ 5 數(shù)字溫度傳感器 DS18B20...................................................................... 7 無線傳輸 .................................................................................................. 7 LED 顯示 .................................................................................................. 9 2 下位機(jī)部分介紹 ......................................................................................................... 11 DS18B20 溫度采集模塊 .................................................................................. 11 DS18B20 簡介 ........................................................................................ 11 DS18B20 的測溫方法 ............................................................................ 12 LED 數(shù)碼顯示模塊 .......................................................................................... 14 nRF24L01 無 線發(fā)送模塊 ................................................................................. 17 3 上位機(jī)部分介紹 ......................................................................................................... 20 無線接收模塊 .................................................................................................. 20 上位機(jī)上的數(shù)據(jù)顯示 ...................................................................................... 21 4 模塊間的通信 ............................................................................................................. 23 上位機(jī)與單片機(jī)的通信 .................................................................................. 23 串口通信簡介 ....................................................................................... 23 PC 機(jī)側(cè) VB 程序 ................................................................................... 25 nRF24L01 與單片機(jī)的通信 ............................................................................. 25 DS18B20 與單片機(jī)的通信 .............................................................................. 26 5 系統(tǒng)調(diào)試 ..................................................................................................................... 28 DS18B20 溫度采集并顯示 .............................................................................. 28 nRF24L01 發(fā)送與接收模塊調(diào)試 ..................................................................... 29 6 總結(jié) ............................................................................................................................. 31 【參考文獻(xiàn)】 ................................................................................................................. 32 附 錄 ............................................................................................................................. 33 致 謝 ............................................................................................................................. 46 第 1 頁 引 言 隨著無線技術(shù)的日益發(fā)展,無線傳輸技術(shù)應(yīng)用越來越被各行各業(yè)所接受 ,無線傳輸傳感器的檢測數(shù)據(jù)也不例外。無線傳感器節(jié)點(diǎn)采用無線網(wǎng)狀網(wǎng)設(shè)備,可以組成龐大的網(wǎng)絡(luò)結(jié)構(gòu),支持多達(dá)上千個(gè)測點(diǎn)同時(shí)進(jìn)行大型結(jié)構(gòu)試驗(yàn)。測溫節(jié)點(diǎn)工作在各個(gè)測溫地點(diǎn),進(jìn)行溫度數(shù)據(jù)采集和無線發(fā)送。處理器選用最常用的 MCS51 單片機(jī)。下位機(jī)即 MCS51 與無線收發(fā)模塊采用串行通信, LED 為一個(gè)四合一