【正文】
........................................ 7 LED 顯示 .................................................................................................. 9 2 下位機部分介紹 ......................................................................................................... 11 DS18B20 溫度采集模塊 .................................................................................. 11 DS18B20 簡介 ........................................................................................ 11 DS18B20 的測溫方法 ............................................................................ 12 LED 數(shù)碼顯示模塊 .......................................................................................... 14 nRF24L01 無 線發(fā)送模塊 ................................................................................. 17 3 上位機部分介紹 ......................................................................................................... 20 無線接收模塊 .................................................................................................. 20 上位機上的數(shù)據(jù)顯示 ...................................................................................... 21 4 模塊間的通信 ............................................................................................................. 23 上位機與單片機的通信 .................................................................................. 23 串口通信簡介 ....................................................................................... 23 PC 機側(cè) VB 程序 ................................................................................... 25 nRF24L01 與單片機的通信 ............................................................................. 25 DS18B20 與單片機的通信 .............................................................................. 26 5 系統(tǒng)調(diào)試 ..................................................................................................................... 28 DS18B20 溫度采集并顯示 .............................................................................. 28 nRF24L01 發(fā)送與接收模塊調(diào)試 ..................................................................... 29 6 總結(jié) ............................................................................................................................. 31 【參考文獻】 ................................................................................................................. 32 附 錄 ............................................................................................................................. 33 致 謝 ............................................................................................................................. 46 第 1頁 引 言 隨著無線技術(shù)的日益發(fā)展,無線傳輸技術(shù)應用越來越被各行各業(yè)所接受 ,無線傳輸傳感器的檢測數(shù)據(jù)也不例外。 LED display。 關(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。在經(jīng)過軟硬件測試后,我們基本實現(xiàn)了用溫度傳感器采集溫度,用 nRF24L01 進行一定距離傳輸后在接受端的上位機軟件上顯示出來的模型?;谶@點 本設(shè)計主要基于 MCS51單片機并由溫度傳感器、無線傳輸器、 LED 數(shù)碼管和上位機組成的同步顯示的溫度采集系統(tǒng) 解決了這個日常生活工作中的問題。 2020 屆 本 科生畢業(yè)論文 存檔編號 畢業(yè)論文 (設(shè)計 ) 論文(設(shè)計)題目 基于單片機的無線溫度測量系統(tǒng) English Topic The wireless temperature measurement system based on single chip microputer 系 別 物理與電子工程學院 專 業(yè) 自 動 化 班 級 學 生 指導教師 2020 年 5 月 15 日 基于單片機的無線溫度測量系統(tǒng) 摘要 : 溫度檢測在日常生活、工作和工程實踐中具有重要的應用。隨著生活水平的提高和科學技術(shù)的進步,無論是工業(yè)還是農(nóng)業(yè)或者是日常生活中對溫度檢測的要求越來越高,要求能進行一定距離的傳輸。工作場所的溫度采集用到了溫 度采集芯片 DS18B20 來達到一定的準確度和精確度,最后采用 nRF24L01 模塊對采集到的溫度數(shù)據(jù)進行無線傳輸并通過由單片機控制的數(shù)碼管顯示當前溫度,從而能打破傳統(tǒng)溫度操作受到距離限制的缺陷的同時便于溫度的讀取。傳輸距離 50m,溫度范圍達到 0 至125 攝氏度,精度 1 攝氏度。 NRF24L01。 Temperature sensor。而 實際溫度控制過程中既要求系統(tǒng)具有穩(wěn)定性、實時性,又需要使系統(tǒng)功耗低 、 保證溫度的均勻性 和數(shù)據(jù)可實時共享 ,因此可 設(shè)計一種低功耗的多點 可方便上傳至上位機的 無線溫度檢測系統(tǒng)。無線數(shù)字信號 傳輸方式消除了長電纜傳輸帶來的噪聲干擾,整個測量系統(tǒng)具有極高的測量精度和抗干擾能力。 無線溫度測量設(shè)備被廣泛應用于運動物體、不方便假設(shè)線路場所以及危險,有毒,有害等場所的溫度測量。在生產(chǎn)過程中,可以實現(xiàn)對人類難以或無法到達的工作現(xiàn)場的監(jiān)測,應用這一系統(tǒng)可對生產(chǎn)現(xiàn)場的工藝參數(shù)進行采集、監(jiān)視和記錄,為提高產(chǎn)品質(zhì)量、降低成本提供了信息和手段。基站與多個節(jié)點進行無線通信,并通過 LED顯示將數(shù)據(jù)顯示出來,同時可以通過 無線傳輸技術(shù) 將數(shù)據(jù)發(fā)送給 PC。溫度測量用到了一線式數(shù)字溫度傳感器 DS18B20,該器件體積小 ,集成度高,自帶 A/D 轉(zhuǎn)換功能,更重要的是功耗低。溫度數(shù)據(jù)的傳輸將會采用低功耗發(fā)射與接收模塊 nRF24L01,它在測量點接收單片機 的傳感器數(shù)據(jù)并把數(shù)據(jù)以無線方式傳輸出去,接收部分通過接收模塊(同樣是 nRF24L01)接收數(shù)據(jù),并進行數(shù)字濾波,然后再將接收到的數(shù)據(jù)以異步串行通信方式上傳給上位機。 圖 1 系統(tǒng)框架圖 本系統(tǒng)上位機與無線收發(fā)模塊通過 RS232 連接,主要完成單片機與 PC 機的數(shù)據(jù)傳輸。主要完成溫度采集,同步顯示,同步上傳至上位機。 系統(tǒng)控制核心 —— AT89C52 AT89C52是一個低電壓,是一款