簡易檢索 / 詳目顯示

研究生: 許祐寧
Emilio Hsu
論文名稱: 一個應用於智慧農場的物聯網系統 - 網路與雲端資料庫實作
An Internet of Things System for Smart Farm Applications - Implementation of Networking and Cloud Database
指導教授: 吳傳嘉
Chwan-Chia Wu
口試委員: 黎碧煌
Bih-Hwang Lee
張俊明
Chun-Ming Chang
謝錫堃
Ce-Kuen Shieh
吳傳嘉
Chwan-Chia Wu
學位類別: 碩士
Master
系所名稱: 電資學院 - 電機工程系
Department of Electrical Engineering
論文出版年: 2020
畢業學年度: 108
語文別: 中文
論文頁數: 119
中文關鍵詞: 物聯網智慧農場藍牙低功耗網狀網路MQTT雲端資料庫
外文關鍵詞: Internet of Things (IoT), Smart Farm, Bluetooth Low Energy (BLE), Mesh Network, Message Queuing Telemetry Transport (MQTT), Cloud Database
相關次數: 點閱:424下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 近年來,氣候變遷、全球糧食短缺,隨著物聯網的快速發展,智慧農業開始興起,如何有效率且可靠的收集資訊、如何自動化與遠端控制、如何更人性化呈現裝置的狀態與位置,是現代智慧農業所探討的重點。

    本論文提出一套應用於智慧農場的物聯網系統架構,結合Wi-Fi連結範圍大和藍牙低功耗的特性,設計出Combo node與BLE node,並透過網狀網路、MQTT、MySQL、Website、APP實現資料的收集與上傳、遠端控制以及雲端資料庫的彙整與管理。系統流程大致如下:當感測器收到感測資訊後,藉由Combo Mesh Network與MQTT通訊協定傳至伺服器端,伺服器會將感測資訊寫入資料庫,並顯示相關資訊在有網路連結的人機介面上,使用者也可透過人機介面改變MQTT主題內容,反向傳輸達到控制效果。

    除此之外,基於可靠性、穩定性與擴展性的考量,本論文也設計出一套改良的網狀網路機制,減少資料碰撞與廣播風暴,系統中含有自組建功能,只要能傳資料的節點正確供電開啟,便能使所有節點自動連接,同時透過這套機制,不只能確保裝置準確無誤收到感測器資料,也能確保使用者的命令可以即時正確地發出,使系統裝置立即反應。

    最後,本論文所開發的系統,除了應用於智慧農場,也能提供各式大型場域蒐集感測資訊、發出即時命令,應用範圍可以非常廣泛。


    Recently, we are confronted with climate change which causes the world to face a serious food shortage problem. Along with the development of the Internet of Things (IoT), Smart agriculture begins to flourish. Improving the efficiency and reliability of information collection and letting the device more user-friendly to the situation and position is the point of modern smart agriculture.

    This paper proposes an IoT system architecture that applies to the smart farm. Based on the properties of the large connecting range of the Wi-Fi and low power consumption of Bluetooth, we design a combo node and BLE node. To archive the information collection and upload, remote controlling and management of the cloud database, we use through the mesh network、MQTT、MySQL、Website and APP. The whole system is shown as follows: After the sensor gets the information, it will send to the server through the combo mesh network and Message Queuing Telemetry Transport (MQTT). The server will put the information to the database and show the related information to the network connecting on the human-machine interface (HMI). Also, the user can change the content of the MQTT through the HMI to archive the control effect by the reverse transmission.

    Due to the concern of reliability, stability, and scalability, this study also designs a improve mesh network. This network can reduce data collisions and broadcast radiation. Furthermore, the system contains a self-organization function. When the node sending the information is power on properly, other nodes will be automatically connected. Meanwhile, using the system not only guarantees the preciseness of the received data but also ensures the order from the user can be sent to the device immediately and works appropriately.

    Eventually, the system can apply in many different scenarios not only in the smart farm but the other situation which needs to collect sensor information and send instant command.

    摘要 I Abstract II 誌謝 III 目錄 IV 圖目錄 X 表目錄 XV 第一章 緒論 1 1.1 研究背景 1 1.1.1 物聯網 1 1.1.2 智慧農業 1 1.2 研究動機 2 1.3 研究目的 2 1.4 章節架構 3 第二章 相關技術與文獻介紹 4 2.1 無線隨意網路 4 2.2 網路拓撲 4 2.2.1 常見拓撲介紹 4 2.3 藍牙技術 7 2.3.1 藍牙低功耗 7 2.3.2 BLE Mesh網路 7 2.3.2.1 連線主從架構 (Master/Slave Architecture) 8 2.3.2.2 洪泛法 (Flooding) 8 2.4 Wi-Fi技術 9 2.4.1 IEEE 802.11 9 2.4.2 傳輸方式 11 2.5 HTTP 11 2.5.1 HTTP/1.1訊息格式 11 2.5.2 GET與POST 14 2.6 WebSocket 14 2.7 MQTT 16 2.7.1 MQTT架構 16 2.7.2 MQTT運作模式 17 2.7.3 MQTT特性 18 2.8 CSMA/CD與CSMA/CA 19 第三章 開發平台與工具選擇 20 3.1 微控制器與整合開發環境選擇 20 3.1.1 Arduino IDE 20 3.1.2 Arduino Uno 21 3.1.3 NodeMCU 24 3.2 藍牙模組選擇 25 3.2.1 未選HC-05與HC-06 25 3.2.2 JDY-10M 27 3.2.2.1 技術規格 27 3.2.2.2 支援項目 28 3.2.2.3 常用AT指令 29 3.2.2.4 序列埠MESH數據發射 30 3.2.2.5 序列埠MESH數據接收 30 3.3 ThingSpeak 31 3.4 MySQL 32 3.4.1 SQL 語言 32 3.4.2 RDBMS術語 33 3.4.3 MySQL管理 33 3.4.4 MySQL特性 35 3.5 Anaconda 35 3.6 Mosquitto與 MQTTLens 36 3.6.1 Mosquitto 36 3.6.2 MQTTLens 37 第四章 系統架構設計 38 4.1 系統需求說明 38 4.1.1 數據傳輸 38 4.1.2 資料儲存 39 4.1.3 人機介面 39 4.2 系統技術架構規劃 40 4.2.1 節點架構設計 41 4.3 系統應用功能規劃 42 4.3.1 BLE Mesh Network 42 4.3.2 BLE Node與Combo Node 功能流程 44 4.3.3 API Server 功能設計 51 4.3.4 遙控開關功能流程設計 52 第五章 系統架構實踐與成果 55 5.1 微控制器與整合開發環境建置 55 5.2 藍牙模組設定與命令 57 5.3 函式庫設計 58 5.4 資料封包與指令規劃 64 5.5 雲端資料庫匯入方法 65 5.5.1 匯入ThingSpeak 65 5.5.2 匯入MySQL 67 5.6 API Server建置與運作 68 5.6.1 建置與運作流程 68 5.7 MQTT遠端控制實踐 70 5.7.1 實作測試 71 5.8 系統實踐成果 73 5.8.1 Mesh機制 73 5.8.2 感測器資料上傳雲端資料庫 77 5.8.3 異常判斷 78 5.8.4 遠端控制LED燈開關 79 第六章 系統比較與討論 82 6.1 系統可靠性 82 6.2 系統穩定性 83 6.3 系統擴展性 84 第七章 結論與未來展望 85 7.1 結論 85 7.2 未來展望 86 參考文獻 88 附錄 90

    [1] “智慧農業,” 行政院農業委員會農業試驗所, 2020. https://www.intelligentagri.com.tw/.
    [2] “網路拓撲,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/网络拓扑.
    [3] 粘添壽, “電腦網路與連結技術:第七章 區域網路連結,” 2002. http://www.tsnien.idv.tw/Network_WebBook/chap7/7-1 區域網路模型.html.
    [4] “環狀拓撲,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/環狀拓撲.
    [5] “網狀網路,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/网状网络.
    [6] “藍牙,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/藍牙.
    [7] “藍牙低功耗,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/蓝牙低功耗.
    [8] J.Chen, “透過連線/廣播方式實作 BLE網狀網路建構非夢事,” 2015. https://www.2cm.com.tw/2cm/zh-tw/tech/7480E3786F984FCBA7CC9DFDFAE3D196.
    [9] 李宗豫, “應用於智慧農場之網狀網路設計(II) - 藍牙低功耗網路,” 國立台灣科技大學電機所碩士論文, 2019. .
    [10] “IEEE 802.11ac,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/IEEE_802.11ac.
    [11] “IEEE 802.11ax,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/IEEE_802.11ax.
    [12] JS-Zheng, “Http/1.1訊息格式.” https://notfalse.net/39/http-message-format.
    [13] “HTML 表單中 GET 與 POST 的用法差異,” wibibi.com 網頁設計教學百科, 2012. https://www.wibibi.com/info.php?tid=235.
    [14] 許賀凱, “一種應用於智慧門鎖之加解密機制,” 國立台灣科技大學電機所碩士論文, 2017. .
    [15] C.Tsai, “Raspberry Pi 筆記(48):IoT裝置間的通訊協定 MQTT,” 2019. https://atceiling.blogspot.com/2019/04/raspberry-pi-48devicesmqtt.html.
    [16] 趙英傑, “MQTT教學(一):認識MQTT,” 網昱多媒體, 2017. https://swf.com.tw/?p=1002.
    [17] “載波偵聽多路存取,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/载波侦听多路访问.
    [18] 林信良, 用 mBlock 玩 Arduino - Starting from Scratch. 碁峰資訊股份有限公司, 2015.
    [19] 趙英傑, “HC-05與HC-06藍牙模組補充說明(一),” 網昱多媒體, 2014. https://swf.com.tw/?p=693.
    [20] “ThingSpeak for IoT,” The MathWorks, Inc., 2020. https://thingspeak.com/pages/commercial_learn_more.
    [21] “MySQL是什麼?,” 億聚網., 2017. https://www.1ju.org/mysql/what-is-mysql.
    [22] “MySQL 教程,” 菜鸟教程 runoob.com. https://www.runoob.com/mysql/mysql-tutorial.html.
    [23] “phpMyAdmin,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/PhpMyAdmin.
    [24] “MySQL,” Wikipedia, 2020. https://zh.wikipedia.org/wiki/MySQL.
    [25] “Anaconda介紹及安裝教學,” MAPE Academy, 2018. https://medium.com/python4u/anaconda介紹及安裝教學-f7dae6454ab6.
    [26] “Anaconda (Python發行版),” Wikipedia, 2020. https://zh.wikipedia.org/wiki/Anaconda_(Python发行版).
    [27] 黃英豪, “一個應用於智慧農場的物聯網系統 - 行動裝置應用程式,” 國立台灣科技大學電機所碩士論文, 2020. .
    [28] 林政宏, “一個應用於智慧農場的物聯網系統 - 網頁應用程式,” 國立台灣科技大學電機所碩士論文, 2020. .

    無法下載圖示 全文公開日期 2025/08/12 (校內網路)
    全文公開日期 2025/08/12 (校外網路)
    全文公開日期 2025/08/12 (國家圖書館:臺灣博碩士論文系統)
    QR CODE