1、基于 AT89C52 单片机的温湿度检测系统设计 基于 STC89C52 单片机的 温湿 度检测系统设计 摘要 随着人们的生活及其生产水平的不断提高,对生活环境和生产环境的要求就显的尤为重要 ,温湿度的控制就是一个典型的例子,因此温湿度检测系统就是现代生产生活中应运而生的一种智能、快捷、方便可靠的检测系统,特别是在工业生产中如果检测得不准确就会发生许多的生产事故。要为现代人工作、科研、生活提供更好的更方便的设施就需要从单片机技术入手,一切向着数字化控制,智能化控制方向发展。本设计是以单片机为核心,配合温 湿 度传感器,以及相关的外围电路组成的检测系统,可以接收所测环境 的温度和湿度信号,检测人
2、员可以通过 LCD 显示的数据,实时监控环境的温度和湿度情况。所有的测量操作都可以通过主机控制软件来实现,温度和湿度传感器得到的测量信号,经电路转换为电信号,然后通过转换送到单片机进行数据处理,经软件分析处理后送显示装置。 本 系统包括系统硬件和软件设计 ,可靠性高,结构简单,实现了对温湿度的自动调节 。 系统还应用 RS232 与上位机相连接,可以设置自动记录温度、湿度的相关的参数,也可以设置每隔一定的时间自动记录,可用在气象的观察方面。 关键词 : STC89C52 单片机,温 湿 度传感器, LCD 显示 As people life level of production and im
3、prove the living environment and production environment to the demands of the significant particularly important, control of temperature and humidity is one example, so the temperature and humidity detection system is the modern production and life of a kind of intelligence have emerged in, quick, c
4、onvenient and reliable detection system, especially in the industrial production, if detection is not accurate will happen many production accidents. For modern people to work, scientific research, and provide a better life more convenient facilities will need from single chip technology of digital
5、control to all, intelligent control direction. This design is based on single chip microcomputer as the core, with temperature and humidity 基于 AT89C52 单片机的温湿度检测系统设计 1 sensor, and related peripheral circuit composed of detection system, can receive the environment temperature and humidity signal, tes
6、ting personnel can through the LCD display data, real-time monitoring of environmental temperature and humidity conditions. This system including the system hardware and software design, high reliability, simple structure, realize the automatic adjustment of the temperature and humidity. System is u
7、sed RS232 and superordination machine connected, can set up automatic recording of temperature and humidity in related parameters, can also set every certain time to be automatic records, can be used in meteorological observation. Key words: STC89C52 microcontroller, temperature and humidity sensor,
8、 LCD display 目录 第 1 章 概述 . 2 1.1 课题的研究背景 . 2 1.2 温湿度检测的发展状况以及存在的问题 . 3 1.3 本课程设计的主要内容 . 4 第 2 章 系统总体方案设计 . 4 2.1 温湿度传感器 . 5 1、 DHT11 产品概述 . 5 2 接口说明 . 5 3、 电源引脚 . 6 4、 串行接口 (单 线双向 ). 6 5、 DHT11 引脚说明 . 6 6、 焊接信息 . 6 7、注意事项 . 7 2.2 RS232 接口 . 7 2.3 单片机 STC89C52. 7 2.4 LCD1602. 9 第 3 章 系统的硬件设计和连接 . 10 3.1 主控模块 . 10 3.2 显示模块 . 12 3.3 温度和湿度采集模块 . 12 3.4 键盘设计 . 14 3.5 与上位机相连电路的设计 . 15