0% found this document useful (0 votes)
3 views5 pages

Report

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 5

Internship Report on Zigbee Technologies with Code and Images in Compiler

Table of Contents

1. Introduction
o Overview of Zigbee Technology
o Importance of Zigbee in IoT

2. Zigbee Network Architecture


o Zigbee Devices
o Zigbee Topologies

3. Zigbee Protocol Stack


o Layers of Zigbee Protocol Stack
o Zigbee Communication Process

4. Applications of Zigbee
o Home Automation
o Industrial Automation
o Health Care

5. Code Implementation Using Zigbee


o Introduction to the Code
o Code for Zigbee Communication
o Images in Compiler: Visual Representation

6. Conclusion

7. References

1. Introduction

Zigbee is a low-power, low-data-rate wireless communication technology designed for embedded


applications that require short-range communication. It operates on the IEEE 802.15.4 standard and is
widely used in Internet of Things (IoT) applications. Zigbee is favored for its low power consumption,
simplicity, and robustness in networks with many devices.
Importance of Zigbee in IoT: Zigbee is one of the most used wireless protocols for home automation,
healthcare, industrial monitoring, and many other IoT applications due to its ability to create reliable and
scalable networks with minimal energy usage.

2. Zigbee Network Architecture

Zigbee networks consist of different types of devices that are connected in various topologies. Below are
the primary components of a Zigbee network:
 Zigbee Coordinator (ZC): The central device in the network that is responsible for starting and
managing the network.
 Zigbee Router (ZR): Devices that route messages between other devices in the network,
extending the range of the network.
 Zigbee End Device (ZED): Devices that are simple and communicate through a coordinator or
router, typically battery-powered with low energy consumption.

Zigbee Topologies

3. Star Topology: All devices communicate directly with the coordinator.

4. Mesh Topology: Devices can communicate with multiple devices, allowing data to be routed
through the network, enhancing reliability.

5. Tree Topology: A hierarchical form of mesh, where devices communicate with each other in a
tree-like structure.

3. Zigbee Protocol Stack

Zigbee uses a layered protocol stack, as defined in the IEEE 802.15.4 standard. The stack consists of:

1. Physical Layer (PHY): Handles the transmission and reception of data through radio waves.

2. Medium Access Control Layer (MAC): Manages access to the shared radio channel and ensures
proper data transmission.

3. Network Layer (NWK): Responsible for routing, addressing, and ensuring reliable data delivery.

4. Application Layer (APL): Defines how applications communicate over the Zigbee network.

4. Applications of Zigbee
 Home Automation: Zigbee is widely used for smart lighting, security systems, and temperature
control.
 Industrial Automation: Zigbee provides a reliable and low-power solution for sensors, control
systems, and asset tracking.
 Healthcare: It is used for remote patient monitoring, fitness tracking, and other medical
applications where low-power, short-range communication is needed.

5. Code Implementation Using Zigbee

This section will show a simple example of Zigbee communication using the Xbee module (which
supports Zigbee) and Python. The code will involve a coordinator and an end device communicating with
each other.
Hardware Setup:

1. Two Xbee modules (one configured as the coordinator and the other as an end device)

2. Xbee USB adapters for communication

3. Computer or microcontroller (to run the code)

Software Setup:
 Python 3.x
 PySerial (for serial communication with Xbee modules)

Code for Zigbee Communication

1. Zigbee Coordinator Code:

import serial

import time

# Set up serial connection for Zigbee Coordinator

xbee_coordinator = serial.Serial('COM4', 9600)

def listen_for_messages():

while True:

if xbee_coordinator.in_waiting > 0:

message = xbee_coordinator.readline()

print(f"Received Message:
{message.decode('utf-8').strip()}")

if name == " main ":

print("Coordinator waiting for messages...")


listen_for_messages()

2. Zigbee End Device Code:

import serial

import time

# Set up serial connection for Zigbee End Device

xbee_end_device = serial.Serial('COM5', 9600)

def send_message(message):

xbee_end_device.write(message.encode('utf-8'))

print(f"Sent Message: {message}")

if name == " main ":

while True:

send_message("Hello from End Device!")

time.sleep(5) # Send message every 5 seconds

3. Communication Flow:
 The Coordinator listens for incoming
messages on its serial port and prints
them.
 The End Device sends a message to the
coordinator every 5 seconds.

Images in Compiler (Visual Representation)

In a real scenario, you can visualize the Zigbee communication and monitor the data flow between the
coordinator and the end device in an IDE or a serial monitor. Here's a simple illustration of how Zigbee
devices interact:
 Coordinator Device (ZC): Acts as the heart of the Zigbee network, establishing connections and
listening for messages.
 End Device (ZED): Sends messages to the coordinator or routers. It has limited functionality to
save power.

For testing the Zigbee communication, you can visualize data flow in a serial monitor connected to both
devices, showing the received and transmitted messages.
Example:
Illustration of Zigbee data flow between Coordinator and End Device

This diagram shows the typical behavior in the Zigbee communication process, where the end device
sends data to the coordinator, and the coordinator listens and processes the data.

6. Conclusion

Zigbee technology is integral in IoT networks because of its low power, reliability, and ability to support
large networks. Zigbee is applied in home automation, industrial systems, and healthcare, making it a
key enabler of smart devices and systems. The provided code examples help demonstrate how Zigbee-
based communication can be achieved using Python and the Xbee module.

Visualizing and testing Zigbee communication through serial monitors or embedded IDEs offers a better
understanding of how devices exchange messages. Zigbee’s use of a mesh network ensures robust and
scalable communication across a wide range of applications.

7. References

1. IEEE 802.15.4 - The Standard for Low Rate Wireless Personal Area Networks (LR-WPANs)

2. Zigbee Alliance Official Documentation (https://zigbeealliance.org)

3. "Zigbee Wireless Networks and Transceivers" by Shahid Hanif

4. PySerial Documentation (https://pythonhosted.org/pyserial/)

This internship report highlights the key aspects of Zigbee technology, the protocol stack, its applications,
and an implementation of Zigbee communication using Xbee modules and Python.

You might also like