簡易檢索 / 詳目顯示

研究生: 柯博斌
Po-ping Ko
論文名稱: 嵌入式感測盒的實作議題-Raspberry Pi系統模組案例
An embedded-system case study on implementing Raspberry Pi_based Sensor box.
指導教授: 詹朝基
Chao-Chi Chan
口試委員: 陳明志
Ming-Jyh Chern
蔡明忠
Ming-Jong Tsai
學位類別: 碩士
Master
系所名稱: 工程學院 - 自動化及控制研究所
Graduate Institute of Automation and Control
論文出版年: 2014
畢業學年度: 102
語文別: 中文
論文頁數: 120
中文關鍵詞: 感測盒嵌入式系統雲端作業平台UML 塑模
外文關鍵詞: Sensor box, embedded system, cloud platform, UML model
相關次數: 點閱:395下載:13
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 嵌入式系統具有低耗能及穩定長時間工作的能力,是一個成本低廉且效益足擔大任的程式運作模板。因此,本研究以機器人「SPA(Sense, Plan, Act)典範」將其微小化定義為「微架構」。以Sense、Trigger、Transport及Actuator四大環節,完成實作感測盒的「STTA-loop微架構」雛形。

    本研究以Raspberry Pi系統電路板作為開發平台並以Python語言為開發工具,以感測盒實作的方式完成兩個案例的呈現。感測盒的開發以瀑布模式的設計步驟為基礎,歸納出實作的七大設計步驟,藉UML 塑模圖表精確地描述系統元件的互動與狀態。

    搭配冷熱調適量測(手指心跳 )及超音波距離量測兩個案例,藉由感測器模組的輸入獲得高低溫和距離資料,並利用蜂鳴器、LED及8X8點距模組為輸出元件作資料的觀測。結合物聯網的概念,可將感測資料傳輸到ThingSpeak雲端作業平台上作資料的記錄及存放,以及趨勢表的呈現和遠端監控。藉由Python的人機介面設定展示門檻觸發機能,以彰顯異常通知的機制,展示如何將感測資料篩選出異常資料,再傳送到指定的Gmail的信箱。


    The embedded systems have low energy-consuming and long-term stable operation with relative low-cost system architecture. To miniaturize the existing robot SPA (Sense, Plan, Act) model to work in a card-size board as cost-effective micro-architecture is our application goal of sensor box. A STTA-Loop microstructure is well defined as the loop of Sense, Trigger, Transport and Actuator states, and then makes critical sensing data easily and continuously send to a cloud site possible.

    Our study has used Raspberry Pi system board to implement a sensor box and has made good use of Python language as development tool to carry out two case studies. A conventional waterfall model is presented by 7 major design steps, that are mostly illustrated by UML model diagrams to describe the interactive behaviors and states of system board and its attached GPIO devices.

    Two case studies have been used to demonstrate the I/O functions of sensor box with finger pulse data sensed on sudden cold (or hot) environment and ultrasonic wave effects on distances. The sensors can get the real floating data within the assigned temperature range, and use a buzzer and four 8x8 dot matrix modules to indicate the output status. This system would take a proper GMAIL-notification action for exceptional filtered data. Our study made a data-sent-out and store-and-browse implementation to interact with ThingSpeak cloud platform by short python code with triggering thresholds UI and simple API call .

    摘要 I Abstract II 誌謝 III 目錄 IV 圖目錄 VIII 表目錄 XII 第一章 緒論 1 1.1 研究背景與動機 1 1.2 研究主題與目的 1 1.3 研究範圍 2 1.4 論文架構 3 第二章 相關文獻與技術探討 5 2.1 嵌入式系統的軟硬體概述 5 2.1.1 ARM的處理器架構 7 2.1.2 GPIO的原理 8 2.2 嵌入式系統的應用案例 9 2.3 Raspberry Pi樹莓派 10 2.4 Python語言應用 12 2.5 物聯網與Electric Imp應用例 14 2.6 雲端作業平台-ThingSpeak 16 2.7 監控雲端應用趨勢 19 2.8 國內外物聯網發展應用 21 第三章 嵌入式感測盒實作議題 23 3.1 感測盒設計概念 24 3.2 感測盒規劃及微架構 26 3.2.1 系統規劃構想 27 3.2.2 微架構 28 3.3 系統設計目標 30 3.4 開發程序 33 3.5 設計規劃 36 3.5.1 手指心跳功能設計 38 3.5.2 溫度功能設計 40 3.5.3 超音波模組感測器 42 3.6 資料儲存格式 43 3.7 程式流程圖 44 第四章 系統塑模 46 4.1 前言 46 4.2 參考案例概述 48 4.3 UML 塑模方式 51 4.4 實作架構 52 4.4.1 UML 塑模方法 54 4.4.2 案例運作流程的建立 58 4.4.3 系統狀態圖 59 4.4.4 系統循序圖 61 4.4.5 系統程式架構的建立 63 4.5 小節 64 第五章 系統實作與測試 65 5.1 機能測試 65 5.1.1 單元測試 66 5.1.2 結合測試 68 5.1.3 綜合測試 71 5.1.4 程式架構 72 5.1.5 ThingSpeak Channel 設定 74 5.1.6 使用者介面設定 75 5.2 實作測試及結果 81 5.2.1 冷熱調適量測案例 83 5.2.2 距離量測案例 85 5.2.3 雲端作業平台呈現及驗證 86 5.2.4 結果呈現 88 5.3 討論 89 5.3.1 ThingSpeak雲端作業平台 89 5.3.2 實作過程 89 5.4 小結 90 第六章 結論與未來展望 91 6.1 結論 91 6.2 未來展望 92 6.2.1 建立資料庫的網站 92 6.2.2 嵌入式系統的選用 92 6.2.3 居家安全 92 6.2.4 穿戴式感測裝置 92 參考文獻 94 附錄A 硬體架構與案例概述 97 A.1 I2C同步串列通訊 97 A.2 SPI串列外設介面 98 A.3 UART 100 A.4 Raspberry Pi硬體規格 101 A.5 紀錄太陽能充電過程中電池的溫度案例 102 附錄B 實作案例使用的元件概述 105 B.1 輸入元件 105 B.1.1 手指心跳感測器 105 B.1.2 模擬溫度感測器 105 B.1.3 超音波感測器 106 B.1.4 按鈕開關 107 B.2 輸出元件 107 B.2.1 蜂鳴器 107 B.2.2 MAX7219 點陣模組 108 B.3 類比輸入擴充板 108

    [1] David E. Simon,嵌入式系統入門(陳向群譯),五南圖書出版公司,台北(2006)。
    [2] 曾川源,「基於雲端作業平台之嵌入式Android 農業監控系統設計與實現」,碩士論文,國立宜蘭大學,宜蘭(2012)。
    [3] Roger Meike,Arduino Uno vs BeagleBone vs Raspberry Pi,取自:http://makezine.com/2013/04/15/arduino-uno-vs-beaglebone-vs-raspberry-pi/(2013)。
    [4] Wikipedia,Reduced instruction set computing,取自:http://en.wikipedia.org/wiki/Reduced_instruction_set_computing(2011)。
    [5] Wikipedia,GPIO,取自:http://zh.wikipedia.org/wiki/GPIO(2011)。
    [6] 莊錦勝,「基於網宇實體系統的健康監測技術應用」,碩士論文,國立清華大學,新竹(2013)。
    [7] 裴鴻達,「以可穿戴式足部感測裝置實現動作感知跌倒偵測系統」,碩士論文,國立成功大學,臺南(2013)。
    [8] Wikipedia,Raspberry Pi,取自:http://en.wikipedia.org/wiki/Raspberry_Pi(2011)。
    [9] Wikipedia,Python,取自:http://zh.wikipedia.org/wiki/Python(2011)。
    [10] 鄭凱駿,「智能物流之商業模式探討」,碩士論文,國立東華大學,花蓮(2011)。
    [11] Electric Imp,Electric Imp,取自:https://electricimp.com/(2011)。
    [12] ioBridge,ThingSpeak,取自:https://thingspeak.com/(2008)。
    [13] Dexter Industries,ThingSpeak Temperature with Raspberry Pi ,取自:http://www.dexterindustries.com/BrickPi/projects/thingspeak-temperature-log/(2009)。
    [14] Michael Nilsson & Marcus Olsson,Electric Imp solar powered temperature logger,取自:http://www.slickstreamer.info/2013/09/electric-imp-solar-powered-temperature.html(2013)。
    [15] 曾國勝,「基於MSRDS 平台的仿真機器人虛擬環境之建置研究-e保姆系統開發案例」,碩士論文,國立臺灣科技大學,台北(2011)。
    [16] Wikipedia,I2C,取自:http://zh.wikipedia.org/wiki/I%C2%B2C(2011)。
    [17] ADS1115,Analog-to-Digital Converter with Internal Reference,取自:http://www.ti.com/lit/ds/symlink/ads1115.pdf(2009)。
    [18] Wikipedia,SPI,取自:http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus(2011)。
    [19] MAX7219,8-Digit LED Display Driver,取自:http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf(2003)。
    [20] Wikipedia,UART,取自:http://zh.wikipedia.org/wiki/UART(2011)。
    [21] Wikipedia,Raspberry Pi,取自:http://en.wikipedia.org/wiki/Raspberry_Pi(2011)。
    [22] 曹永忠、許智誠、蔡英德,Arduino 超音波測距機設計與製作,渥瑪數位有限公司,彰化(2013)。
    [23] Simon Monk ,Raspberry Pi Cookbook,O'Reilly Media(2013)。
    [24] 卓聖鵬,嵌入式系統開發技術,全華圖書股份有限公司,新北市(2005)。
    [25] Booch, G., Maksimchuk, R. A., Engle, M. W.,Object-Oriented Analysis and Design with Applications Third Edition 物件導向分析設計與應用(蔡煥麟譯),碁峰資訊股份有限公司,台北市(2007)。
    [26] 林耀坤,「以靈活塑模驅動開發程序為基礎發展相撲機器人的競賽策略」,碩士論文,國立臺灣科技大學,台北市(2010)。
    [27] Wikipedia,嵌入式系統,取自:http://en.wikipedia.org/wiki/Embedded_system(2011)。
    [28] 研華科技,雲端監控系統養殖應用案例,取自:http://www.advantech.tw/eAutomation/Remote-IO/Applications.aspx?doc_id={EA6C1063-AF66-42A3-BCE3-8E440269C79(1983)。
    [29] Libelium,Smart City,取自:http://www.libelium.com/smart_city_environmental_parameters_public_transportation_waspmote/(2006)
    [30] Philippe Kruchten,The Rational Unified Process An Introduction Third Edition, Addison-Wesley,Massachusetts (2003)。

    QR CODE