ZigBee Siying Li, Lixing Huang, Yulin Xie 1 What is ZigBee Wireless communication protocol standard Mesh network Low-cost, low-power 2 Application Ref: http://www.hometoys.com/images/upload/images/45927016.jpg 3 Application Ref: http://www.emfrf.com/wp-content/uploads/2014/12/smart-meter-network-components.jpg 4 Mesh network 5 6 Start 7 Start 8 B A 9 Find route B A 10 Find route B A 11 Find route B A 12 Return route B A 13 Communicate B A 14 Comparison Zigbee Bluetooth Wi-Fi Range 50-1600m 10m 50m Power Supply Years Days Hours Complicity Simple Complicated Very Complicated Transmission Speed 250 Kbps 1Mbps 1-54Mbps Cost of terminal unit Low Low High Ease of use Easy Normal Hard 15 Comparison Zigbee Bluetooth Wi-Fi Range 50-1600m 10m 50m Power Supply Years Days Hours Complicity Simple Complicated Very Complicated Transmission Speed 250 Kbps 1Mbps 1-54Mbps Cost of terminal unit Low Low High Ease of use Easy Normal Hard 16 Comparison Zigbee Bluetooth Wi-Fi Range 50-1600m 10m 50m Power Supply Years Days Hours Complicity Simple Complicated Very Complicated Transmission Speed 250 Kbps 1Mbps 1-54Mbps Cost of terminal unit Low Low High Ease of use Easy Normal Hard 17 Comparison Zigbee Bluetooth Wi-Fi Range 50-1600m 10m 50m Power Supply Years Days Hours Complicity Simple Complicated Very Complicated Transmission Speed 250 Kbps 1Mbps 1-54Mbps Cost of terminal unit Low Low High Ease of use Easy Normal Hard 18 Comparison Zigbee Bluetooth Wi-Fi Range 50-1600m 10m 50m Power Supply Years Days Hours Complicity Simple Complicated Very Complicated Transmission Speed 250 Kbps 1Mbps 1-54Mbps Cost of terminal unit Low Low High Ease of use Easy Normal Hard 19 Comparison Zigbee Bluetooth Wi-Fi Range 50-1600m 10m 50m Power Supply Years Days Hours Complicity Simple Complicated Very Complicated Transmission Speed 250 Kbps 1Mbps 1-54Mbps Cost of terminal unit Low Low High Ease of use Easy Normal Hard Video? Audio? 20 Xbee RF module A Digi RF module using IEEE 802.15.4 standard and combining with serial command. More on Xbee series: https://www.sparkfun.com/pages/xbee_guide 21 Point-to-point Data transfer UART protocol Transparent mode Source and destination Addressing Configuration 22 Point-to-point Data transfer UART protocol Transparent mode Source and destination Addressing Configuration 23 Point-to-point Data transfer UART protocol Transparent mode Source and destination Addressing Configuration 24 UART Ref: http://www.eecs.umich.edu/courses/eecs373/Lec/373L09W16.pdf 25 UART VCC UART DOUT RTS UART DIN CTS GND Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 26 Transparent mode Default operation DIN data queue up for RF transmission RF received data sends to DOUT Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 27 Addressing Default: 64-bit MAC address Can be read with SL, SH commands 16-bit short address Manually configured using MY command Destination Set with DH, DL commands Parameter Controller Xbee RC car Xbee MY (src addr) 0x01 0x02 DH (dest addr high) 0 0 DL (dest addr low) 0x02 0x01 Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 28 Configuration Software configuration – XCTU http://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu XBee UART-USB Bridge PC Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 29 XCTU 30 XCTU 31 XCTU 32 Configuration AT command – send configuration commands through UART e.g. +++ ATDL1A0D\r ATCN\r //enter AT mode //write low destination address //exit AT mode Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 33 Multi-point API mode 34 API vs Transparent API Transparent Easy to use Complicated Very Easy Protocol & Encoding UART + Software encoding UART + nothing Capability Talk to any one Point to point Content Destination Source address Signal strength Data AT Command Etc... Data 35 API Command Syntax Length = sizeof(Frame Data) Checksum = 0xFF - sum(Frame Data) Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 36 API Command Example Transmit data cmdID: 0x01 (16-bit addr), 0x00 (64-bit addr) Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 37 API Command Example Receive data cmdID: 0x81 (16-bit addr), 0x80 (64-bit addr) Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 38 API Command Example AT command cmdID: 0x08 Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 39 Q&A 40 Appendix 41 AT Command Syntax One line per command Multiple commands in one line Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 42 Network - DigiMesh • Simple setup • All nodes can sleep • Flexibility to expand the network • Good enough for point-to-point Ref: http://www.digi.com/pdf/wp_zigbeevsdigimesh.pdf 43 Network - Zigbee® Mesh • Open standard • Interoperability with devices made by different vendors • Over-the-air firmware upgrades Ref: http://www.digi.com/pdf/wp_zigbeevsdigimesh.pdf 44 Working Mode Transparent Act as direct connection between UART AT Configure module API Most powerful to do everything Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 45 API Command Escape characters Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 46 API Command Frame data structure Ref: https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf 47