基于ZigBee的激光灯控制系统

 2022-05-20 10:05

论文总字数:32662字

摘 要

Zigbee是一种具有低数据传输速率、能够进行短距离无线通信的新兴通信技术,其基于IEEE 802.15.4标准建立,具有网络容量大、布设成本低、节点功耗小、通信可靠性高等特点。由于Zigbee网络节点的体积小,功耗低,组网灵活,且功能丰富,该技术非常适合用来组建无线传感控制网络。随着经济与技术的发展,目前生产生活中所使用的照明设备的数量与种类都在快速增加,而大量的照明设备为传统的开关布设与控制带来了巨大的挑战,也在无形中增加了能源的浪费。

针对上述的问题,本论文利用Zigbee技术设计并实现了一种照明灯具的分组远程控制方案,为每个照明设备分配一个ZigBee节点,并利用Zigbee对照明设备进行组网控制,大大提高了控制照明开关的便捷性。方案的设计包含两个主要的部分,分别是硬件的设计与软件的编写。硬件部分包括显示模块、按键交互模块、Wi-Fi模块、灯光驱动模块等部分的设计、制作、安装。而软件部分包括了Z-Stack协议栈的移植与优化、基于协议栈的应用开发、命令处理与分发、用户界面设计等,能够驱动硬件实现ZigBee组网、数据传输以及分组控制开关等功能。在完成设计方案后,对整个系统进行实物测试,并确认了能够通过上位机控制灯光,且系统能够完成预期功能。

关键词:Zigbee,无线通信,照明控制,CC2530,Z-Stack协议栈,Wi-Fi

Abstract

Zigbee is an emerging communication technology with low data transmission rate and is capable of short-range wireless communication. It is based on the IEEE 802.15.4 standard, and has the characteristics of large network capacity, low deployment cost, low node power consumption and high communication reliability. Because Zigbee network nodes are small in size, low in power consumption, flexible in networking, and rich in functions, this technology is very suitable for building wireless monitoring/controlling networks. With the development of economy and technology, the number and types of lighting equipment used in industry and everyday life are increasing rapidly. The large number of lighting equipments makes traditional switch installation and controlling into a big challenge, and also increases the waste of energy.

In view of the above, this paper uses Zigbee technology to design and implement a group-based remote controlling methed for lighting devices. By assigning a ZigBee node to every lighting device, and using Zigbee to control the lighting equipment, it can greatly improve the ability and convenience of controlling the lights. The design of this consists of two main parts, the hardware design and the software design. The hardware designing part includes the design, construction and installation of the display module, the button module, the Wi-Fi module, the output driver and other parts. The software coding part includes the transplantation and optimization of Z-Stack, and the application development based on Z-Stack, command processing and distribution, user interface design, etc. The software is designed to drive the hardware to form a ZigBee network, transmit data, switch lights on and off based on group setttings. After completing the design, the whole system is tested, and it is confirmed that the light can be controlled by the host, and the system can complete the expected functions.

KEY WORDS: Zigbee, wireless communication, lighting control, CC2530, Z-Stack, Wi-Fi

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 设计的背景和意义 1

1.2 Zigbee技术简介 1

1.2.1 Zigbee设备类型 1

1.2.2 Zigbee网络通信 2

1.2.3 Zigbee应用开发 2

1.3 设计的内容和目标 2

第二章 系统方案设计 4

2.1 灯光节点的设计 4

2.2 控制节点的设计 5

2.3 Zigbee组网的分析与设计 6

2.4 上位机的设计 7

2.5 本章小结 7

第三章 系统硬件设计 8

3.1 通用部分的硬件设计 8

3.1.1 CC2530微控制器 8

3.1.2 OLED显示模块 8

3.1.3 按键模块 9

3.2 灯光节点的硬件设计 9

3.3 控制节点的硬件设计 10

3.4 本章小结 11

第四章 软件设计前的准备 12

4.1 Z-Stack协议栈分析 12

4.1.1 文件结构 12

4.1.2 执行流程分析 14

4.1.3 开发方式 15

4.2 协议栈移植 15

4.2.1显示驱动HAL_LCD移植 15

4.2.2 按键驱动HAL_KEY移植 18

4.2.3 编译参数的调整 18

4.3 协议栈优化 19

4.3.1 UART缓冲区优化 19

4.3.2 路由表优化 19

4.3.3 堆内存优化 20

4.3.4 XDATA分区优化 20

4.3.5 优化结果 20

4.4 本章小结 21

第五章 应用软件编写 22

5.1 应用设计 22

5.2 控制节点的应用编写 22

5.2.1 设置UART 22

5.2.2 Wi-Fi模块设置 23

5.2.3 通过UART接收上位机指令 23

5.2.4 处理并通过ZigBee网络发送指令 24

5.2.5 用户界面设置 26

5.3 灯光节点的应用编写 26

5.3.1 接收ZigBee指令 26

5.3.2 控制灯光 27

5.4 本章小结 28

第六章 系统测试与结果分析 29

6.1 设置网络参数 29

6.2 ZigBee组网测试 29

6.3 通过灯光节点手动开关 30

6.4 通过控制节点手动开关 30

6.5 通过上位机控制开关 31

6.6 本章小结 33

第七章 设计总结 34

致 谢 35

参考文献 36

第一章 绪论

剩余内容已隐藏,请支付后下载全文,论文总字数:32662字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;