基于ZigBee的多点温度采集系统设计与实现(论文) - 图文 下载本文

内容发布更新时间 : 2024/11/15 5:42:40星期一 下面是文章的全部内容请认真阅读。

HUNAN UNIVERSITY

毕业设计(论文)

设计论文题目: 基于ZigBee的多点温度

采集系统设计与实现

宋强军 20070820317 通信工程三班 信息科学与工程学院

肖玲 章兢

学生姓名:

学生学号: 专业班级: 学院名称: 指导老师: 学院院长:

2011 年6 月 1 日

湖南大学毕业设计(论文) 第 I 页

基于ZigBee的多点温度采集系统设计与实现

摘要

随着生产技术的发展,温度数据检测技术广泛应用于工业远程控制系统,并逐步显示出远程和网络的特性。传统的温度采集系统,主要方式是有线连接节点,此方法的特点是布局复杂和可扩展性差。事实上,在某些领域有线连接方式甚至不能应用。因此,最理想的方法是采用无线连接收集和传送数据。作为新兴的短距离,低功耗低成本的无线通信技术,zigbee已广泛应用于工业控制,消费性电子,家电自动化,医疗监控等领域。

本文在对无线传感器及其网络协议技术分析的基础上,设计出一种基于zigbee为基础的无线温度采集系统。用基于zigbee网络的无线方式通过温度测量节点收集温度数据。通过串口通信线路连接主要节点和前端电脑。然后,电脑存储温度数据至数据库,以便实现数据的统一管理。论文首先介绍了Zigbee技术研究内容以及无线传感器网络的研究现状。随后总结了Zigbee技术的优点,接下来对Z-Stack协议栈结构进行了分析。接着介绍了系统的硬件和软件设计。首先从硬件方面论述了温度传感器模块、数据汇聚模块的系统构成。接着论述了系统的软件设计,主要对上位机用户监控界面的设计和温度传感器模块、数据汇聚模块的设计这三部分进行了介绍。数据汇聚模块实现组建网络、分配网络地址的功能,温度传感器模块实现加入网络、数据采集、数据存储、数据上传、通信、等功能。

关键词:Zigbee,无线传感器网络,多点温度采集,Z-Stack

湖南大学毕业设计(论文) 第 II 页

Design and Realization of Multi-Node Temperature

Acquisition System Based on ZigBee

Abstract

With the development of producing technology, monitoring techniques of temperature data are being applied to all kinds of industrial process control systems and gradually showing the feature of far-distant and networking. In the traditional temperature acquisition system, the method to connect nodes is wired, this way possesses the characteristic of complex layout and poor extensibility. In fact, the wired way even cannot be utilized in some application. Therefore, the ideal way to collect and transmit data is employing wireless connection. As a kind of emerging short-distant, low-power consumption and low-cost wireless communication technology, ZigBee has be widely introduced to industry controlling, consumer electronics, appliance automation, medical monitoring and so on.

In this Paper,on the basis of the wireless sensor network Protocol analysis technology,, a kind of temperature acquisition system which based on ZigBee wireless transmission technology is designed in this article, the temperature data collected through the temperature measuring nodes is transmitted to the major-node by ZigBee network in a wireless method, the major-node communicates with the upper computer through the serial port line, thereafter, the PC stores the temperature data into the database in order to realizing the uniformly control of the data. Firstly, the general research situation in the field of Zigbee and the development trend are reviewed. It also reviews the research content of the WSN. Then the paper discusses the network Structure .Following the paper takes an in-depth study of the Z-Stack designed by TI. In the field of hardware design ,the structure of modules is described in details including the temperature sensor module and the data acquisition module .In the software design ,GUI and module’s software are discussed, which includes the formation of networks ,address assignment ,join the network ,data acquisition, data storage ,data upload, communication.

Key words: Zigbee, wireless sensor network, Multi-Node Temperature Acquisition ,Z-Stack

湖南大学毕业设计(论文) 第 III 页

目录

1 绪论 ...................................................................................................................................... 1

1.1无线传感器网络 ........................................................................................................... 1

1.1.1无线传感器网络概况 ......................................................................................... 1 1.1.2无线传感器网络应用现状 ................................................................................. 2 1.1.3无线传感器网络未来展望 ................................................................................. 2 1.2基于Zigbee技术的无线传感器网络 .......................................................................... 2 1.3本文主要结构 ............................................................................................................... 3 2 TI Z-Stack协议栈 ................................................................................................................ 4

2.1 Zigbee协议介绍 ........................................................................................................... 4

2.1.1 Zigbee协议栈结构 ............................................................................................. 4 2.2 Zigbee网络拓扑结构 ................................................................................................... 6 2.3 Z-Stack协议栈介绍 ...................................................................................................... 7

2.3.1网络寻址 ............................................................................................................. 7 2.3.2绑定 ..................................................................................................................... 9 2.3.3路由协议 ............................................................................................................. 9 2.3.4消息发送函数 ..................................................................................................... 9 2.3.5网络的组建过程 ............................................................................................... 10 2.3.6消息接收函数 ................................................................................................... 10 2.4本章小结 ..................................................................................................................... 11 3 系统介绍 ............................................................................................................................ 13

3.1系统的整体介绍 ......................................................................................................... 13 3.2系统硬件介绍 ............................................................................................................. 13

3.2.1主要硬件简介 ................................................................................................... 13 3.2.2温度传感器模块电路原理图 ........................................................................... 15 3.2.3数据汇聚模块(协调器) ............................................................................... 18

4 软件设计实现 ...................................................................................................................... 19

4.1上位机(PC机)监控界面 ....................................................................................... 19 4.2模块的软件设计 ......................................................................................................... 20

湖南大学毕业设计(论文) 第 IV 页

4.2.1数据汇聚模块(协调器)的软件设计 ........................................................... 22 4.2.2温度传感器模块(终端节点)的软件设计 ................................................... 26 4.3 本章小结 .................................................................................................................... 29 5 总结与展望 ........................................................................................................................ 30

5.1总结 ............................................................................................................................. 30 5.2展望 ............................................................................................................................. 30 致谢 .......................................................................................................................................... 32 参考文献 .................................................................................................................................. 33