基于单片机DS18B20温度控制器课程设计

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

《单片机原理及应用》

课程设计报告

题目:温度控制器电路

专业:电子信息工程

年级: 2010级

学号: ********** 学生姓名: ******* 联系电话: ************ 指导老师: *******

完成日期:2013年5月30

摘要

随着时代的进步和发展,温度的测试已经影响到我们的生活、工作、科研、各个领域,已经成为了一种非常重要的事情,因此设计一个温度测试的系统势在必行。

本文主要介绍了一个基于AT89C52单片机的数字温度报警器系统。详细描述了利用数字温度传感器DS18B20开发测温系统的过程,重点对传感器在单片机下的硬件连接,软件编程以及各模块系统流程进行了详尽分析,对各部分的电路也一一进行了介绍,该系统可以方便的实现温度的采集和报警,并可以根据需要任意上下限报警温度,它使用起来相当方便,具有量程宽、体积小、功耗低等优点,适合于我们日常生活和工、农业生产中的温度测量,也可以当做温度处理模块潜入其他系统中,作为其他主系统的辅助扩展。DS18B20与AT89C52结合实现最简温度报警系统,该系统结构简单,有广泛的应用前景。

关键词:单片机;温度检测;AT89C52;DS18B20;

ABSTRACT

With the era of progress and development, the temperature test has affected our life, work, scientific research, each domain, has become a very important thing, be imperative system so the design of a temperature test.

This paper introduces a digital temperature alarm system based on AT89C52 mcu. Detailed description of the process of digital temperature sensor DS18B20 temperature measurement system development, focusing on the sensor under the SCM hardware connection, software programming and system flow of each module are analyzed in detail, on the part of the circuit are one one are introduced, the system can facilitate the realization of temperature acquisition and alarm, and can according to need any alarm temperature, it is very convenient to use, has a wide range, small volume, low power consumption, suitable for our daily lives and industrial, agricultural production in the temperature measurement, can also be used as a temperature processing module into other systems, as other auxiliary system. DS18B20 combined with AT89C52 to achieve the most simple temperature alarm system, the system is simple in structure, has the widespread application prospect.

Key word.Single chip microcomputer; temperature detection; AT89C52; DS18B20;

目录

摘要.............................................................. I ABSTRACT........................................................... I I 1 设计要求及方案选择 (1)

1.1设计要求 (1)

1.2方案选择 (1)

2 理论分析与设计 (1)

2.1 芯片介绍 (1)

2..1.1 DS18B20概述 (1)

2.1.2 STC89C52介绍 (2)

2.2系统结构框图 (3)

2.3程序原理叙述 (3)

3.电路设计 (3)

3.1硬件设计 (3)

3.1.1报警模块 (4)

3.1.2单片机最小系统电路 (4)

3.1.3温度采集模块 (5)

3.2软件设计 (5)

3.2.1流程框图 (6)

3.2.2程序设计 (6)

4、系统测试 (15)

5、总结 (16)

.参考文献 (17)

1 设计要求及方案选择

1.1设计要求

1制作完成温度检测系统

2温度检测精度1度

3温度控制在一定范围内,超出温度设定范围是报警(声光显示)

4将学号和姓名打印在铜板上

1.2方案选择

方案一:采用热敏电阻,热敏电阻精度、重复性、可靠性较差,对于检测1摄氏度的信号是不适用的,在温度测量系统中,也常采用单片温度传感器,比如AD590,LM35等。但这些芯片输出的都是模拟信号,必须经过A/D转换后才能送给计算机,这样就使测温系统的硬件结构较复杂。要用到复杂的算法,一定程度上也增加了软件实现的难度。

方案二:采用单总线数字温度传感器DS18B20测量温度,直接输出数字信号。便于单片机处理及控制,节省硬件电路。且该芯片的物理化学性很稳定,此元件线形性能好,在0—100摄氏度时,最大线形偏差小于1摄氏度。DS18B20的最大特点之一采用了单总线的数据传输,由数字温度计DS18B20和微控制器STC89C52构成的温度装置,它直接输出温度的数字信号到微控制器。每只DS18B20具有一个独有的不可修改的64位序列号,根据序列号可访问不同的器件。

综上分析,我们选用第二种方案。

2 理论分析与设计

2.1 芯片介绍

2..1.1 DS18B20概述

DS18B20是Dallas公司继DS1820后推出的一种改进型智能数字温度传感

相关文档
最新文档