Raspberry Pi IoT無線傳輸技術介紹 - ZigBee篇

46
Raspberry Pi IoT 無線傳輸技術 - ZigBee 台灣樹莓派 <[email protected]> Jul 27, 2016/Raspberry Pi #15

Transcript of Raspberry Pi IoT無線傳輸技術介紹 - ZigBee篇

Raspberry Pi IoT 無線傳輸技術- ZigBee

台灣樹莓派 <[email protected]>Jul 27, 2016/Raspberry Pi #15

姓名標示 — 非商業性 — 相同方式分享

CC (Creative Commons)

姓名標示 — 你必須給予 適當表彰、提供指向本授權條款的連結,以及 指出(本作品的原始版本)是否已被變更。你可以任何合理方式為前述表彰,但不得以任何方式暗示授權人為你或你的使用方式背書。

非商業性 — 你不得將本素材進行商業目的之使用。

相同方式分享 — 若你重混、轉換本素材,或依本素材建立新素材,你必須依本素材的授權條款來散布你的貢獻物。

3

● element14 指定台灣地區 Raspberry Pi 個人用戶經銷商

about 台灣樹莓派

http://farnell.com/raspberrypi-consumer/approved-retailers.php?region=apac&MER=MER-LM-OB-RPICC-76315

● 專注於 Raspberry Pi 應用與推廣

● 舉辦社群聚會 / 工作坊 / 讀書會 / 黑客松

● Website :● https://www.raspberrypi.com.tw/

● Facebook : ● 搜尋 RaspberryPi.Taiwan● https://www.facebook.com/RaspberryPi.Taiwan

about 台灣樹莓派

5

● COSCUP, MakerConf, PyCon 講者

● 投影片

● http://www.slideshare.net/raspberrypi-tw/presentations● 程式碼

● https://github.com/raspberrypi-tw

分享 x 社群

https://www.moedict.tw

7

http://en.wikipedia.org/wiki/Internet_of_Things

從實際的例子瞭解 IoT

9

● 第一步是先找出耗能的地方

節能控制

10

● 第一步是先找出耗能的地方

節能控制

11

● 第一步是先找出耗能的地方

節能控制

● 電力計顯示電流與電壓● 我看著螢幕並抄下數據● 更有效率紀錄的方法?

12

● 第一步是先找出耗能的地方

節能控制

IoT 無線網路通訊技術 - ZigBee

● 高階的無線網路通訊協定 , 由 ZigBee Alliance 制定

● 建構在 IEEE 802.15.4 標準上

ZigBee

http://www.embedded.com/design/industrial-control/4012593/ZigBee-SoCs-provide-cost-effective-solutions

● 低功耗 , 低資料傳輸量 , 支援多種拓撲

特色

http://www.zigbee.org/

ZigBee, WiFi, Bluetooth

ZigBee WiFi Bluetooth

應用領域 無線監測和控制 高速無線網路 個人無線設備

傳輸速率 250Kbps 11Mbps (802.11b)

720Kbps(Classic)

傳輸距離 100m 50-100m 10-100m

特色 低功耗、多種網路拓撲

高速 便宜

http://swf.com.tw/?p=767

● 是 Digi International 所推出的產品線

● 常見型號: XBee Serial 1, XBee Serial 2● Data MCU(Microchip) + Radio Chip(Freescale/Ember)

XBee

https://www.sparkfun.com

XBee Serial 1 vs. XBee Serial 2

http://shop.oreilly.com/product/9780596807740.do

Serial 1 Serial 2Outdoor Range 100m 120m

Topology Digi Mesh ZigBee MeshDIO 8 11AIO 7 4PWM 2 0Configuration Easy HardChip Vendor Freescale Ember

XBee ZigBee vs. XBee-PRO ZigBee

XBee XBee-PRO

Outdoor Range 100m 3200m

Transmit Power 3.1mW 63mW

Cost ~USD$35 ~USD$45

Appearance

https://adafruit.com/

XBee 天線選擇

http://blogspot.tenettech.com/?p=3663

各種轉板

https://goo.gl/ulPDHe

Pins of XBee

https://www.safaribooksonline.com/library/view/the-hands-on-xbee/9780123914040/xhtml/APP010.html

● 使用 XBee 的腳位直接做輸入 / 輸出

● 適合小型 ( 穿戴式 ), 低耗電情境使用

XBee Direct

http://www.thegoodlifelab.com/2011/02/xbee-to-xbee-using-direct-io-dio.html

ZigBee Topology & Role

http://jeromeabel.net

ZigBee Mesh vs. Digi Mesh

http://www.digi.com

Addressing

https://learn.sparkfun.com/tutorials/exploring-xbees-and-xctu/configuring-networks

● AT Mode 適用於點對點或是小的網路拓撲

● API Mode 適合中大型網路環境

AT Mode & API Mode

http://swf.com.tw/?p=788

X-CTU Configuration

http://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu

29

用電腦同時監控多台電力計

https://learn.adafruit.com/tweet-a-watt/

圖表與紀錄

https://learn.adafruit.com/tweet-a-watt/

● 端點 ( 例如電力計 ) 需要讀多種資訊怎麼做 ?

● 無線通訊除了 ZigBee還有哪些選擇 ?

● 端點和電腦中間的資料交換怎麼做 ?● 電腦這麼大台可以換掉嗎?● 數據如何處理和分析?

問題與討論

● 端點 ( 例如電力計 ) 需要讀多種資訊怎麼做 ?

● 無線通訊除了 ZigBee還有哪些選擇 ?

● 端點和電腦中間的通訊協定怎麼做 ?● 電腦這麼大台可以換掉嗎? 換成 Raspberry Pi吧● 數據如何處理和分析?

先從簡單的開始吧

DEMO

Raspberry Pi 與 IoT

● Sensor Node + Internet Gateway

IoT 應用架構

http://micrium.com/iot/devices/

36

● 一個讀取脈博資訊的例子

生理監控上雲端

37

● 透過 Pulse Sensor 讀取脈博資訊

生理監控上雲端

38

● 搭配單晶片電腦將訊號轉為實際脈博數字

生理監控上雲端

39

● 閘道器是連上網路的裝置

生理監控上雲端

40

● 透過藍牙和閘道器做資料交換● 使用 MQTT-SN降低資料傳輸量與確保QoS

生理監控上雲端

41

● 閘道器透過OpenAPI 上傳到雲端

生理監控上雲端

42

● 實現具體而微的 IoT 應用

生理監控上雲端

Sensor Node

Cloud

Internet Gateway

DEMO

44

https://goo.gl/Df0g3M

45

● http://www.digi.com/products/xbee-rf-solutions● https://www.sparkfun.com● http://swf.com.tw/?tag=zigbee● http://www.comfort.net.tw/

參考資料

46

Raspberry Pi Rocks the World

Thanks