网学网为需要自动化专业的朋友们搜集整理了基于单片机的温度测控系统设计相关资料,希望对各位网友有所帮助!
论文编号:CK133 论文字数:25122,页数:71
摘 要
随着大棚技术的普及,温室大棚数量不断增多,温室大棚的温度控制成为一个难题。目前应用于温室大棚的温度检测系统大多采用由模拟温度传感器、多路模拟开关、A/D转换器及单片机等组成的传输系统。这种温度采集系统需要在温室大棚内布置大量的测温电缆,才能把现场传感器的信号送到采集卡上,安装和拆卸繁杂,成本也高。同时线路上传送的是模拟信号,易受干扰和损耗,测量误差也比较大,不利于控制者根据温度变化及时做出决定。在这样的形式下,开发一种实时性高、精度高,能够综合处理多点温度信息的测控系统就很有必要。
本课题提出一种基于单片机的温度测控系统应用于温室大棚的设计方案,该方案是利用温度传感器将温室大棚内温度的变化,变换成电流的变化,再转换为电压变化输入模数转换器,其值由单片机处理,最后由单片机去控制数字显示器,显示温室大棚内的实际温度。一旦该温度值超过我们预先设定的上、下限,单片机便启动报警系统进行报警,进而对大棚内温度进行控制。而且这种设计方案能对多点的温度进行实时巡检,各检测单元能独立完成各自功能,同时能够根据主控机的指令对温度进行定时采集。该测控系统不需要任何固定网络的支持,安装简单方便,系统稳定可靠、可维护性好。
关键词 单片机;温度传感器;温室大棚;测控系统
Abstract
With the popularization of greenhouse technology,the amount of the greenhouse is larger and larger. However, the temperature control of the greenhouse is becoming a difficult problem. Currently, the temperature control system of greenhouse is mostly using a transfers system which consists of analog temperature sensors,multiplexing analog switches, A/D conversion units and SCM. This kind of temperature collection system needs a lot of cables which is laid to make the signal of the sensor be sent to the collection card in the greenhouse. Thus the work of fixing and take-down is miscellaneous,and the cost is high. What’s more, what is transferred in the system is analog signals which are easily interfered and have more wastage. It is hard for the controller to make a decision in time according to the change of temperature because the measure error is bigger. So under this circumstance,it is necessary to develop a real time and precise temperature control system which is in a position to deal with temperature information of many nods.
This paper gives a greenhouse temperature control project which is based upon the SCM technology. In this project, the change of temperature in the greenhouse is transformed into the change of electric current and then into the change of voltage by using the temperature sensors. The change of voltage is input into the A/D conversion units .At last the real time temperature in the greenhouse is displayed on the monitor under the control of SCM. Once the value of the temperature in the greenhouse exceeds the minimum and maximum which is preestablished, the SCM will give an alarm and autocontrol the temperature in the greenhouse. This project can make real time patrol checking to the different nod’s temperature in the greenhouse, and every separate checking unit can finish its task independently. This temperature control system whose stabilization and maintainability is good doesn’t need any fixed network to support and is easily fixed.
Keywords SCM;temperature sensor;greenhouse;measuring &controlling system
目 录
摘 要 i
Abstract ii
第一章 绪论 1
1.1选题的背景 1
1.2选题的现实意义 2
第二章 设计任务 3
2.1设计题目 3
2.2设计目标与要求 3
2.3设计方案 3
2.3.1方案一 3
2.3.2方案二 4
2.3.3方案比较 4
第三章 系统硬件电路的设计 5
3.1系统硬件电路构成 5
3.2温度传感器 6
3.2.1 DS18B20简介 7
3.2.2 DS18B20的性能特点 8
3.2.3 DS18B20的管脚排列 9
3.2.4 DS18B20的内部结构 9
3.2.5 DS18B20的控制方法 13
3.2.6 DS18B20的测温原理 14
3.2.7 DS18B20的时序 14
3.2.8 DS18B20的注意事项 16
3.3 单片机的选择 17
3.3.1 单片机的概述 17
3.3.2 单片机的历史与发展 17
3.3.3 单片机的组成 19
3.3.4 单片机的特点 21
3.3.5 单片机的应用领域 22
3.3.6 AT89C2051芯片的主要性能 23
3.3.7 AT89C2051芯片的内部结构框图 23
3.3.8 AT89C2051芯片的引脚说明 25
3.3.9 使用AT89C2051芯片编程时的注意事项 27
3.4 74LS164简介 28
3.4.1 74LS164的概述 28
3.4.2 74LS164的特性 28
3.4.3 74LS164的功能图 29
3.5 显示电路的设计 32
3.5.1 LED数码管简介 32
3.5.2 LED数码管的分类 33
3.5.3 LED数码管的驱动方式 33
3.5.4 LED数码管的显示电路 34
3.6本章小结 35
第四章 系统软件的设计 37
4.1 系统软件总述 37
4.2 系统部分子程序 39
4.2.1 DS18B20的初始化 39
4.2.2 DS18B20的读子程序 41
4.2.3 DS18B20的写子程序 44
第五章 总结 46
参考文献 47
致谢 49
附录一 电路原理图 50
附录二 电路仿真图 51
附录三 硬件电路实物图 54
附录四 系统总程序 57