基于STC89C52单片机的粮仓温湿度的系统设计 下载本文

学号:

常 州 大 学 毕业设计(论文) (2012届)

题 目 学 生 学 院 专业班级 校内指导教师 专业技术职务 校外指导老师 专业技术职务

二○一二年六月

基于STC89C52单片机的粮仓温湿度的系统设计

摘要:温湿度作为一个重要的物理量,是粮食仓库中最普遍、最重要的工艺参数之一。随着科学技术的不断更新,对温湿度测量的准确性要求不断提高,因此温湿度检测也成为一个重要的研究课题。

本设计是基于单片机对数字信号的高敏感性和可控性以及数字温湿度传感器可以产生数字信号的性能,设计了以STC89C52为核心的一套控制系统,其中包括单片机、温湿度检测、键盘及显示、报警电路、系统软件等部分的设计。

STC89C52是一种低功耗、高性能CMOS8位微控制器,具有 8K可编程Flash 存储控器。DHT11数字温湿度传感器是一款含有已校准数字信号输出的温湿度复合传感器。它应用专用的数字模块采集技术和温湿度传感技术,确保产品具有极高的可靠性与卓越的长期稳定性。

关键词:温湿度;STC89C52;DHT11传感器;

I

Temperature and Humidity of Granary System design based

on STC89C52 Microcontroller

Abstract: Temperature and humidity as an important physical quantity, is one of the most common food warehouse, the most important process parameters. As the times progress, social development, science and technology constantly updated, the accuracy of measurement of temperature and humidity requirements continue to improve, so the temperature and humidity testing has also become an important research topic.

The design is based on single-chip digital signal high sensitivity and controllability, as well as digital temperature and humidity sensors can produce the performance of digital signal, design a control system STC89C52 as the core, Including the microcontroller, temperature and humidity testing, keyboard and display, the alarm circuit, system software, and other parts of the design.

STC89C52 a low-power, high performance CMOS8 bit microcontroller with 8K programmable Flash storage controller. DHT11 digital temperature and humidity sensor is a composite Sensor contains a calibrated digital signal output of the temperature and humidity. Application of a dedicated digital modules collection technology and the temperature and humidity sensing technology, to ensure that products with high reliability and excellent long-term stability

Key words: Temperature and Humidity; STC89C52; DHT11 sensor;

II

目录

摘要........................................................................................................................ I 1 绪论.................................................................................................................... 1

1.1 课题开发的意义 ................................................................................... 1 1.2 课题开发的背景 ................................................................................... 1 1.3 课题开发的目标 ................................................................................... 2 2 系统总体分析.................................................................................................. 2

2.1 总体方案设计......................................................................................... 2 2.2 硬件选择................................................................................................. 3 2.3 系统仿真................................................................................................. 4 3 硬件设计.......................................................................................................... 6

3.1 Protel硬件开发软件 ............................................................................... 6 3.2 单片机系统模块..................................................................................... 7 3.3 温湿度检测模块................................................................................... 12 3.4 显示模块............................................................................................... 14 3.5 温湿度上限存储模块........................................................................... 17 3.6 电源及程序下载模块........................................................................... 19 4 软件设计.......................................................................................................... 21

4.1 主程序................................................................................................... 21 4.2 温湿度检测模块程序........................................................................... 22 4.3 LCD显示模块程序............................................................................... 23 5 系统实现与调试.............................................................................................. 24

5.1 电路板焊接注意事项........................................................................... 24 5.2 程序下载............................................................................................... 24 5.3 系统运行............................................................................................... 25 参 考 文 献........................................................................................................ 27 致 谢.................................................................................................................... 28 附 录 A ............................................................................................................... 29 附 录 B................................................................................ 错误!未定义书签。

III