基于uC/OS的嵌入式环境参数监测系统设计
基于uC/OS的嵌入式环境参数监测系统设计(论文11500字)
摘要:现阶段我国正处在经济的高速发展时期,传统能源的巨大消耗对环境造成了巨大的破坏,人们生活环境的空气质量直接影响到个人的身体健康。为了改善人们的生活质量,需要实时的监测家庭居住环境的有害气体。针对这一目的,本文设计了一种基于单片机的家居环境监测系统,它以STM32单片机为核心,分别用ZE08-CH2O甲醛传感器模组,DHT11数字型温湿度传感器模组,MQ2烟雾传感器模组采集甲醛气体浓度、温度、湿度、烟雾浓度,并用OLED屏实时显示这四个数据,可以设置烟雾浓度报警限值,当烟雾浓度到达报警值时,相应的蜂鸣器会报警,提醒人们解决问题。为了增强系统的可靠性并使程序调试变得简单,加入操作系统就成为必要,本文使用的是便于移植的μC/OS-II实时操作系统。
关键词:家居环境空气质量;STM32单片机;烟雾传感器;实时监测;μC/OS-II
Design of Embedded Environment Parameter Monitoring System Based on uC/OS
Abstract:At this time, China is in a period of rapid economic development. The huge consumption of traditional energy has caused great damage to the environment. The air quality of people's living environment directly affects the health of individuals. In order to improve people's quality of life, it is necessary to monitor the harmful gases in the living environment of the home in real time. Aiming at this purpose, this paper designs a home environment monitoring system based on single-chip microcomputer. It uses STM32 single-chip microcomputer as the core, and uses ZE08-CH2O formaldehyde sensor module, DHT11 digital temperature and humidity sensor module and MQ2 smoke sensor module to collect. Formaldehyde gas concentration, temperature, humidity, smoke concentration, and use the OLED screen to display these four data in real time, you can set the smoke concentration alarm limit. When the smoke concentration reaches the alarm value, the corresponding buzzer will alarm to remind people to solve the problem.In order to enhance the reliability of the system and make the debugging of the program simple, it is necessary to join the operating system. This article uses the μC/OS-II real-time operating system. [资料来源:www.doc163.com]
Key words:home environment air quality; STM32 microcontroller; smoke sensor; real-time monitoring;μC/OS-II
[资料来源:http://Doc163.com]
目录
1 绪论 1
1.1研究的目的和意义 1
1.2国内室内空气监测研究现状 1
1.3国外室内空气监测研究现状 2
1.4本文的主要工作 2
2 系统结构及元件选择 2
2.1监测系统的基本结构 2
2.2主控制元件 4
2.3传感器 4
2.3.1甲醛传感器 5
2.3.2温湿度传感器 6
2.3.3烟雾传感器 8
2.4显示元件 9
2.5报警元件 10
2.6本章小结 10
3 硬件电路设计 10
3.1系统控制电路 10
3.2传感器电路 12
3.2.1甲醛传感器电路 12
3.2.2温湿度传感器电路 13
3.2.3烟雾传感器电路 13
3.3显示电路 13
3.4声音报警电路 14
3.5按键电路 14
3.6系统总电路图 14
3.7本章小结 15
4 软件程序设计 15
4.1软件设计概述 15
4.1.1 Keil μVision5介绍 15
4.1.2 μC/OS-II系统介绍 15
4.1.3使用μC/OS-II的意义 16
4.2总统设计方案 16
4.3外设初始化 17
4.4各个任务程序设计 17 [版权所有:http://DOC163.com]
4.4.1传感器采集任务 17
4.4.2显示屏显示任务 18
4.4.3按键任务 19
4.4.4报警任务 20
4.5本章小结 21
5 系统的调试与实现 21
5.1软件程序的调试 21
5.2硬件电路的搭建 21
5.3系统的运行调试 22
5.4 系统的测试 23
5.5本章小结 25
6 总结与展望 25
参考文献 26
致谢 27 [资料来源:www.doc163.com]