基于单片机的智能温室系统的设计(附原理图,程序代码)(论文15000字,原理图,程序代码)
摘要:温度、湿度是重要的描述环境状况的物理量。它从各个方面影响着我们的生活质量。例如,生活上:冬季空气湿度过小,容易造成手足等部位干裂出血;夏季气温高,病菌滋长快,易产生疾病。生产中,温、湿度不适宜容易引起元器件失效,影响系统的运行。农业上,温湿度的测量对于温室大棚的养殖也很关键。但测量温、湿度时,人们通常用温度计、湿度测量仪等工具,但这种方式满足不了人们高精度,易操作,实时性高的需求。本设计利用STC89C52单片机进行控制,以NTC热敏电阻和AD7799模数转换电路以及DHT11数字传感器分别对温度和湿度进行实时测量,并将结果显示在LCD1602液晶显示器上。利用电磁阀控制喷水从而调节温湿度环境来设计的一个简易智能温室系统。通过该系统实时测量当前室内的温、湿度;当温度过高或者湿度过低时,通过电磁阀控制喷水,达到自动调节室内温度湿度的目标。
关键词:STC89C52单片机;NTC热敏电阻;AD7799模数转换;LCD1602液晶显示;温湿度测量;DHT11数字传感器
Intelligent Greenhouse System Based on Single Chip Microcomputer
Abstract:Temperature, humidity is important to describe the physical condition of the environment. It affects our quality of life in every way. For example, life: winter air humidity is too small, easily lead to hand and foot and other parts of dry bleeding; summer temperatures are high, bacteria grow faster, easy to produce disease. Production, temperature and humidity is not suitable for easily lead to component failure, affecting the operation of the system. Agriculture, temperature and humidity measurements for greenhouse farming is also critical. But when measuring temperature and humidity, people usually use thermometers, humidity gauges and other tools, but this way can not meet people's high precision, easy operation, real-time high demand. The design of the use of STC89C52 single-chip control to NTC thermistor and AD7799 analog-to-digital conversion circuit and DHT11 digital sensors were real-time measurement of temperature and humidity, and the results shown in the LCD1602 liquid crystal display. The use of solenoid valve to control the water and humidity to adjust the environment to design a simple intelligent greenhouse system. Through the system real-time measurement of the current room temperature and humidity; when the temperature is too high or too low humidity, through the solenoid valve to control the water, to automatically adjust the indoor temperature and humidity objectives.
Key words:STC89C52 microcontroller; NTC thermistor; AD7799analog-to-digital conversion; LCD1602; temperature and humidity measurement;DHT11 digital sensor
目录
摘要 0
Abstract 0
1、绪论 1
1.1 本课题研究背景 1
1.2 国内外发展现状 1
1.3 本课题研究目的及意义 1
2、系统方案设计 1
2.1 系统总体设计思路 2
2.2 微控制芯片的选择 2
2.3 温度及湿度测量元件的选择 3
2.4 A/D芯片的选择 3
2.5 显示模块的选择 3
2.6 电磁阀的选择及其驱动 4
3、系统硬件设计 4
3.1 STC89C52单片机概述 4
3.2 最小系统电路 5
3.3 DHT11传感器接口电路 7
3.3.1 DHT11传感器简介 7
3.3.2 DHT11传感模块与单片机的连接 8
3.4 温度测量及A/D转换电路 8
3.4.1 NTC热敏电阻简介 8
3.4.2 A/D芯片简介 8
3.4.3 测温部分电路连接图 10
3.5 按键电路 11
3.6 液晶显示接口电路 11
3.6.1 LCD1602液晶显示器简介 11
3.6.2 LCD1602液晶显示器与单片机的连接 12
3.7 电磁阀驱动电路 13
4、系统的软件设计 15
4.1 开发环境及编程语言介绍 15
4.2 主程序设计 16
4.3 温度采样程序 16
4.4 湿度读取子程序 17
4.4 1602液晶显示子程序设计 19
4.5 按键抗干扰程序 19
4.6 中值滤波 20
5、调试及检测 21
5.1 硬件的焊接 21
5.2 实物调试 21
5.2.1 液晶电路的调试 22
5.2.2 湿度采集部分电路的调试 22
5.2.3 温度采集部分电路的调试 23
6、实验结果与分析 23
6.1 误差分析 23
6.2 实验数据及分析 23
7、总结与展望 26
参考文献 27
致谢 28
|