广西大学行健文理学院
毕业设计说明书
题目:基于单片机的多点温度检测设计
学 部: 电气信息学部 专 业: 电子科学与技术 班 级: 2011级(1)班 学 号: 1138340124 学生姓名:黎卫锋 指导教师:杨凤娟
二〇一五 年 五 月
摘要
在工业生产及日常生活中,多点温度检测系统的应用十分广泛,例如消防电气的非破坏性温度检测,电力设备的过热故障预知检测,空调系统的温度检测,各类运输工具组件的过热检测,医疗与诊断设备的温度测试等。针对这一情况,本文设计了一种基于AT89C51单片机的温度检测系统,系统利用单片机获得温度传感器数据并与系统设计值进行比较,根据比较结果分别控制执行系统系统采用AT89C51单片机视作为控裁核心,进行温度采集、信息显示及执行机构的控制。温度传感器采用Dallas半导体公司的数字传感器DSl8820。为了能够提供形象的用户显示界面,系统采用图形液晶显示模块LCDl2864,显示各释字符及图形。
关键词:多点温度检测 单片机 DSl8820传感器
Abstract
In industrial production and daily life, the application of multi-point temperature detecting system is very wide, such as fire electric non-destructive testing temperature, precognition overheating fault detection of power equipment, and detect the temperature of the air conditioning system, all kinds of transport components of overheat detection, medical and diagnostic equipment, such as temperature test. Aim at this situation, this paper designs a temperature detection system based on AT89C51, using single chip computer system for temperature sensor data and comparing with values of system design, according to the comparison results, respectively, to control execution system system USES AT89C51 as control core, cutting temperature acquisition, information display and control of the actuator. The temperature sensor using digital sensor DSl8820 Dallas semiconductor company. In order to be able to provide the image of the user interface, the system adopts LCDl2864 graphic liquid crystal display module, according to the interpretation of the basic characters and graphics.
51 single chip microcomputer temperature gathering application system used in the collection of variables, and to control other variables or action in the application system, such as collection of cold storage temperature to decide whether to open or closed refrigeration, collection of greenhouse temperature decide whether to open the Windows for ventilation. In practical application, the work is often not only use one point of temperature data as a reference, need to refer to multiple point temperature data at the same time, the need to use a multi-point temperature acquisition system to complete the corresponding work. Temperature acquisition system need to pay attention to the qualitative change of including patch number, patch distance, with sampling temperature range and accuracy. So this system need to eight distance in 10 cm points within the scope of data collection, the collection temperature range in - 30 ~ 50 ℃ range, acquisition precision of 0.5 ℃.
Keywords:Multipoint temperature detectionSCMDSl8820 sensor
目录
第一章 绪论 .......................................... 1
1.1系统背景 ....................................... 1 1.2系统概述 ....................................... 1 1.3 设计任务及方案 ................................ 1 第二章 方案论证 ...................................... 3
2.1传感器部分 ..................................... 3 2.2主控制部分 ..................................... 6 2.3系统方案 ...................... 错误!未定义书签。 2.4 数码管 ........................................ 6 第三章 硬件电路的设计 ................................ 7
3.1电源以及看门狗电路 ................................................................ 7 3.2 键盘以及显示电路 .............................. 7 3.3 温度测试电路............................................................................. 3.4 串口通讯电路................................................................................ 3.5 整体电路........................................................................................ 第四章 软件设计 ..................................... 22
4.1概述 .......................................... 22 4.2 主程序方案 ................................... 22 4.3 各模块子程序设计...................................................................... 第五章 系统调试
5.1 分步调试........................................................................................ 5.2 统一调试....................................................................................... 结束语 ............................................... 29 参考文献 ............................................. 31 附录 ................................................. 32 致谢 ................................................. 41
第一章 绪论
1.1 系统背景介绍
温度是工业生产中最常见和最基本的工业参数之一,是与人类的生活、工作关系最密切的物理量,也是各学科与工程研究设计中经常遇到和必须精确测量的物理量。而随着电子技术和计算机技术的迅速发展,特别是单片微机的发展,使传统的测量仪器在原理,功能,精度及自动化水平等方面发生了巨大的变化,使很多的传统电子仪器被相应的全新的仪器类型和测试系统体系所代替。随着电子技术以及应用需求的发展,单片机技术得到了迅速的发展,在高集成度,高速度,低功耗以及高性能方面取得了很大的进展。伴随着科学技术的发展,电子技术有了更高的飞跃,我们现在完全可以运用单片机来代替人工测量,这样既省时又省力。
由于单片机具有功能强、体积小、可靠性好、和价格低廉等独特优点,且在智能仪器仪表、工业自动控制、计算机智能终端、家用电器、儿童玩具等许多方面,都已得到了很好的应用,因而受到人们高度重视,取得了一系列科研成果,成为传统工业技术改造和新产品更新换代的理想机种,具有广阔的发展前景。
51单片机温度采集应用系统常用于变量的采集,并对应用系统中的其他变量或动作进行控制,如采集冷库的温度决定是否开启或关闭制冷,采集温室的温度决定是否要开启窗户进行通风。而在实际应用中,这些工作往往不是只使用一个点的温度数据作为参考量,需要同时参考多个点的温度数据,此时需要使用一个多点的温度采集系统来完成相应的工作。温度采集系统需要关注的质变包括采集点数目、采集点距离、带采集温度范围及采集精度。因此本系统需要对8个距离在10cm范围内的点数据进行采集,其采集温度范围在-30~50℃区间,采集精度为0.5℃。
1.2 系统概述
该案由单片机、模拟温度传感器AD590、运算放大器、AD转换器、数码显示电路、集成功率放大器、报警器组成。 本方案采用模拟温度传感器AD590作为测温元件,传感器将测量的温度变换转换成电流的变化,再通过电路转换成电压的变化,使用运算放大器交将信号进行适当的放大,最
1