没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
摘 要
环境和每个人的生活息息相关,环境温湿度是影响人们生活的两个重要因素。目前环
境监控系统大多用于大型生产行业及环境保护方面,对中小型生产及普通生活环境温湿度
的监测重视度相对不足。随着近几年科技产品的爆发,单片机(Microcontrollers)以其低
成本、高性能、小而集成度高的特点得到了快速发展,基于单片机的低成本的环境温湿度
监控系统得到了广泛关注。
本次毕业设计的系统注重性能好、成本低、系统操作简单、适用性广等特点,设计了
基于 51 单片机的环境监控系统。该系统采用 AT89S52 单片机(C51 内核)做为系统的微
控制器,借助温湿度传感器、液晶显示器、蜂鸣器及独立按键等几个外围模块,实现对环
境温湿度的实时监控。其中,温湿度传感器的精度为±2℃/±5%RH,液晶显示器能够同
时显示环境的温度和湿度,独立键盘用来自定义限值,蜂鸣器用来超限报警,最终使系统
系统拥有对环境温湿度的实时监测、智能报警的功能。
AT89S52 单片机是一种 8 位 CPU 和寄存器的微控制器,8K 的 Flash 存储器,使用方
便,编程简单;DHT11 温湿度传感器能够同时采集环境的温度和湿度,并自动进行模数转
换及数据传输,具有精度高、实时性好的特点;LCD1602 是一种 16*2 的液晶显示器,即
共 2 行,每行可以显示 16 个字符,因此能够同时显示温度和湿度,是一种价格便宜、使
用方便的显示设备;通过四个独立按键,能够自定义温湿度的报警上下限值;蜂鸣器作为
系统的发声报警装置;单片机通过对各个模块的程序调用,实现对环境温湿度的监控。本
文主要介绍了所设计系统的电路原理、软件编写方法和系统仿真,对各个器件做了详细的
原理分析和规格说明,对各个模块的程序编写方法做了详细的流程图,最终,设计出了一
套功能完善环境的系统。由于本系统应用于小型生产活动与日常生活中,因此本系统在设
计时以可靠性高、实时性好、价格便宜、操作简单为原则设计。
本设计根据单片机系统的设计方法和编程原理,编写了完整的系统程序。该系统运行
过程如下:单片机上电后首先执行各模块初始化程序,之后由用户通过四个独立按键对温
度、湿度上下限值设定,单片机判断限值合法后将限值存入自身内部 Flash 存储器,随后
执行温度采集程序、液晶显示程序、比较限值程序、是否报警程序。通过使用 Proteus 仿
真工具仿真完成,确定程序完整,可以良好的运行,具有操作方便、成本低廉、线路简单、
可靠性高、实时性好的优点,有良好的应用价值。
关键词:AT89S52 单片机;温湿度传感器;LCD1602 显示器;蜂鸣器
ABSTRACT
Environmental factors are closely related to our life, among which ambient temperature and
humidity are two vital factors. Recent years, with the explosion of technological products,
Microcontrollers is developed rapidly for its characteristics of low costs, high-performance, small
but high integration; ambient temperature and humidity monitoring alarm system that based on
Microcontrollers is one of the hot research areas. Using Temperature and humidity sensor, LCD
monitor, buzzer and independent keyboard and some other modules this paper designed
environmental monitoring system that based on Microcontrollers.
When it is necessary to monitor ambient temperature and humidity in some small and medium
industry or our normal life, it is often being ignored, because so far, environmental monitoring
system is mostly used by large industry or in environmental protection. The system designed here
can be widely used because of its high-performance, low-cost, simple operation, wide applicability.
The system using AT89S52 Microcontrollers with C51 kernel, the collection of ambient
temperature and humidity date is sensor DHT11 with an accuracy of ±2℃/±5%RH, the date is
showed on a 16*2 LCD monitor. Furthermore, the date can be limited through independent
keyboard, thus realizing auto-alarm when over-limit. It makes real-time monitoring of ambient
temperature and humidity and smart alarm function come true.
It uses AT89S52 that with 8-bit CPU and registers, flash Member with 8k which makes it
easy to use and easy to program and good enough to meet the need of high-performance, low-cost,
simple operation, wide applicability. Temperature and humidity sensor DHT11 can collect
ambient temperature and humidity at the same time and can realize analog-digital conversion and
data transmission by itself. it has the characteristics of high precision and real-time monitoring, it
has 2 lines, 16 characters on each line so it can show the data of both temperature and humidity on
one screen. It is an inexpensive and easy to use display device. Four independent keyboard can set
temperature and humidity alarm to the limits. The buzzer can alarm by itself when the data is over-
limited. By controlling different modules, Microcontrollers realized monitoring ambient
temperature and humidity. The design process is firstly to define Microcontroller’s foot, then
define function keyboard respectively. And software programing the module of the drive. This
system is designed for small industry and for daily use, so it is reliable, good real-time performance,
inexpensive and easy to operation.
This paper based on the design method of Microcontrollers, control theory of Microcon-
trollers and usage of peripheral module besides Microcontrollers writing driver of each component,
this system is simulated by Proteus. Eventually, download the system process to Microcontrollers.
It is proved that this system has well-functioned and has application value of simple operation,
low cost, simple circuit, reliable and perfect real-time monitor.
Keywords:AT89S52 Microcontroller; DHT11 sensor; LCD1602; buzzer
目 录
摘 要.......................................................................................................................................III
ABSTRACT .............................................................................................................................IV
目 录........................................................................................................................................V
第 1 章 绪论...............................................................................................................................1
1.1 本课题的研究内容和意义............................................................................................1
1.1.1 内容简介...............................................................................................................1
1.1.2 研究意义...............................................................................................................1
1.2 国内外的发展概况........................................................................................................2
1.2.1 国内发展状况.......................................................................................................2
1.2.2 国外发展状况.......................................................................................................2
1.3 本课题应达到的要求....................................................................................................2
第 2 章 系统总体方案设计.......................................................................................................5
2.1 系统功能设计和技术指标............................................................................................5
2.1.1 功能设计...............................................................................................................5
2.1.2 技术指标...............................................................................................................5
2.2 系统设计思路与设计原则............................................................................................5
2.2.1 设计思路...............................................................................................................5
2.2.2 设计原则...............................................................................................................5
2.3 系统整体设计................................................................................................................6
2.3.1 系统整体设计框图...............................................................................................6
2.3.2 系统硬件选择.......................................................................................................6
2.3.3 系统工作过程.......................................................................................................7
2.4 本章小结........................................................................................................................7
第 3 章 硬件系统设计...............................................................................................................9
3.1 概述................................................................................................................................9
3.2 单片机主控模块概述....................................................................................................9
3.2.1 AT89S52 单片机简介...........................................................................................9
3.2.2 单片机主控系统.................................................................................................10
3.3 DHT11 温湿度采集模块设计 .....................................................................................11
3.3.1 DHT11 温湿度传感器简介 ................................................................................11
3.3.2 DHT11 温湿度传感器的使用 ............................................................................12
3.4 LCD1602 液晶显示模块设计......................................................................................13
3.4.1 LCD1602 液晶器显示模块简介.........................................................................13
3.4.2 .LCD1602 液晶显示模块的使用........................................................................14
3.5 报警模块设计..............................................................................................................17
3.5.1 蜂鸣器简介.........................................................................................................17
3.5.2 蜂鸣器的使用.....................................................................................................17
3.6 按键系统设计..............................................................................................................18
3.6.1 按键开关简介.....................................................................................................18
3.6.2 按键的设计.........................................................................................................18
3.7 硬件系统整体电路原理图..........................................................................................19
3.8 本章小结......................................................................................................................20
第 4 章 软件系统设计.............................................................................................................21
4.1 软件系统概述及流程图..............................................................................................21
4.1.1 软件系统概述.....................................................................................................21
4.1.2 软件整体流程图.................................................................................................21
4.2 模块化程序设计..........................................................................................................22
4.2.1 DHT11 温湿度采集模块程序设计 ....................................................................22
4.2.2 LCD1602 液晶显示模块程序设计.....................................................................22
4.2.3 按键及报警模块程序设计.................................................................................23
4.3 程序编写与仿真调试..................................................................................................24
4.3.1 程序编写.............................................................................................................24
4.3.2 仿真与调试.........................................................................................................27
4.4 本章小结......................................................................................................................28
总结与展望...............................................................................................................................29
致 谢.......................................................................................................................................31
参考文献...................................................................................................................................33
剩余46页未读,继续阅读
资源评论
omyligaga
- 粉丝: 87
- 资源: 2万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功