单片机温湿度控制系统.doc

约46页DOC格式手机打开展开

单片机温湿度控制系统,1.4万字46页包括总体电路图,流程图,程序清单摘 要本文设计基于,完成对系统的温度、湿度的检测、控制和显示。控制芯片选用at89c2051单片机,主要用温度传感器ad590来检测温度,用湿度传感器hs1101来检测湿度,用三个控制按键来实现按键控制,用8位led控制驱动器max...
编号:45-34137大小:677.00K
分类: 论文>通信/电子论文

内容介绍

此文档由会员 小甜甜 发布

单片机温湿度控制系统
1.4万字 46页
包括总体电路图,流程图,程序清单



摘 要
本文设计基于单片机温湿度控制系统,完成对系统的温度、湿度的检测、控制和显示。
控制芯片选用AT89C2051单片机,主要用温度传感器AD590来检测温度,用湿度传感器HS1101来检测湿度,用三个控制按键来实现按键控制,用8位LED控制驱动器MAX7219芯片来完成显示部分,用8位串行控制的模数转换器TLC0834芯片来完成转换部分。数据采集部分是将温湿度传感器置于烤烟房内部,测出烤烟房内的温湿度值,经过数据的调理转换为数字信号之后送入AT89C2051单片机中,然后LED显示出温湿度测量值。单片机将预设值与测量值进行比较,根据比较结果作出判断,经过程序分析处理发送相应指令控制执行机构动作,接通或关闭各种执行机构的继电器,近而控制炉灶风门及进风洞机械门开启的大小,以次来调节烤烟房内温湿度。如此循环不断,使温湿度值与设定值保持一致。当温湿度值超过允许的误差范围,系统将发出报警,如果有必要,烟农可以根据烟叶烘烤的程度通过按纽来人工修改片内存储的烘烤温湿度预设值。通过对整个系统的核心单片机部分的设计,达到优化控制温湿度的目标。这些硬件电路在设计中都有详细的介绍。控制算法采用PID控制。
本设计用单片机控制易于实现温湿度的检测,。


关键词:AT89C2051;PID算法;温度;湿度


Abstract
This paper-based microcontroller design temperature and humidity control system, the completion of the system of temperature, humidity detection, control and display.
Selection AT89C2051 control chip microcontroller, the main AD590 temperature sensor to detect temperature and humidity sensors used to detect HS1101 humidity, with the three control buttons to achieve key control, with eight LED control drive MAX7219 chip to complete the display part, with 8 Serial control of the ADC TLC0834 to complete the conversion of the chip. Data acquisition is part of temperature and humidity sensors will be placed in the internal flue-cured tobacco, measured temperature and humidity inside the flue-cured tobacco value, after the data into a digital signal conditioning into the AT89C2051 after the SCM, and then LED display to temperature and humidity measurements. SCM will default and to compare measurements, to make judgments based on the results, after analysis of treatment procedures accordingly sent instructions control executive body movements, or connected to the closure of various implementing agencies of the relay, which control nearly stove and into the throttle Mechanical wind tunnel opened the door to the size, Yici to regulate tobacco room temperature and humidity. This cycle so that the temperature and humidity values consistent with the settings. When the temperature and humidity of over allowed range of error, the system will issue a warning, if necessary, according to tobacco growers can be baked through the button to the extent of on-chip memory to amend the baking temperature and humidity default. Through the system as a whole the core part of the microcontroller design, to achieve optimal
of all details. Control algorithms using PID control.
This design is easy to realize with MCU control temperature and humidity testing。


Key words: AT89C2051; PID algorithm; temperature and humidity


目 录
第1章 绪 论 1
1.1 本文的主要工作 1
1.2 系统的设计意义 1
第2章 方案论证 2
2.1 系统的总体方案及技术指标 2
2.2 系统的方案论证 3
第3章 硬件设计 5
3.1 温度检测电路的设计 5
3.1.1 温度传感器 5
3.1.2 温度检测电路 5
图3.2 AD590基本图 6
3.2 湿度检测电路的设计 7
3.2.1 湿度传感器 7
3.2.2 湿度检测电路 9
3.3 主芯片的选择 10
3.4 单片机最小系统的设计 12
3.4.1 MAX813L芯片简述 12
3.4.2最小系统 13
3.5 键盘和显示电路 14
3.5.1 显示电路 14
3.5.2 键盘电路 17
3.6 转换电路的设计 18
3.6.1 TLC0834芯片介绍 18
3.7 控制电路的设计 20
3.8 电源电路的设计 21
3.9 扩展电路的设计 22
3.9.1 I/O口的扩展 22
3.9.2 数据、程序存储器的扩展 22
3.10 报警电路的设计 24
第4章 软件设计 25
4.1 控制算法的选择 25
4.2 主程序 27
4.3 中断程序 28
4.4 A/D转换程序 28
4.5 温度控制程序 28
4.6 湿度控制程序 28
4.7 控制算法程序 33
第5章 结论 34
参考文献 35
致 谢 37
附 录Ⅰ 38
附录Ⅱ 43


参考文献
[9] 潘其光.常用测温仪表技术问答.国防工业出版社
[10] 杨世成.信号放大电路.电子工业出版社
[11] 高光天.仪表放大器应用.科学出版社
[12] 潘立民,王燕芳.微型计算机控制技术.人民邮电出版社
[13] 邵敏权,刘刚.单片机原理实验及应用.吉林科学技术出版社
[14] 陈汝全.实用微机与单片机控制技术.电子科技大学出版社
[15] 王森.仪表使用数据手册.化学工业出版社


附 录Ⅰ
程序清单
⑴主程序
MAIN:
MOV SP , #60H
MOV P2 , #0FFH
MOV R2, #8
MOV R0, #40H
OVER
......


附 录II 总体电路图