zigbee เบื้องต้น

28
EST Laboratory EST Laboratory CEDK CEDK - - 8, 8, - - WP WP ZigBee ZigBee Wireless Communication Protocol Wireless Communication Protocol

Upload: catcher-in-the-mist

Post on 16-Nov-2014

1.039 views

Category:

Documents


4 download

DESCRIPTION

เป็นเอกสารที่ผมเขียนประกอบบรรยาย + workshop เล็ก ๆ (ประมาณสองชั่วโมงครึ่ง, พ.ศ. 2551) เพื่อแนะนำ ZigBee ในส่วนของ workshop แบ่งเป็น 3 กิจกรรม 1. โค้ดสำหรับ coordinator เพื่อสร้าง network 2. โค้ดสำหรับ RFD เพื่อ join เข้า network ที่สร้างตามข้อ 1. และ 3. ดัดแปลงโค้ด (1-2 บรรทัด) เพื่อส่งข้อความระหว่าง coordinator กับ end device

TRANSCRIPT

Page 1: ZigBee เบื้องต้น

EST LaboratoryEST Laboratory

CEDKCEDK--8, 8, --WPWPZigBeeZigBee Wireless Communication ProtocolWireless Communication Protocol

Page 2: ZigBee เบื้องต้น

Essential Facts and Features

Page 3: ZigBee เบื้องต้น

ZigBeeZigBee เปน protocol ในกลุม 802

Page 4: ZigBee เบื้องต้น

ขอดีขอดี1. low cost2. ultra-low power consumption3. use of unlicensed radio bands4. cheap and easy installation5. flexible and extendable networks6. integrated intelligence for network set-up and message routing

Page 5: ZigBee เบื้องต้น

Typical Application AreasTypical Application Areas1. low data rates (ไมเกิน 250 kbps)2. nodes which are idle (ไมมกีารรับ/ การสง) for long periods3. node locations where cables would be difficult or expensive to install4. a need to modify the network (add, remove or move nodes) while in service

เปรียบเทียบ ZigBeeZigBee กับ BluetoothBluetooth1. Power consumption

ZBZB 10 mA BTBT 100 mA2. Production costs (2005)

ZBZB 1.1 USD BTBT 3 USD3. Development costs

Codesize ZB/ Codesize BT = 1/24. Bit-error-rate (BER)

Page 6: ZigBee เบื้องต้น

ตัวอยางสมาชิกพันธมิตร ZigBeeZigBee

ZigBeeZigBee BluetoothBluetoothSmaller packets over large network Larger packets over small networkData rate 250 kpbs @ 2.4 GHz Data rate is 1 Mbps @ 2.4 GHz65536 nodes (in a mesh) 7 nodes (in a star)Simplified protocol stack More complex protocol stack

Page 7: ZigBee เบื้องต้น

Radio CommunicationRadio CommunicationZB ใชความถี่ยาน unlicensed มี 3 ยาน ซึ่งมี centered frequency ที่ 868, 915 และ 2400 MHz มีทัง้หมด 27 ชอง (หมายเลข 0 ถึง 26) ม ีdatarate 3 คาคือ 20, 40 และ 250kbps ตามลําดับ

Range of TransmissionRange of Transmissionในพื้นทีโ่ลงระยะสื่อสารประมาณ 200 เมตร สําหรับในอาคาร มีระยะสื่อสารประมาณ 30 เมตร สามารถเพิ่มระยะสื่อสารไดโดยการเพิ่ม intermediate node หรือ router

Page 8: ZigBee เบื้องต้น

Low Power ConsumptionLow Power Consumptionตัว node ออกแบบมาสําหรับใหเปน autonomous, low-power device

Page 9: ZigBee เบื้องต้น

Node TypesNode Types

Co-ordinatorใน 1 network มไีดเพียง 1 ตัว มีหนาที่1. เลือกชองความถี่ทีจ่ะสรางเน็ตเวิรก2. เริ่มเน็ตเวิรก3. อนุญาตให node อื่น ๆ เขารวมเน็ตเวิรก

End Device

Router1. สงขอความตอไปยัง node อื่น2. อนุญาตใหมี node ลูก

End device สามารถหลับได แต Co-ordinator กับ Router หลับไมได!

Page 10: ZigBee เบื้องต้น

BindingBinding

Page 11: ZigBee เบื้องต้น

ReliabilityReliability1. Listen before Send (CSMA-CA)

2. Acknowledgement3. Alternative Routes

SecuritySecurity1. AES (Advanced Encryption Standard) based Encryption2. Message Timeout3. Access Control lists

Page 12: ZigBee เบื้องต้น

Basic Software ArchitectureBasic Software Architecture

Page 13: ZigBee เบื้องต้น

ZigBeeZigBee Interoperability & CoexistenceInteroperability & Coexistence

Page 14: ZigBee เบื้องต้น

ZigBeeZigBee Protocol Profile ArchitectureProtocol Profile Architecture

Page 15: ZigBee เบื้องต้น
Page 16: ZigBee เบื้องต้น

16

TELECOM SERVICES

m-commerceinfo servicesobject interaction (Internet of Things)

ZigBeeWireless Control that

Simply Works

HOME CONTROL

TVVCRDVD/CDremote

securityHVAClighting controlaccess controlirrigation

PC & PERIPHERALS

INDUSTRIALCONTROL

asset mgtprocess control

environmentalenergy mgt

PERSONAL HEALTH CARE

securityHVACAMR

lighting controlaccess control

mousekeyboardjoystick

patient monitoring

fitness monitoring

ZigBeeZigBee ApplicationsApplications

Page 17: ZigBee เบื้องต้น

Home ControlHome Control

Page 18: ZigBee เบื้องต้น

Wireless Sensor ApplicationsWireless Sensor Applications

Page 19: ZigBee เบื้องต้น

Commercial Building AutomationCommercial Building Automation

Page 20: ZigBee เบื้องต้น

Advanced Metering InfrastructureAdvanced Metering Infrastructure

Page 21: ZigBee เบื้องต้น

Wireless Sensor ApplicationsWireless Sensor Applications

Page 22: ZigBee เบื้องต้น

Wireless Sensor ApplicationsWireless Sensor Applications

Page 23: ZigBee เบื้องต้น

LAB 1: LAB 1: Being a parent!Being a parent!

1. เปดโปรเจค “..\Consumer Electronics\Design Kit-8\Source\Apps\ZBLab1\Lab1Coordinaotr.mcp” คอมไพลแลวโปรแกรมลงบอรด CEDK-8 เพื่อใหทําหนาที่เปน Coordinator

Page 24: ZigBee เบื้องต้น

LAB 1: LAB 1: Being a parent!Being a parent!

2. ตอบอรด CEDK-8 กับ PC ผานพอรตอนุกรม กําหนดให Baud rate 19,200 bps, Parity = None, Data Bits = 8, Stop Bits = 1รันโปรแกรม และดูผลการสรางเน็ตเวิรก

Page 25: ZigBee เบื้องต้น

LAB 2: Looking for MomLAB 2: Looking for Mom!!

1. เปดโปรเจค “..\Consumer Electronics\Design Kit-WP\Source\Apps\ZBLab2\Lab2RFD.mcp” คอมไพลแลวโปรแกรมลงบอรด CEDK-WP เพื่อใหทําหนาที่เปน RFD

2. ตอบอรด CEDK-WP กับ PC ผานพอรตอนุกรม กําหนดให Baud rate 19,200 bps, Parity = None, Data Bits = 8, Stop Bits = 1 รันโปรแกรม และดูผลการขอเชือ่มตอเน็ตเวิรก

Page 26: ZigBee เบื้องต้น

LAB 3: Beware of mLAB 3: Beware of my message!y message!

1. เปดโปรเจค “..\Consumer Electronics\Design Kit-WP\Source\Apps\ZBLab3\Lab3RFD.mcp”

2. แกไข Source Code

Page 27: ZigBee เบื้องต้น

LAB 3: Beware of mLAB 3: Beware of my message!y message!

3. คอมไพลแลวโปรแกรมลงบอรด CEDK-WP เพื่อใหทําหนาที่เปน RFD 4. ตอบอรด CEDK-WP กับ PC ผานพอรตอนุกรม กําหนดให Baud rate 19,200 bps, Parity = None, Data

Bits = 8, Stop Bits = 1 รันโปรแกรม และดูผลการขอเชือ่มตอเน็ตเวิรก5. Bind ระหวาง Coordinator กับ RFD โดยการกด SW16. สง message โดยการกด SW2

Page 28: ZigBee เบื้องต้น