【正文】
s daily life are important to the development of science and technology, it is a prehensive result, in more and more fields play an important role, such as the emerging concept of working, it is the use of sensor data collection. Object parameters, coupled with wireless technology, it can be a lot of information of the objects are connected into a work. Data acquisition of diversification, the convenience and accuracy is always thinking hard exploration and humidity sensor application is in such cases emerge as the times require. Agricultural greenhouse production, storage management, weather forecast, daily life and scientific research on temperature, humidity requirement is very important. However, cable connection often has serious limitations, cannot effectively play the work ability. NRF905 wireless transceiver module has the advantages of small 西昌學(xué)院畢業(yè)論文(設(shè)計(jì)) 35 volume, high precision, stable operation, strong antiinterference, stable transmission. Especially suitable for frequent smallflow data transfer applications, such as warehouse management, security, data acquisition, environmental monitoring and so on, economy and utility, reducing the cable data transmission on occasion paper is the use of temperature, humidity sensors to collect the temperature and humidity of environment, through wireless transmission, LCD display, to facilitate the people good regulating temperature and humidity. Through the design of data acquisition acquisition of environmental temperature and humidity. After data processing by wireless acquisition module two parameter data is transmitted to a wireless receiving module. Let us know the environment temperature and humidity conditions. In order to achieve the above functions, the main design hardware modules are: microputer minimum system ( STC89C52chip ), an analogtodigital conversion module ( ADC0809) ( DS18B20) module, temperature sensor, humidity sensor modules ( HR31), a wireless transmitting and receiving module ( NRF905), LCD12864 liquid crystal display module, control module and so from the wireless data collection terminal system function design, wireless data receiving end function design software design and development ponents. The first part of the paper briefly introduces the features of STC89C52 MCU and function application。為了達(dá)到上述功能,主要設(shè)計(jì)的硬件模塊有:?jiǎn)纹瑱C(jī)控制最小系統(tǒng)( STC89C52 單片機(jī))、模數(shù)轉(zhuǎn)換模塊( ADC0809) 、溫度傳感器模塊 (DS18B20)、濕度傳感器模塊( HR31)、無線傳輸接收模塊 (NRF905)、 LCD12864 液晶顯示模塊、控制模塊等等。 農(nóng)業(yè)大棚生產(chǎn)、倉儲(chǔ)管理、氣象預(yù)測(cè)、生活起居及科學(xué)研究中 對(duì) 溫 度, 濕度 的要求顯得非常的重要。 姓名: 2021 年 5 月 23 日 西昌學(xué)院畢業(yè)論文(設(shè)計(jì)) 33 翻 譯 資 料 隨著現(xiàn)代社會(huì)對(duì)溫度,濕度的要求日益重視。經(jīng)過學(xué)習(xí),我積累了很多的關(guān)于無線傳輸?shù)慕?jīng)驗(yàn),并且知道了在合理布線, PCB 板制圖,檢查裝配無誤的情況下,如果還出現(xiàn)電路無輸出的情況,那么可以肯定是原理圖錯(cuò)誤,這時(shí)就要回到原理圖進(jìn)行檢查。 確保 PCB 板上線路連接正常后,開啟自鎖開關(guān)將板上電源接通,再檢測(cè)各電源接口電壓是否正常,看各元件能否 正常工作如有無發(fā)燙現(xiàn)象,過一段時(shí)間再檢測(cè),確定硬件控制器的穩(wěn)定性。 采集板 PCB 板 和繼電器控制板 PCB 板 的制作采用的是 雙面板 面板,由于線路比較多,加上制版工藝的限制,采用自動(dòng)布線功能 難以 完成本控制器 合理 的布線工作,因此采用了手工布線。具體的代碼的編寫已經(jīng)完成,這里為節(jié)約篇幅,不再附上。函數(shù)功能:寫一字節(jié)的數(shù)據(jù)到 128*64,入口參數(shù): b,出口參數(shù):無。 DS18B20 讀一次溫度數(shù)據(jù)的程 序流程圖如圖 19 所示: 圖 19 溫度數(shù)據(jù)采集流程圖 ADC0809 以及適度數(shù)據(jù)采集的程序設(shè)計(jì) 濕度數(shù)據(jù)的采集我們采用的是濕敏電阻 HR31 采集,因?yàn)闈衩綦娮枋请妷盒偷膫鞲衅?,所以單片機(jī)需要通過 AD 轉(zhuǎn)換才能識(shí)別并處理采集到的數(shù)據(jù)。函數(shù)功能 :向 DS18B20 讀一字節(jié)數(shù)據(jù),入口參數(shù) :無,出口參數(shù) :dat。發(fā)光二極管的限流電阻選用的是常用的 470歐姆的電阻,三極管選用的是 9012( PNP) ,為了達(dá)到合適的驅(qū)動(dòng)電流,三極管基極電阻選用的是 1k的電阻。當(dāng)然對(duì) 3V左右的單片機(jī)更加適用 (3) 硬件上沒有 SPI 的單片機(jī),可以用普通單片機(jī) IO 口模擬 SPI,不需要單片機(jī) SPI 模塊介入,只需添加代碼模擬 SPI時(shí)序即可 (4) 13 腳、 14腳為接地腳 ,需要和母板的邏輯地連接起來 (5) 排針間距為 100mil,標(biāo)準(zhǔn) DIP 插針,如果需要其他封裝 接口,比如密腳插針,或者其他形式的接口,可以聯(lián)系我們定做 (6) 與 51系列單片機(jī) P0 口連接時(shí)候,需要加 10K 的上拉電阻 ,與其余口連接不需要 (7) 其他系列的單片機(jī),如果是 5V 的,請(qǐng)參考該系列單片機(jī) IO 口輸出電流大小,如果超過 10mA,需要串聯(lián)電阻分壓,否則容易燒毀模塊 ! 如果是 的,可以直接和 RF905 模塊的 IO口線連接。在 ShockBurst RX模式中, 地址匹配 AM和數(shù)據(jù)準(zhǔn)備就緒 DR信號(hào)通知 MCU一個(gè)有效的地址和數(shù)據(jù)包已經(jīng) 各自接收完成。 NRF905 無線模塊 NRF905 簡(jiǎn)介 NRF905單片無線收發(fā)器是 挪威 Nordic公司推出的單片射頻發(fā)射器芯片,工作電壓為 , 32引腳 QFN封裝( 5mm5mm ),工作于 433/868/915MHz3個(gè) ISM頻道 。上拉電阻的選用要根據(jù)數(shù)據(jù)線的長(zhǎng)短合適的選取。 ( 3)中斷方式 把表明轉(zhuǎn)換完成的狀態(tài)信號(hào)( EOC)作為中斷請(qǐng)求信號(hào),以中斷方式進(jìn)行數(shù)據(jù)傳送。當(dāng) OE 輸入高電平 時(shí),輸出三態(tài)門打開,轉(zhuǎn)換結(jié)果的數(shù)字量輸出到數(shù)據(jù)總線上。下面說明各引腳功能 : IN0~ IN7: 8 路模擬量輸入端 ; 21~ 28: 8 位數(shù)字量輸出端 ; ADDA、 ADDB、 ADDC: 3 位地址輸入線,用于選通 8 路模擬輸入中的一路 ALE:地址鎖存允許信號(hào),輸入,高電平有效 ; START: A/D 轉(zhuǎn)換啟動(dòng)脈沖輸入端,輸入一個(gè)正脈沖(至少 100ns 寬)使其啟動(dòng)(脈沖上升沿使 0809 復(fù)位,下降沿啟動(dòng) A/D 轉(zhuǎn)換 ); EOC: A/D 轉(zhuǎn)換結(jié)束信號(hào),輸出,當(dāng) A/D 轉(zhuǎn)換結(jié)束時(shí),此端輸出一個(gè)高電平(轉(zhuǎn)換期間一直為低電平) ; OE:數(shù)據(jù)輸出允許信號(hào),輸入,高電平有效。但單片機(jī)本身是不能進(jìn)行自動(dòng)復(fù)位的。單片機(jī)最小系統(tǒng)如圖 4 所示: 2827262524212223123456783233343536373839VCC40VSS20XAL119XAL218RST9EA/VPP31PSEN29ALE/PROG301011121314151617U1STC90C58RD+VCCP00P01P02P03P04P05P06P07P10P11P12P13P14P15P16P17P20P21P22P23P24P25P26P27P30P31P32P33P34P35P36P37PSENALEXAL130pFC130pFC2GNDK1VCC10uFC310KR1GND 圖 4 單片機(jī)最小系統(tǒng) 西昌學(xué)院畢業(yè)論文(設(shè)計(jì)) 10 晶振電路設(shè)計(jì)如圖 5 所示: XAL130pFC130pFC2 圖 5 晶振電路 在 晶振電路 中使用了兩個(gè) 30PF 的電容( C1, C2)和一個(gè) 晶振 ( Y1),分別接的是單片機(jī)的 18, 19 引腳,晶振頻率選取的是 ,是因?yàn)橹饕紤]到在串口通信時(shí)的誤碼率的問題??臻e模式下, CPU 停止工作,允許 RAM、定時(shí)器 /計(jì)數(shù)器、串口、中斷繼續(xù)工作。通過對(duì)實(shí)際環(huán)境的溫濕度測(cè)量,證明了該系統(tǒng)硬件電路布局設(shè)計(jì)簡(jiǎn)單合理,體積小,功能齊全,精度高,成本低,性價(jià)比相當(dāng)高,是一款可以普及化的高精度溫濕度參數(shù)檢測(cè)儀 。當(dāng)然我這套裝置只是探索性、實(shí)驗(yàn)性的去設(shè)計(jì)制作,肯定會(huì)存在許多的不足之處,希望在以后的研究中間改進(jìn)加強(qiáng)。 And through the LCD screen to see the change of the temperature and humidity, make timely adjust the possibility. Given the wireless acquisition module, wireless receiving module, LCD display module, control module and STC89C52 singlechip temperature humidity collection display and control system design scheme. And introduces wireless module of hardware and software flow of work. This paper describes the STC89C52 microcontroller, wireless acquisition module, wireless receiving module characteristics and function. Use this scheme, need no