1、 I 毕毕 业业 设设 计计 论论 文文 题 目:基于单片机的远程大棚温湿度监控系统 学 院: 电气与信息工程学院 专 业: 电气工程及其自动化 II 摘 要 本课题以远程大棚温湿度监控为研究目的,数据采集部分采用 51 单片机和 DHT11 单总线数字式温湿度传感器,数据传输部分采用 485 总线电平标准。数据的 集中处理部分采用了 51 单片机硬件上位机和 PC 软件上位机两种方案。51 单片机 上位机或 PC 软件上位机通过 485 电平和 51 单片机温湿度数据采集器通信。本课 题根据市场的情况开发出了一个硬件上位机平台,其采集到温湿度信息后通过 1602 液晶进行实时显示。PC 软件
2、上位机是本课题提供的一个额外的新方案,采用 python 编程语言,利用其开发速度快的优点,在短时间内开发出了一个简单的软 件上位机平台,软件上位机可以和硬件上位机可以轻松组成一个冗余系统。 关键字关键字:python 编程,DHT11 温湿度,51 单片机 河南城建学院本科毕业设计(论文) ABSTRACT III ABSTRACT The purpose of this topic is to remote greenhouse temperature and humidity monitoring. The data collection uses 51 MCU and DHT11 si
3、ngle-bus digital temperature and humidity sensors. The data transmission part adopts 485-level standards. Centralized data processing part uses two programs:a microcontroller hardware by 51 MCU and PC software moniter. The 51 single host computer or PC software PC communications through 485 levels,
4、51 single temperature and humidity data logger. This topic can be developed according to the market situation out of a PC hardware platform,after which the collected information in real-time display of temperature and humidity through 1602.PC software is an additional new program that provides in th
5、is topic,which uses python programming language,takes advantage of its speed in a short time developed a simple software PC platform.PC software is self-evident advantages. KEY WORDS: Python , DHT11, 51MCU IV 目 录 摘要 .I ABSTRACT .III 目录 IV 第 1 章 引言 1 1.1 课题背景 .1 1.2 大棚温湿度监控系统系统发展现状 .1 1.3 本设计的主要工作 .2
6、 第 2 章 系统设计 3 2.1 主要构成 .3 2.2 总体方案 .3 2.3 方案说明 .4 第 3 章 温湿度采集点的设计 5 3.1 工作原理 .5 3.2 硬件原理图 .6 3.3 STC89C52 单片机 .6 3.3.1 简介 6 3.3.2 引脚图 7 3.3.3 串口通讯 7 3.4 DHT11 数字温湿度传感器 .9 3.4.1 简介 9 3.4.2 在本设计中的应用 .10 3.4.3 串行接口 .10 3.4.4 通信过程 .11 3.5 程序设计 11 3.5.1 开发工具介绍 .11 3.5.2 C 语言介绍 .12 3.5.3 C 语言优点 12 3.5.4 C 程序设计 .13 第 4 章 硬件上位机的设计 .21 4.1 工作原理 21 4.2 LCD1602 液晶 22 4.2.1 简介 .22 4.2.2 引脚图 .22 4.3 硬件原理图 23 4.4 程序设计 24 4.4.1 设计算法 .24 4.4.2 宏定义和预处理 .24 4.4.3 子函数设计 .