Lecture 10
Lecture 10
Lecture 10
For IoT
Topic: ZigBee Networks
Lecture - 10
Md Rafiqul Islam
Lecturer, Dept of IoT and Robotics, BDU
1
Table of Contents
● Introduction to ZigBee
● The History of Zigbee
● Types of ZigBee Devices
● Zigbee Network Topologies
● General Characteristics of Zigbee Standard
● The Role of Zigbee in IoT
● Zigbee Protocol
● Zigbee 3.0
● Common Wireless Applications for Zigbee
● Zigbee Specifications
● Limitation of Zigbee
● XBee S2C RF Module
2
Introduction to ZigBee
● Zigbee is a wireless technology developed as an open global market
connectivity standard to address the unique needs of low-cost, low-power
wireless IoT data networks.
● It can also be moved, since the network doesn’t care about the physical
location of a sensor, pump or valve.
3
The History of Zigbee
4
Types of ZigBee Devices
● Zigbee Coordinator (ZC):
○ The central controller and root of the Zigbee network.
○ It initiates the network, manages security (acting as the Trust Center),
and stores network information.
○ There is only one coordinator per network.
● Zigbee Router (ZR):
○ A device that extends network range by relaying data between other
Zigbee devices.
○ It supports network functionality and can host application processes.
Typically, ZRs are mains-powered for continuous operation.
● Zigbee End Device (ZED):
○ A simple, low-power device that connects to a parent node (either the ZC
or ZR) for communication.
○ It does not route data and conserves energy by sleeping when inactive,
often used in battery-powered applications.
5
Zigbee Network Topologies
● Star Topology (ZigBee Smart Energy): Consists of a coordinator and several end devices, end
devices communicate only with the coordinator.
● Mesh Topology (Self Healing Process): Mesh topology consists of one coordinator, several
routers, and end devices.
● Tree Topology: In this topology, the network consists of a central node which is a coordinator,
several routers, and end devices. the function of the router is to extend the network coverage.
6
General Characteristics of Zigbee Standard
● Low Power Consumption
● Support Small and Large Networks (up to 65000 devices (Theory); 240 devices (Practically))
● (2.4 GHz Band, 868 MHz Band, 915 MHz Band) 3 frequency bands
7
The Role of Zigbee in IoT
● The specification is a packet-based protocol intended for low-cost, battery-operated devices and
products.
● The Zigbee IoT protocol allows devices to communicate data seamlessly in a variety of network
topologies using extremely limited power.
8
Zigbee Protocol
● Zigbee Standard: The Zigbee Alliance developed the
Zigbee standard by adding a network layer, a security
layer and an application framework on the top of IEEE
802.15.4 standard.
● Zigbee 3.0: The Zigbee Pro specification adds new
features such as child device management, improved
security, and new network topology options.
9
Zigbee 3.0
● IEEE® 802.15.4 PHY Layer (Physical Layer)
○ Manages the physical radio transmission and reception.
○ This layer defines the modulation techniques, frequency bands (typically 2.4 GHz), and data rates (250 kbps).
○ It deals with signal transmission and reception, power levels, and channel selection.
● IEEE® 802.15.4 MAC Layer (Medium Access Control Layer)
○ Controls access to the physical radio channel and manages data transmission.
○ This layer uses the CSMA/CA protocol for collision avoidance and handles data frame validation,
retransmission, and acknowledgment of data packets.
● Zigbee Network (NWK) Layer
○ Manages network formation, routing, and security.
○ The NWK layer enables mesh networking capabilities, including device joining, leaving, addressing, and
routing between nodes.
○ It also handles the encryption and decryption of data for secure communication.
10
Cont…
● Zigbee Pro APS Layer (Application Support Sub-layer)
○ Acts as an interface between the application and network layers.
○ This layer manages message formatting, binding tables (which define communication between devices), and
reliable message delivery, ensuring that data is delivered correctly to the intended device.
● Zigbee Device
○ Defines the roles and behavior of the devices in the Zigbee network.
○ This layer specifies how devices interact and communicate within the network.
○ Zigbee devices can play various roles, such as coordinators, routers, or end devices, each with specific
responsibilities like network setup, data routing, or simple data collection.
● Business Application
○ Represents the end-user application that utilizes Zigbee network services.
○ This is the topmost layer where applications such as lighting control, environmental monitoring, and home
automation operate.
○ It interacts with the lower layers to send and receive data, providing user-specific services and functionalities.
11
Features of Zigbee
● Flexibility : Supports multiple network topologies such as point-to-point, point-to-multipoint and mesh
networks
● Low latency : Can easily transport sensor data with minimal latency
● Scalability : Includes Direct Sequence Spread Spectrum (DSSS) up to 65,000 nodes per network
● Low power consumption : Zigbee devices can operate for several years on a single inexpensive battery
thanks to its use of a power-saving feature called “sleep mode”
● Low data rate : With a data rate of up to 250 kbit/s, Zigbee is best suited for intermittent data sensor or
device transmissions
● Security : Zigbee security uses 128-bit AES encryption as well as many additional security techniques.
12
Security, Compatibility and Over-the-Air (OTA)
● Zigbee employs 128-bit AES encryption for robust security.
● Security is applied at the Application, Network, and MAC layers, ensuring encryption, integrity, and
authentication for transmitted data.
● Zigbee Pro 2023 introduces enhanced security features, including improved protections during device
onboarding and ongoing network operation.
● Zigbee is designed for backward and forward compatibility, ensuring that new and old Zigbee devices
can communicate seamlessly.
● Compatible devices include popular products like Samsung SmartThings, Amazon Echo Plus and Echo
Show, Philips Hue, Yale smart locks, and others.
● Zigbee's OTA upgrade allows a single device to update the firmware of all network devices wirelessly.
● This feature enables manufacturers to deploy firmware updates, enhance security, and even add new
features, ensuring all devices run the latest software.
13
Common Wireless Applications for Zigbee
● Green tech applications - Zigbee mesh is an excellent choice for green technology applications
such as solar and wind farms and EV charging networks.
● Smart home - In a smart home, a Zigbee network can control lights, door locks, smoke detectors,
fans, appliances and more. In fact, Zigbee is employed by most large smart home ecosystem
providers, including the Amazon Echo Plus, Samsung SmartThings and Signify (formerly Philips
Lighting). Worldwide, there are hundreds of millions of Zigbee products in smart homes and
buildings.
● Smart energy - Zigbee devices built to Zigbee Pro 2023 specifications can now share the same
network as Smart Energy devices to improve the control and use of these devices.
● Medical - In a medical scenario, a patient can wear sensors that collect and communicate vitals
such as heart rate, blood pressure and blood glucose levels wirelessly to a hospital.
● Industrial automation - Inside a building, Zigbee can be used to automate lighting control, HVAC,
security and access control systems.
14
Zigbee Mesh Network
15
Examples of Zigbee Devices
● Samsung SmartThings: Samsung SmartThings devices such as Outlets, Motion, Multipurpose and
Arrival have Zigbee chips that can receive and provide information
● Philips Hue Smart Devices: The Hue Bridge employs Zigbee to connect to a Wi-Fi network so users can
control Philips Hue smart lights using the Philips Hue app from anywhere with an Internet connection
● Amazon Echo: The Amazon Echo Show and Echo Plus have built-in smart home hubs to control many
Zigbee smart devices such as light bulbs, door locks, in-wall switches, sensors and plugs
● FLO EV charging stations: FLO builds electric vehicle charging networks using Digi XBee® Zigbee
modules and industrial gateways
● Suntrac® by P4Q solar tracking: P4Q Electronics integrates Digi XBee Zigbee modules into their
Suntrack solar tracking technology, which adjusts solar panel positioning and enables customers to
remotely monitor solar panel fields around the globe
● Sicom's CityMesh® smart street lighting: This scalable smart cities network incorporates Digi XBee
Zigbee modules, and controls thousands of streetlights and traffic lights with greater precision and a better
eco-footprint
16
Zigbee Specifications
Zigbee Pro The Zigbee Pro 2023 specification adds security enhancements and support for
bands beyond 2.4 GHz. The 800 MHz frequency for Europe and the 900 MHz
frequency for North America and Australia improves signal strength and range
for broader use.
Zigbee RF4CE The ZigBee RF4CE is a simple but robust low-cost radio frequency standard
communication protocol for consumer electronics. Its primary application is for
remote controls, especially TVs, stereos and set-top boxes.
Zigbee IP ZigBee IP is the first IPv6-based open standard for a full wireless mesh
networking solution. It is an upgraded version of Zigbee designed to control and
connect many different low-power devices into a single control network, enabling
seamless integration with IP-based networks.
17
Limitation of Zigbee
● Limited Range: Short communication range (up to 100 meters) compared to Wi-Fi or Bluetooth.
● Low Data Rate: Max transmission rate of 250 kbps, unsuitable for high-bandwidth applications.
● Interference Issues: Operates in the 2.4 GHz band, prone to interference from Wi-Fi, Bluetooth,
and microwaves.
● Limited Device Capacity: Supports up to 65,000 nodes theoretically, but fewer in practical use.
● Security Vulnerabilities: Potential exposure if devices are not secured properly during onboarding.
● Power Consumption: Routers and coordinators require continuous power, limiting deployment
options.
18
XBee S2C RF Module
● XBee S2C RF Module enables secure network-based wireless
communication.
● It operates on a 2.4GHz frequency for data transfer.
● The module can only communicate with other XBee modules.
● Communication involves creating a network for data transmission
between XBee modules.
● The brand or manufacturer of the XBee module doesn’t affect
compatibility as long as it supports the XBee S2C mesh network.
● Preferred for its simple setup and compatibility within XBee mesh
networks.
● Commonly used for peer-to-peer communication
19
Pin Configuration of Xbee
1 VCC To Power input to the device.
3 DIN/CONFIG/DIO14 It acts as a UART serial data input. It also works as a GPIO pin
4 DIO12/SPI_MISO Pin4 is the data output pin for SPI communication. The pin is also
useable for simple GPIO functions.
5 RESET This pin will help to reset the device through an external signal.
6 RSS/PWM0/DIO10 The pin6 is useable for PWM and GPIO pins but at the same time it
is also useable for signal strength indication in UART serial
communication
7 PWM1/DIO11 This pin act as GPIO and Pulse width modulation.
9 DTR/SLEEP_RQ/ This pin controls the sleep line of the module XBee S2C. It also acts
DIO8 as a GPIO function.
10 GND Pin 10 is a ground pin for command ground with external devices
like power supply
20
Cont…
11 DIO4/SPI_MOSI This pin acts as a GPIO pin but it can also help in SPI communication for data
input of XBee.
12 CTS/DIO7 This pin act as an indicator of RS232 communication to clear about the flow
control. This pin also works a GPIO functions
13 ON_SLEEP/DIO9 The pin ON_SLEEP helps to check the status of the XBee. It is also useable
for GPIO functions.
14 VREF The direct interface of ADC VREF is helpful in analog voltage reference.
15 ASC/DIO5 This pin is helpful to get the indication of a device that is in sleep mode and
diagnostic mode. The pins also work GPIO pins.
16 RTS/DIO6 In RS232 communication the RTS requires to indicate the flow control. This pin
also acts as GPIO pins.
17 AD3/DIO3/ This pin is a slave select pin of SPI communication. It also works as GPIO and
SPI_SSEL Analog data input pin.
18 AD2/DIO2/ The pin 18 is a clock pin of the SPI communication. This pin also works in
SPI_CLK Analog input and GPIO too.
19 AD1/DIO1/ SPI_ATTN pin helps to get the attention of the master whenever there a data
SPI_ATTN output from XBee. This pin also works as GPIO and Analog input.
20 AD0/DIO0/CMSN The pin20 is for the Commissioning button. it is also useable for GPIO and
BTN ADC input.
21
XBee S2C RF Module Features
● The device can act as a stand-alone device
● It can communicate up to 400ft in the closed area but in line to line sight, it can communicate up to
4000ft without any interference.
● The microcontroller can send the data up to 256kbs at UART communication but the data send rate
can extend up to 5Mbs by SPI communication.
● The device works with 3.3V and uses only 40-45mA current at maximum usage.
● Hardware Requirements: Use a breakout board or Explorer with a USB-to-UART converter for
configuration.
● PAN ID: Set the same PAN ID for all communicating devices to recognize each other within the
same network.
● Transmitter and Receiver: Assign one module as the transmitter and the other as the receiver
using the CE (Coordinator Enable) field in the settings.
● Baud Rate: Record the baud rate set during configuration, as it is required when setting up serial
communication in Arduino code.
25
26