摘 要
随着我国的不断发展,耗费了大量的自然资源,对环境造成了巨大的破坏,例如建立厂区而开山毁林造成了绿色植被被破坏等,这些问题对人们的生活造成了许多麻烦,但是对环境进行实时监测的话就可以分析得到那些地区的超标物质,然后对其进行综合治理,为人民生活提供保障。环境检测是通过对人类和环境有危害的物质进行监测,以此来确定 环境的质量水平,通过环境检测将能够为环境治理提供最基本的保证,环境检测的内容包括背景调查,现场采样,优化布点以及数据采集等,主要是通过计划环境检测方案然后对该区域环境进行采样,然后根据采样得到的数据加以分析,最后得到环境的综合信息。
本课题的主要研究内容是一种以RAM单片机为主控芯片,建立一个环境检测系统。该系统能够将检测的环境参数信号进行处理并显示;该系统主要由硬件和软件两部分组成。设计采用stm32单片机、传感器、Labview、无线传输等设备,建立一个环境数据采集系统,该系统能够采集到数据并且进行处理和显示。对数据进行方差,均值等。通过无线传输技术,实现数据实时传输到移动设备,方便人们能及时做出相应的防护措施。
关键词:stm32;Labview;RAM;温湿度;PM2.0;环境监测
ABSTRACT
With the continuous development of our country,a great deal of natural resources have been consumed and great damage has been caused to the environment,such as the destruction of green vegetation caused by the establishment of factories and the destruction of mountains and forests. These problems have caused a lot of trouble to people's lives. However,real-time monitoring of the environment can be used to analyze the excessive substances in those areas,and then comprehensively control them to provide protection for the people's lives. Environmental detection is to determine the level of environmental quality by monitoring human and environmentally hazardous substances. Environmental testing will provide the most basic guarantee for environmental governance. The content of environmental testing includes background inspection,such as on-the-spot sampling,optimizing layout and data collection,etc.,mainly by planning the environmental detection scheme and then sampling the regional environment,then analyzing the data obtained from the sampling,and finally obtaining the comprehensive information of the environment.
The main research content of this paper is to establish an environment detection system based on RAM single chip. The system can process and display the detected environmental parameters,and the system consists of hardware and software. An environmental data acquisition system based on stm32 single chip microcomputer,sensor,Labview,wireless transmission and other devices is designed. The system can collect data and process and display the data. To carry on the variance,the average value and so on to the data. Through wireless transmission technology,real-time transmission of data to mobile devices is realized,and it is convenient for people to make corresponding protective measures in time.
Key words: stm32;Labview;RAM;temperature and humidity;PM2.0;environmental monitoring
目 录
1 绪论 1
1.1 研究背景和意义 1
1.2 研究现状 2
1.3 研究内容 3
2 系统概述和相关原理 4
2.1 系统的功能分析与设计 4
2.2 LabVIEW介绍 5
2.3 ZigBee技术 5
2.3.1 ZigBee技术概述 5
2.3.2 ZigBee网络协议 6
2.3.3 ZigBee网络拓扑结构 7
2.4 GSM技术 8
2.5 本章小结 8
3 系统硬件设计 9
3.1 系统总体硬件设计 9
3.2 数据采集发送部分硬件设计 9
3.2.1 ZigBee模块选型与设计 9
3.2.2 传感器选型 11
3.3 数据接收控制部分硬件设计 12
3.3.1 嵌入式微处理器选型 12
3.3.2 控制器电源电路设计 13
3.3.3 晶振和复位电路设计 13
3.3.4 下载电路设计 14
3.3.5 串口通讯电路设计 14
3.3.6 SD卡电路设计 15
3.3.7 LCD显示电路设计 16
3.3.8 GSM电路设计 17
3.3.9 本章小结 18
4 系统软件设计 19
4.1 数据采集传输模块软件设计 19
4.1.1 系统通信协议设计 19
4.1.2 ZigBee节点程序设计 20
4.2 数据处理显示模块软件设计 23
4.2.1 总体任务程序设计 24
4.2.2 GSM程序设计 26
4.3 LabVIEW上位机软件设计 27
4.4 本章总结 30
5 系统测试分析 31
5.1 ZigBee数据包抓包实验分析 31
5.2 串口接收数据包实验分析 31
5.3 控制器数据接收实验分析 32
5.4 上位机数据接收实验分析 33
5.5 本章总结 33
总 结 34
参考文献 35
致 谢 38
附 录 39