With the advancements in communication devices like smartphones and computers, global communication technology has been continuously evolving. Wireless, broadband, and IP technologies have emerged as dominant forces in the current landscape. In the realm of wireless communication, various protocols such as Wi-Fi, Bluetooth, and ZigBee play significant roles. While Wi-Fi and Bluetooth may be more familiar to the general users, ZigBee technology has increasingly permeated our daily lives, especially with the rise of the Internet of Things. In this article, TechSparks will provide a comprehensive introduction to ZigBee, delving into its technical aspects and practical applications.
What is Zigbee Technology
ZigBee is a wireless communication technology that operates on the IEEE 802.15.4 standard, offering short-range, low-power, and low-data-rate capabilities. The name “ZigBee” originates from the intricate dance pattern of honeybees known as the waggle dance. Honeybees utilize this dance to communicate information efficiently within their colonies. The term “ZigBee” is derived from the buzzing sound (zig) made by bees as they flap their wings. This technology was named “ZigBee” to reflect its goal of enabling simple and efficient communication between devices.
Prior to ZigBee’s emergence, Bluetooth was the prevailing wireless technology. However, Bluetooth had certain technical limitations that made it less suitable for industrial remote control and home automation. Recognizing the need for a wireless communication technology better suited for these applications, the ZigBee protocol was officially introduced in the United States in 2003.
ZigBee technology is well-suited for applications requiring automatic control and remote operation. It can be embedded in various devices, making it a popular choice in the IoT and smart home domains. The following are some ZigBee application examples
- Intelligent Lighting Control System
- Smart Security System
- Temperature Control System
- Home Automation
- Sensor Networks
- Warehouse Management
- Logistics Tracking
- Data Collection System
- Intelligent Traffic Control
- Environmental Monitoring
- Energy Management
Working Principle of ZigBee
Designed for low data rate, cost-effective and extended battery life applications, this wireless technology operates in the 868MHz, 915MHz and 2.4GHz frequency bands and operates at a maximum data rate of 250Kbps. It incorporates power-saving techniques, allowing wireless devices in ZigBee applications to spend the majority of their time in energy-saving modes. This significantly reduces the need for frequent battery replacements, enabling devices to operate reliably for many years.
To delve into the working principle of ZigBee, it is essential to understand its layered architecture of the protocol system, comprising the physical layer, the medium access control (MAC) layer, the network layer, and the application layer.
The physical layer in ZigBee defines the interface between the physical wireless channel and the MAC layer. Its main objective is to provide data services and management services specific to the physical layer. The service operates by transmitting and receiving data through the wireless physical channel, while the physical layer management service maintains a database containing physical layer-related data. Adheres to the IEEE 802.15.4 standard and ZigBee supports two physical layers: 2.4 GHz and 868/915 MHz. These physical layers utilize the Direct Sequence Spread Spectrum (DSSS) packet format, but they differ in terms of data parameters and applicable areas.
The packet structure of the ZigBee physical layer is as follows: the preamble (4B) ensures synchronization, the packet delimitation (1B) marks the start of the packet, the physical layer header (1B) indicates the length of the data unit, and the data unit carries the actual transmission data.
2.4 GHz frequency band
ZigBee devices operating in the 2.4 GHz frequency band do not require specific application procedures, as this frequency band is globally allocated as an Industrial, Scientific, and Medical (ISM) band. In this frequency band, ZigBee employs high-order modulation techniques and utilizes an 8-chip length pseudo-random code for direct spread spectrum. These configurations provide advantages such as higher throughput, reduced communication latency, shorter duty cycles, and lower power consumption.
868/915 MHz frequency band
The 868/915 MHz frequency band is not globally unified. To avoid signal interference, different frequency bands are selected in different regions. For example, the United States uses the 915 MHz frequency band, while Europe operates in the 868 MHz ZigBee frequency band. Although the frequencies differ, the core technology remains the same, involving binary phase shift keying (BPSK) modulation with differential coding and direct spread spectrum using an M-sequence with a 15-chip length. As the difference between the two frequency bands is not substantial, adjusting the signal synthesizer can easily accommodate the required frequency change.
Within the IEEE 802 series of standards, the data link layer consists of two sublayers: Logical Link Control (LLC) and Media Access Control (MAC). The LLC is a common layer, while the MAC protocol depends on the specific physical layer.
In accordance with the IEEE 802.15.4 standard, the MAC layer protocol can be combined with various LLC standards. Through the Service-Specific Convergence Sub-layer (SSCS) protocol, the IEEE 802.2 type LLC standard can be carried, enabling other LLC standards to directly utilize the services of the IEEE 802.15.4 MAC layer.
ZigBee employs a straightforward and adaptable MAC layer protocol. Its frame types encompass data frames, sign frames, command frames, and confirmation frames. This technology exhibits advantages for future promotion and utilization due to its cost-effectiveness, ease of implementation, robust data reliability, low power consumption requirements, and suitability for short-range operations.
Furthermore, the working principle of ZigBee involves carrier sense multiple access with collision detection (CSMA/CD) for channel access. It employs a full handshake protocol to ensure that data is inspected before transmission, thereby preventing idle periods that could lead to congestion or conflicts.
Role of Network Layer
The network layer in ZigBee is responsible for various tasks, including network creation, joining and leaving, as well as routing and transmitting network packets. Its primary function is to provide a suitable service interface for the application layer and leverage the functionalities of the MAC layer to deliver services. Consequently, the network layer resides between the MAC layer and the application layer. Within the network layer, two service entities are defined: the Network Layer Data Service Entity (NLDE) and the Network Layer Management Service Entity (NLME).
- NLDE: Through the service access point of the Data Service Entity, the NLDE offers data transmission services.
- NLME: The NLME provides management services through the access point of the Management Services Entity.
Principle of ZigBee Equipment
Wireless devices operating within ZigBee networks can be classified into two primary types: Full-Function Devices (FFD) and Reduced-Function Devices (RFD).
- FFD: These devices possess advanced capabilities and can communicate with both FFDs and RFDs. They employ a full-featured microcontroller unit (MCU) responsible for network control and management.
- RFD: While RFDs can only communicate with FFDs and not with other RFDs, they are typically utilized for simple control applications. These applications entail minimal data volume and resource utilization, making RFDs suitable as communication terminals.
Within FFDs, there exists a device known as the PAN (Personal Area Network) Network Coordinator, which serves as the central node and hub for executing ZigBee functions. In addition to joining the application, the PAN Network Coordinator assumes responsibilities such as managing the identities of other network members, maintaining link state information, and facilitating packet forwarding.
From a network topology perspective, three essential elements are present in ZigBee devices: the Network Coordinator, Network Routers, and Network End Devices.
- Coordinator: Responsible for network establishment and resource allocation.
- Router: Utilized for discovering, establishing, and maintaining routing information for network packets, as well as forwarding them.
- End Device: Refers to user equipment capable of independently joining and leaving the network, as well as receiving and sending network packets. However, end devices do not engage in routing or forwarding functions.
Coordinators and routers are typically implemented as FFD devices, while end devices are represented by RFD devices.
In a ZigBee network, the network topology plays a crucial role and has direct implications on its functionality. An optimized ZigBee topology enables efficient network layout, establishes data transmission paths, and enhances fault tolerance and reliability. Currently, ZigBee technology utilizes three primary network structures: star network, mesh network, and cluster network.
- Star network: This structure is well-suited for devices requiring uninterrupted operation over an extended period. It is the most commonly employed network topology in ZigBee deployments.
- Mesh network: A mesh network relies on multiple interconnected wireless networks to provide additional data communication channels. In the event of an unexpected channel failure, communication can seamlessly be rerouted through alternative channels. This network structure offers high reliability.
- Cluster network: The cluster network combines the advantages and characteristics of both star and mesh networks, incorporating their strengths to optimize network performance.
The uppermost layer responsible for high-level protocol management is typically the application layer protocol, which governs the entire protocol stack. In the context of ZigBee, the application layer protocol can be developed by users to meet the specific requirements of their devices. It maintains the functional attributes of the supported devices and facilitates the discovery of other devices within the network. Application layer protocols enable effective communication among multiple devices by providing suitable services and meeting their specific needs.
Regarding wireless communication technology, ZigBee utilizes a collision-free multi-carrier channel access method known as CSMA/CA (Collision Avoidance). This approach effectively mitigates conflicts between radio carriers, enhancing overall network performance. Additionally, to ensure the reliable transmission of data, ZigBee incorporates a comprehensive response communication protocol. This means that devices engage in necessary interactions during the communication process to guarantee the accurate transmission of data.
We mentioned CSMA/CD and CSMA/CA above, you can enter the Wikipedia page through the link to learn more in-depth content, or understand their concepts through the YouTube video below.
ZigBee vs. WiFi vs. Z-Wave
|Short-range communication protocol, signal coverage between 10 and 100 meters depending on the environment and device power
|Wireless LAN technology, signal coverage can reach hundreds of meters, but may be affected by physical obstacles
|Strong signal penetration, minimal environmental impact, signal coverage between 30 and 100 meters
|10-250 kbps, depending on the ZigBee protocol version used
|Mbps to Gbps, depending on the WiFi standards
|Low power consumption design, provides longer device battery life
|High energy consumption, requires larger battery or continuous power supply for high-speed data transmission and bandwidth
|Low-power design, improves standby time
|Open standard communication protocol, better device compatibility
|Widely used, almost all devices support WiFi connection
|Supports interoperability and device compatibility, but fewer device varieties
|Multi-layer security measures, encrypted communication using AES-128 bit encryption algorithm, authentication and key exchange
|Main security mechanism is WPA2 protocol
|Uses 128-bit AES encryption algorithm for communication security
|IoT field, such as smart home, building automation, smart lighting, security monitoring
|Wide range of applications
|Specifically designed for smart homes
In conclusion, ZigBee stands out as a powerful and stable wireless technology that is in high demand across industries. Its capabilities make it a valuable asset for various applications. As ZigBee continues to evolve and undergo further upgrades and optimizations, it holds the potential to bring even more impressive advancements in the future. The future of ZigBee looks promising, and it is poised to deliver exciting innovations and contribute to the growth of wireless communication technology.