基于单片机的温度检测系统设计 下载本文

********大学毕业设计(论文)

摘 要

在工业生产中,电流、电压、温度、压力、流量、流速和开关量都是常用的主要被控参数。其中,温度测量越来越重要。在工业生产的很多领域中,人们都需要对各类加热炉、热处理炉、反应炉和锅炉中的温度进行检测。采用单片机对温度进行检测不仅具有控制方便、简单和灵活性大等优点,而且可以大幅度提高温度检测的性能指标,从而能够提高产品的质量和数量。

单片机是一种集CPU、RAM、ROM、I/O接口和中断系统等部分于一体的器件,只需要外加电源和晶振就可实现对数字信息的处理和检测。因此,单片机广泛用于现代工业检测中。

本设计侧重介绍单片机温度检测系统的硬件及软件设计的内容。采用电流型温度传感器AD590来构架温度采集系统,主控芯片采用AT89S51单片机。系统把采集到的温度值的模拟量通过ADC0809的一个通道输入ADC0809进行A/D转换,然后通过软件程序控制单片机将转换的结果进行数值变换后送入数码管进行显示。系统设计还包含温度报警系统。如果系统测得温度超过设定的温度值范围,报警系统开始工作。报警系统由一个自激震荡蜂鸣器、三极管(NPN)和发光二极管组成。 关键词:MCS-51;AT89S51;A/D转换;温度检测

I

********大学毕业设计(论文)

ABSTRACT

In industrial production, current, voltage, temperature, pressure, flow, flow rate and switches are often used as controlled parameters. The temperature measurements are increasingly important. In many areas of the industrial production, people need to detect the temperature of the various types of furnace, heat treatment furnace and boiler. It is not only convenient, simple and flexible using the Single Chip Microcomputer(SCM) to detect the temperature, but also it can improve the performance index of temperature detection, thus it can improve product quality and quantity.

The SCM is a kind of integrated device which is made up of CPU, RAM, ROM, I / O interface and interrupt system. It can achieve digital information processing and testing only with the power and the crystal. Therefore, the SCM is widely used in modern industrial detection.

In the paper, it focuses on the content of the hardware and software of The SCM temperature detection system. We use the AD590 to form temperature acquisition system, and use AT89S51 as controller chip. The analog temperature is carried into the ADC0809 for A/D converter through one channel of the ADC0809 in the system. Finally the conversion results are displayed through LED. When it is out of the maximum or the minimum of the temperature we have set in advance, the alarm system works. The alarm system is made up of self-concussion buzzer, the transistor(NPN) and LED components.

Key words:MCS-51; AT89S51; A/D transformation; Temperature examination

II

********大学毕业设计(论文)

目 录

摘要 ...................................................................... I Abstract ................................................................. II

第1章 绪论 ............................................................... 1 1.1 课题的意义和背景 ................................................... 1 1.2 温度测量的发展现状 ................................................. 1 1.3 设计任务及要求 ..................................................... 2 1.4 设计思路 ........................................................... 2 第2章 系统硬件原理及组成 ................................................. 3 2.1 主控芯片AT89S51 .................................................... 3 2.1.1主要特性 ........................................................ 3

2.1.2 管脚说明 ....................................................... 4 2.1.3 振荡器特性 ..................................................... 6 2.1.4 芯片擦除 ....................................................... 6 2.2 高精度运算放大器OP07 ............................................... 6 2.3 集成温度传感器 ..................................................... 8 2.3.1 AD590简介 ...................................................... 8 2.3.2 AD590的工作原理 ................................................ 9 2.4 A/D转换器概述 ..................................................... 12 2.4.1 A/D转换原理 ................................................... 12 2.4.2 ADC0809简介 ................................................... 13 2.4.3 ADC0809引脚与单片机连接 ....................................... 15 2.5 系统电路图 ........................................................ 15 2.5.1 温度采集系统电路 .............................................. 15 2.5.2 A/D转换系统电路 ............................................... 17 2.5.3 显示系统电路 .................................................. 17 2.5.4 报警系统电路 .................................................. 18 第3章 系统软件设计 ...................................................... 21 3.1 温度测量系统程序流程 .............................................. 21 3.2 温度采集程序系统 .................................................. 22 3.3 A/D转换程序系统 ................................................... 23 3.4 报警系统 .......................................................... 24 第4章 实验数据分析 ...................................................... 26 结论 ..................................................................... 31 参考文献 ................................................................. 32

III