基于STC单片机的农业大棚温湿度自动控制系统设计毕业论文

 2021-04-15 10:04

摘 要

随着工业自动化水平的不断提高,农业自动化的发展也备受关注。许多国外专家早就着手研究温室系统的控制问题,该研究课题也成为国内研究和学习的热点。本课题设计就是对大棚内温度和湿度这两个量实施控制,所用的控制器是STC公司的51单片机。为了获得大棚里的温度和湿度,采用SHT11温湿度传感器来测量这两个量,用液晶屏LCD1602显示测量的值。设有四个独立按键可调出温湿度设定界面设定温湿度的值,另外,本系统外接了蓝牙模块,用户可通过手机来设定目标值,提高了本设计的实用性。当检测所得环境温湿度值与设定值存在偏差时,系统会报警,同时,单片机经过运算处理控制相应设备及时启动调整直至达到理想值。文中提出了具体的设计方案及其原理,利用仿真软件进行了可行性论证。

关键词:STC89C52单片机;温湿度传感器SHT11;蓝牙;液晶显示屏LCD1602

Design of Automatic Control System for Temperature and Humidity in Agricultural Greenhouse Based on MCU

ABSTRACT

With the continuous improvement of industrial automation level, the development of agricultural automation has also attracted much attention. Many years ago , lots of foreign export had studied on the control of greenhouse system. This research topic has become a hot spot of domestic study and research. This design is aimed to control temperature and humidity. The controller is 51 MCU produced by STC company. It uses temperature and humidity sensor SHT11 to measure the real-time value of temperature and humidity in the greenhouse, at the same time the value will be showed on LCD1602. The first line shows the temperature, the second line shows the humidity. It has four independent keys. You can use the key call out the interface for setting the value of temperature and humidity. Moreover, a blue-tooth module is connected to MCU so that the user could set the value of temperature and humidity by his or her smart-phone. It improve the practicability of this design. If there is deviation between measurements and settings, the system will give an alarm. At the same time, after operational processing of the MCU, it will make corresponding equipment start work in time until it achieve the ideal value. The thesis put forward a specific design scheme and principle. At last, by using the simulation software make a feasibility study to test the scheme.

Key words:MCU;sensor SHT11;blue-tooth;LCD1602

目 录

1 绪论 - 1 -

1.1 课题研究的背景及意义 - 1 -

1.2 研究现状 - 1 -

1.3 本文研究的主要内容 - 2 -

2 控制系统方案设计 - 3 -

2.1 设计方案及其框图表示 - 3 -

2.2 主要器件选定 - 3 -

2.2.1 温湿度传感器SHT11 - 4 -

2.2.2 液晶显示屏LCD1602 - 8 -

2.2.3 蓝牙通信模块HC05 - 11 -

2.3 控制器STC89C52单片机简介 - 11 -

3 硬件设计 - 13 -

3.1 单片机最小系统电路设计 - 13 -

3.1.1 复位电路 - 13 -

3.1.2 晶振电路 - 14 -

3.2 各主要模块电路设计 - 14 -

3.2.1 温湿度测量电路设计 - 15 -

3.2.2 液晶显示电路设计 - 15 -

3.2.3 蓝牙及按键系统电路设计 - 16 -

3.2.4 声光报警电路设计 - 18 -

3.2.5 执行设备电路设计 - 19 -

3.3 220V电源供电电路设计 - 19 -

4 软件设计 - 21 -

4.1 系统总体执行流程图 - 21 -

4.2 系统部分模块软件流程图 - 22 -

4.2.1 温湿度测量模块软件流程图 - 23 -

4.2.2 显示模块软件设计 - 23 -

4.2.3 声光报警软件设计 - 25 -

4.2.4 按键输入软件设计 - 26 -

4.2.5 蓝牙串行通信设计 - 28 -

5 系统调试 - 30 -

5.1 硬件调试 - 30 -

5.2 软件调试 - 31 -

结 论 - 33 -

致 谢 - 34 -

参考文献 - 35 -

1 绪论

1.1 课题研究的背景及意义

工业发展史上的三次大革命大大推动了工业现代化和自动化进程。工业生产的自动化提高了生产效率,降低了劳动成本。其自动化产物也推动了各国农业朝着自动化的方向发展,许多国家将自动化的生产技术应用于农业取得了举世瞩目的成就。但是就我国来说,农业自动化程度较低,许多地区的果蔬大棚仍然是人为的看管控制。影响果蔬生长的因素特别多,人为控制效率低下,进而会影响生产率。计算机技术和微控制器技术的发展也推动了工农业自动化的进程。我国是一个人口大国,农业自动化提高生产力是实际的需要,因此农业自动化的发展已经越来越受关注。对温室条件的自动控制技术似乎反应了一个国家农业生产技术水平。各种植物所需生长环境都不同,而大棚内植物的生长存活全都依赖于对其影响因素是否控制得当。因此,能够对大棚内影响作物生长的因素实现精确调控是确保大棚产量的重要条件。目前我国这项技术的发展水平远不及于世界上许多发达国家,我国许多地区对大棚内影响农作物的生长因素均用人工监测,甚至有些地区种植大棚时在大棚内悬挂相关器件来测量温度和湿度等,需要人要经常查看才得知大棚内环境,进而才能采取措施,此方法效率非常低而且基本上无法满足生产需要,这让很多大棚种植者十分苦恼。
为了提高工作效率,提高大棚作物产量,推动农业发展的自动化进程,解决控制不当导致资源浪费,虚耗劳动力等问题,有必要发展和研究自动控制的农业大棚系统。这样有利于推动农业的发展,大力提高生产力。因此研究此课题对实现合理科学的调控大棚内温度和湿度等参数实现自动化生产有十分重要的意义。

1.2 研究现状

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。