本科毕业论文(设计) 题 目 学 生 指导教师年 级 专 业 二级学院
基于zigbee无线光照传感器的设计
电子信息工程 信息工程学院
信息工程学院 2015年5月
郑重声明
本人的毕业论文(设计)是在指导教师的指导下独立撰写完成的。如有剽窃、抄袭、造假等违反学术道德、学术规范和侵权的行为,本人愿意承担由此产生的各种后果,直至法律责任,并愿意通过网络接受公众的监督。特此郑重声明。
毕业论文(设计)作者(签名):
年 月 日
基于zigbee无线光照传感器的设计
摘 要
传感器是一种检测装置,它能感受到被测量的信息,同时将感受到的信息,按一定的规律转变成为电信号或者是其他所需要形式的信息输出,以达到信息的传输、处理、存储、显示、记录和控制等要求。其中光照传感器是通过硅光电池在不同光照度下产生的不同电流来实现监测光照度的作用。光照传感器能够测定一的地方的光照度,将其用具体的数值直观的表现出来以方便测定和记录该地的光照度。
本设计需要通过对普通光照传感器的驱动程序进行移植,通过CC2530模拟IIC驱动GY-30,实现CC2530驱动光照传感器,完成对光照度的测量。同时利用Zigbee通讯协议,通过CC2530构建Zigbee网组,做到发送模块发送数据,接收模块接收数据的无线传输,使接收模块通过串口通讯将数据传送到上位机上,并在界面上显示测量值。最终实现光照传感器数据的无线传输和数据显示。
关键词:zigbee 无线 光照度 光照传感器 CC2530
I
The Design of Wireless Illuminative Sensor Based
on Zigbee
Huang Chongzhi Directed by Jiang Shaojun Lecturer
ABSTRACT
The sensor is a detection device, it can feel the measured information, and it will feel the information at the same time, according to certain rules into electrical signals or other required information in the form of output, in order to achieve the information transmission, processing, storage, display, record and control requirements. The light sensor is different current through the silicon photocell in different light intensity produced under illumination to achieve monitoring. The illumination light sensor can determine a place, the specific value demonstrated to facilitate the determination and illumination of the land records.
This design needs to be transplanted by the driver of ordinary light sensors, light sensors to achieve CC2530 driver, complete measurement of illumination. At the same time, the use of Zigbee communication protocol, through the construction of CC2530 Zigbee network, wireless transmission of data to each node, and can display the measured value at the interface. The final realization of light wireless transmission of sensor data and display.
KEY WORDS:zigbee wireless lux The light sensor CC2530
II
目 录
前言 ........................................................................ 1 1 背景介绍 .................................................................. 2
1.1 选题背景 ............................................................ 2 1.2 研究目的和意义 ...................................................... 2 2 设计要求 .................................................................. 3
2.1 系统功能 ............................................................ 3 2.2 系统基本参数 ........................................................ 3 3 方案验证 .................................................................. 3
3.1 光照传感器数据采集方案 .............................................. 3 3.2 模块间数据传输方案 .................................................. 4 3.3 模块选择方案 ........................................................ 4
3.3.1 核心模块的选择 ................................................ 4 3.3.2 光照传感器的选择 .............................................. 5
4 硬件设计 .................................................................. 5
4.1 整体框架 ............................................................ 5 4.2 CC2530片上系统设计 ................................................. 6 4.3 GY-30光照传感器电路设计 ............................................ 7 5 软件设计 .................................................................. 8
5.1 编写环境搭建 ........................................................ 8
5.1.1 环境搭建 ...................................................... 8 5.2 GY-30光照传感器驱动设计 ............................................ 8 5.3 数据传输 ............................................................ 9
5.3.1 Zigbee传输 .................................................. 10 5.3.2 串口传输 ..................................................... 11 5.4 系统界面和Qt编写 .................................................. 11
5.4.1 编写环境搭建 ................................................. 11 5.4.2 界面结构 ..................................................... 12 5.4.3 Qt Creator简介 .............................................. 12 5.4.4 界面概述 ..................................................... 12 5.4.5 实时显示界面 ................................................. 13
1