摘 要
Design of Digital Thermomer Based on SCM
In daily life and industrial production process, often used in the detection and control of temperature, temperature is the production process and scientific experiments in general and one of the important physical parameter. Traditional thermocouple and temperature components are the second resistor. The thermocouple and thermal resistance are generally measured voltage, and then replaced by the corresponding temperature, these methods are relatively complex, requiring a relatively large number of external hardware support. We use a relatively simple way to measure.
We use the United States following DALLAS Semiconductor DS1820 improved after the introduction of a smart temperature sensor DS18B20 as the detection element, a temperature range of -55 o C ~ 125 o C, up to a maximum resolution of 0.0625 o C. DS18B20 can be directly read out the temperature on the north side, and three-wire system with single-chip connected to a decrease of the external hardware circuit, with low-cost and easy use.
The introduction of a cost-based AT89C52 MCU a temperature measurement circuits, the circuits used DS18B20 high-precision temperature sensor, measuring scope 0 o C~+100 o C, can set the warning limitation, the use of seven segments LED that can be display the current temperature. The paper focuses on providing a software and hardware system components circuit, introduced the theory of DS18B20, the functions and applications of AT89C52 .This circuit design innovative, powerful, can be expansionary strong.
Keywords:Temperature measurement DS18B20 AT89C52
- I -
摘 要
目 录
第1章 引言 ........................................................ 1 1.1课题背景及研究意义 .............................................. 1 1.2课题的设计目的 .................................................. 1 1.3课题设计主要工作 ................................................ 2 1.4本文研究内容 .................................................... 2 第2章 开发工具Proteus与Keil ...................................... 3 2.1 Proteus软件简介 ................................................ 3 2.2 Keil软件简介 ................................................... 3 第3章 系统概述 ..................................................... 5 3.1设计方案 ........................................................ 5 3.2系统设计原理 .................................................... 5 3.3系统组成 ........................................................ 6 3.4 DS18B20温度传感器与单片机的接口电路 ............................ 7 第4章 系统硬件设计 ................................................. 8 4.1 89C52单片机的介绍 .............................................. 8 4.1.1 89C52单片机主要特性 .......................................... 9 4.1.2 89C52单片机管脚图 ........................................... 10 4.2液晶模块简介 ................................................... 13 4.3 DS18B20介绍 ................................................... 16 4.3.1温度传感器工作原理 ........................................... 17 4.3.2 DS18B20相关介绍 ............................................. 19 第5章 系统软件设计 ................................................ 21 5.1主程序设计 ..................................................... 21 5.2 DS18B20初始化 ................................................. 22 5.3仿真结果 ....................................................... 23 结论 ............................................................... 26 致谢 ............................................................... 27 参考文献 ........................................................... 28 附录A 系统整体电路 ............................................... 29 附录B 全部程序清单 ................................................ 30
- II -
ABSTRACT
第1章 引言
1.1课题背景及研究意义
随着新技术的不断开发与应用,近年来单片机发展十分迅速,一个以微机应用为主的新技术革命浪潮正在蓬勃兴起,单片机的应用已经渗透到电力、冶金、化工、建材、机械、食品、石油等各个行业。传统的温度采集方法不仅费时费力,而且精度差,单片机的出现使得温度的采集和数据处理问题能够得到很好的解决。温度是工业对象中的一个重要的被控参数。然而所采用的测温元件和测量方法也不相同;产品的工艺不同,控制温度的精度也不相同。因此对数据采集的精度和采用的控制方法也不相同。
温度控制系统在国内各行各业的应用虽然已经十分广泛,但从国内生产的温度控制器来讲,总体发展水平仍然不高,同日本、美国、德国等先进国家相比,仍然有着较大的差距。
本设计使用单片机作为核心进行控制。单片机具有集成度高,通用性好,功能强,特别是体积小,重量轻,耗能低,可靠性高,抗干扰能力强和使用方便等
独特优点,在数字、智能化方面有广泛的用途。
1.2课题设计目的
1. 巩固、加深和扩大单片机应用的知识面,提高综合及灵活运用所学知识解决工业控制的能力。
2. 培养针对课题需要,选择和查阅有关手册、图表及文献资料的自学能力,提高组成系统、编程、调试的动手能力。
3. 通过对课题设计方案的分析、选择、比较、熟悉单片机用系统开发、研制的过程,软硬件设计的方法、内容及步骤
- III -
电子科技大学成都学院课程设计
1.3课题设计主要工作
本课题的研究重点是设计一种基于单片机的数字温度计控制系统。利用数字温度传感器DS18B20,此传感器课读取被测量温度值,进行转换。
主要工作如下:
1. 温度测试基本范围0℃—100℃。 2. 精度误差小于1℃。 3. LED液晶显示。
4. 可以设定温度的上下限报警功能。 5. 实现报警提示。
1.4本文研究内容
数字温度计采用温度敏感元件也就是温度传感器(如铂电阻,热电偶,半导体,热敏电阻等),将温度的变化转换成电信号的变化,如电压和电流的变化,温度变化和电信号的变化有一定的关系,如线性关系,一定的曲线关系等,这个电信号可以使用模数转换的电路即A/D转换电路将模拟信号转换为数字信号,数字信号再送给处理单元,如单片机或者PC机等,处理单元经过内部的软件计算将这个数字信号和温度联系起来,成为可以显示出来的温度数值,如25.0摄氏度,然后通过显示单元,如LED,LCD或者电脑屏幕等显示出来给人观察。这样就完成了数字温度计的基本测温功能。
本文是基于AT89C52单片机,采用数字温度传感器DS18B20,利用DS18B20不需要A/D转换,课直接进行温度采集显示,报警的数字温度计设计。包括传感器数据采集电路,温度显示电路,上下限报警调整电路,单片机主板电路等组成。
- 2 -

