基于STM32智能家居的無(wú)線網(wǎng)關(guān)設(shè)計(jì)與實(shí)現(xiàn)
發(fā)布時(shí)間:2018-01-19 01:18
本文關(guān)鍵詞: 智能家居 STM32 ZigBee CC2530 WiFi ESP8266 uC/OS-Ⅱ 出處:《浙江理工大學(xué)》2017年碩士論文 論文類型:學(xué)位論文
【摘要】:經(jīng)濟(jì)的發(fā)展與技術(shù)的進(jìn)步帶動(dòng)著人們更加渴望高品質(zhì)的生活質(zhì)量,作為當(dāng)今產(chǎn)業(yè)大熱門的智能家居逐漸成為市場(chǎng)關(guān)注的焦點(diǎn),很多科技公司紛紛開(kāi)發(fā)出自己的產(chǎn)品。不過(guò)由于浮夸的宣傳,不合理的定位和高昂的價(jià)格,導(dǎo)致了消費(fèi)者紛紛對(duì)智能家居產(chǎn)品望而卻步,行業(yè)呈現(xiàn)出叫好不叫賣的現(xiàn)象。鑒于此種情況,本文定位于智能家居中低端產(chǎn)業(yè),開(kāi)發(fā)設(shè)計(jì)出一款簡(jiǎn)單實(shí)用、價(jià)格低廉的智能家居控制網(wǎng)關(guān)系統(tǒng),目的是在于讓普通人也可以享受科技發(fā)展的成果。該網(wǎng)關(guān)系統(tǒng)綜合了電子技術(shù)、計(jì)算機(jī)技術(shù)、通信技術(shù)等多種技術(shù),從硬件和軟件兩個(gè)方面對(duì)控制網(wǎng)關(guān)進(jìn)行深入研究,最終實(shí)現(xiàn)對(duì)家居環(huán)境遠(yuǎn)程監(jiān)測(cè)的目的。在硬件方面,該控制網(wǎng)關(guān)系統(tǒng)采用以單片機(jī)為硬件控制平臺(tái),以供電模塊、時(shí)鐘模塊、EEPROM模塊等眾多外圍電路模塊為輔助,結(jié)合ZigBee與WiFi無(wú)線通訊技術(shù),完成對(duì)智能家居網(wǎng)關(guān)系統(tǒng)的搭建工作。該網(wǎng)關(guān)系統(tǒng)的單片機(jī)采用功能強(qiáng)大、價(jià)格低廉基于ARM 32位Cortex?-M3的STM32F103RCT6,它主要負(fù)責(zé)對(duì)家居環(huán)境的任務(wù)調(diào)度,智能控制;ZigBee部分采用主芯片為CC2530的無(wú)線通信模塊,該模塊主要包括兩個(gè)部分:協(xié)調(diào)器和終端節(jié)點(diǎn),終端節(jié)點(diǎn)除了通信部分,還包括溫濕度傳感器、光線傳感器、煙感傳感器等部分,它負(fù)責(zé)完成對(duì)數(shù)據(jù)的采集、打包和發(fā)送工作,協(xié)調(diào)器則負(fù)責(zé)把終端節(jié)點(diǎn)發(fā)送的數(shù)據(jù)進(jìn)行重新打包然后通過(guò)串口傳送給主控模塊;WiFi部分采用的是價(jià)格低廉、功能實(shí)用的ESP8266WiFi通信模塊,該模塊有三種工作模式:STA、AP和STA/AP,使得WiFi部分兼具連接熱點(diǎn)和發(fā)送熱點(diǎn)兩種功能,該模塊負(fù)責(zé)智能家居控制單元和外界通信的工作,它通過(guò)串口和控制單元通信,然后通過(guò)WiFi網(wǎng)絡(luò)發(fā)送接收信息。在軟件方面,控制網(wǎng)關(guān)采用以Keil和IAR為開(kāi)發(fā)環(huán)境,以u(píng)C/OS-Ⅱ操作系統(tǒng)為程序運(yùn)行環(huán)境,結(jié)合C語(yǔ)言及少量匯編語(yǔ)言,共同完成系統(tǒng)的軟件控制工作。Keil和IAR作為開(kāi)發(fā)環(huán)境可以進(jìn)行程序檢測(cè)、燒錄等輔助工作,大大減輕了工作量;uC/OS-Ⅱ操作系統(tǒng)短小精煉、功能強(qiáng)大的特點(diǎn),使得硬件資源可以更加合理的利用,有助于節(jié)約成本,同時(shí)也讓控制網(wǎng)關(guān)系統(tǒng)可以實(shí)時(shí)多任務(wù)執(zhí)行,增強(qiáng)了系統(tǒng)功能;此外充分合理利用了網(wǎng)絡(luò)庫(kù)函數(shù)資源,大大節(jié)約了學(xué)習(xí)與開(kāi)發(fā)進(jìn)度。設(shè)計(jì)的智能家居網(wǎng)關(guān)系統(tǒng)關(guān)鍵在于構(gòu)建一個(gè)智能家居技術(shù)平臺(tái),實(shí)現(xiàn)對(duì)家居內(nèi)溫度、濕度、光線強(qiáng)度和煙霧濃度等家居環(huán)境數(shù)據(jù)的采集與發(fā)送,實(shí)用性強(qiáng)、成本低廉是它的特色,完成這個(gè)平臺(tái)的搭建,以后進(jìn)行系統(tǒng)升級(jí)將會(huì)非常簡(jiǎn)單。不過(guò)課題主要是研究智能家居的下位機(jī)部分,對(duì)于遠(yuǎn)程數(shù)據(jù)的發(fā)送與接收則采用網(wǎng)絡(luò)調(diào)試助手工具。
[Abstract]:With the development of economy and the progress of technology, people are eager for high quality of life. As a hot industry, smart home has gradually become the focus of attention in the market. Many technology companies have developed their own products, but because of grandiose publicity, unreasonable positioning and high prices, consumers have been deterred by smart home products. In view of this situation, this paper focuses on the low-end industry of smart home, and develops and designs a simple and practical intelligent home control gateway system with low price. The goal is to enable ordinary people to enjoy the fruits of the development of science and technology. The gateway system integrates electronic technology, computer technology, communication technology and other technologies. From the hardware and software aspects of the control gateway in-depth study, and finally achieve the purpose of remote monitoring of the home environment. In hardware, the control gateway system uses single-chip microcomputer as the hardware control platform. With power supply module, clock module, EEPROM module and other peripheral circuit modules as assistance, combined with ZigBee and WiFi wireless communication technology. To complete the building of smart home gateway system. The single chip microcomputer of the gateway system is powerful and cheap based on ARM 32-bit Cortex-based. M3 STM32F103RCT6, it is mainly responsible for the home environment task scheduling, intelligent control; The ZigBee part uses the main chip as the CC2530 wireless communication module, this module mainly includes two parts: the coordinator and the terminal node, the terminal node in addition to the communication part, also includes the temperature and humidity sensor. Light sensor, smoke sensor and other parts, it is responsible for data collection, packaging and sending work. The coordinator is responsible for repackaging the data sent by the terminal node and transmitting it to the main control module through the serial port. The WiFi part uses the low-cost, functional ESP8266WiFi communication module, this module has three working modes: STAAP and STA/AP. The WiFi part has two functions of connecting hot spot and sending hot spot. The module is responsible for the communication between the intelligent home control unit and the outside world. The module communicates with the control unit through the serial port. In software, the control gateway adopts Keil and IAR as the development environment and UC / OS- 鈪,
本文編號(hào):1442008
本文鏈接:http://sikaile.net/shoufeilunwen/xixikjs/1442008.html
最近更新
教材專著