基于AT89C51单片机的温度传感器
- 格式:doc
- 大小:309.00 KB
- 文档页数:19
基于at89c51单片机的水温控制系统的设计文献综述基于AT89C51单片机的水温控制系统的设计文献综述一、引言水温控制系统在工业、家电、农业等领域有着广泛的应用。
随着科技的发展,单片机作为微控制器在控制系统中的应用越来越广泛。
AT89C51单片机作为一种常用的单片机,具有性能稳定、价格低廉等优点,被广泛应用于水温控制系统的设计中。
本文将对基于AT89C51单片机的水温控制系统的设计进行文献综述。
二、AT89C51单片机简介AT89C51是一种常用的8位单片机,由美国ATMEL公司生产。
它具有4K字节的Flash 存储器、128字节的RAM、32位I/O端口、两个16位定时器/计数器、一个5向量两级中断结构、一个全双工串行通信口等功能。
AT89C51单片机适用于各种控制领域,如温度、湿度、压力等。
三、水温控制系统设计水温控制系统主要由温度传感器、单片机控制器、执行器等组成。
传感器负责采集水温信息,并将信息传递给单片机控制器。
单片机控制器根据设定的温度值与实际水温的差值,通过执行器调节加热元件的工作状态,从而实现水温的自动控制。
在基于AT89C51单片机的水温控制系统中,常用的温度传感器有热敏电阻、热电偶等。
执行器则可以选择继电器、可控硅等设备,用于控制加热元件的工作状态。
为了实现精确的温度控制,可以采用模糊控制、PID控制等控制算法。
四、AT89C51单片机在水温控制系统中的应用AT89C51单片机在水温控制系统中主要负责温度信号的采集、处理和控制输出。
通过编程实现温度信号的采集和转换,并根据设定值与实际水温的差值,通过执行器调节加热元件的工作状态,从而实现水温的自动控制。
此外,AT89C51单片机还可以实现报警、显示等功能,提高系统的智能化程度。
五、总结与展望基于AT89C51单片机的水温控制系统具有结构简单、成本低廉、易于实现等优点,被广泛应用于各个领域的温度控制中。
随着科技的发展,人们对水温控制系统的精度和智能化程度的要求越来越高。
基于A T89C51单片机控制的八路温度采集与显示系统设计学生姓名学号系、年级专业指导教师职称在实际生产和生活等各个领域中,温度是环境因素不可或缺的一部分,对温度进行及时精确的控制和检测显得尤为重要。
本次设计在控制成本的前提下,设计了一款高精度、可同时检测八路温度并由液晶显示器对各路温度值进行显示的温度检测显示系统。
该系统以A T89C51为控制核心,采用可编程单总线数字式温度传感器DS18B20进行温度采集,八路温度值由LM041L液晶显示器显示。
系统正常运行时,其测温范围为-55℃~+125℃,该系统在现代电子工业飞速发展的时期有良好的应用前景。
关键词:A T89C51;多路;温度检测;显示Temperature is an essential of environmental factors in our actual production,living and many other fields. It’s particularly important to control and detect the temperature promptly and exactly.It has designed a high precision temperature testing system in the base of lost control, which can inspect eight route temperature at one time and show each route of temperature by LCD. A T89C51is adopted as control core in this system. Its sensors for temperature is single bus digital DS18B20, sending temperature to LM041L LCD to display. When it operates normally, it’s temperature ranges from -55℃ to +125℃, the system has a good application prospect in the morden period when electronics industry developing rapidly. Keywords:A T89C51;Many routes;Temperature Detection;Display摘要 (I)Abstract (II)目录 (I)1绪论 (2)1.1课题的来源 (2)1.2课题的目的 (2)1.3课题的意义 (2)2八路温度采集显示系统总体方案设计 (4)2.1确定设计流程图 (4)2.2八路温度采集显示系统方案论证 (5)2.3确定总体设计方案 (8)3八路温度采集显示系统硬件设计 (9)3.1A T89C51单片机的特点及引脚说明 (9)3.2温度采集模块硬件设计................................................. 错误!未定义书签。
第24卷 第9期2008年5月甘肃科技Gansu Science and TechnologyV ol.24 N o.9M ay. 2008基于AT89C51单片机与DS18B20的温度测量系统蔺 鹏1,柴世红2(兰州工业高等专科学校;1电子信息工程系2软件工程系,甘肃兰州730050)摘 要:介绍了单总线数字温度传感器DS18B20的特性及工作原理,给出了A T89C51单片机与DS18B20构成温度测量系统并详细介绍利用汇编语言编程实现对DS18B20访问。
实际测试结果表明这种测温系统转换速度快、精度高,整个系统具有稳定性强等特点。
关键词:DS18B20;数字温度传感器;A T89C51;中图分类号:TN925 典型的温度测控系统是由模拟温度传感器、A/D 转换电路和单片机组成。
但是由于模拟温度传感器输出为模拟信号,必须经过A/D 转换环节获得数字信号后才能与单片机等微处理器接口,使得硬件电路结构复杂,成本较高。
近年来,由于以DS18B20为代表的新型单总线数字式温度传感器的突出优点使得它得到充分利。
DS18B20集温度测量和A/D 转换于一体,直接输出数字量,接口几乎不需要外围元件,硬件电路结构简单,传输距离远,可以很方便的实现多点测量;与单片机接口几乎不需要外围元件,使得硬件电路结构简单,广泛使用于距离远,节点分布多的场合。
1 DS18B20介绍DS18B20是美国DALL AS 公司推出的一种可组网的数字式温度传感器,能够直接读取被测物体的温度值[1]。
具有TO -92、TSOC 、SOIC 多种封装形式,可以适应不同的环境需求。
1.1 DS18B20具有以下主要特性(1)单总线接口方式:与微处理器连接时仅需要一条信号线即可实现双向通讯;(2)使用中无需外部器件,可以利用数据线或外部电源提供电能,供电电压范围3.3-5.5V ;(3)直接读出数字量,工作可靠,精度高,且通过编程可实现9~12位分辨率读出温度数据,转换12的温度数据最大仅需要750ms ;(4)温度测量范围-55℃~+125℃,-10℃~+85℃之间测量精度可达±0.5℃;(5)可设定非易失的报警上下限值,一旦测量温度超过此设定值,即可给出报警标志;(6)每片DS18B20上有唯一的64bit 识别码,可轻松组建分布式温度测量测量网络。
基于单片机AT89C51的温度控制系统的设计基于AT89C51单片机的温度测控系统设计一、引言随着现代化科技的进步,在很多工业控制场合需要非常精确的控制温度的变化,而在日常生活中,水温的智能控制应用也非常广泛,在这种环境下,便提出了智能水温控制系统。
本设计一单片机AT89C51为控制核心,用K型热电偶作温度传感器,信号经放大后输入模数转换器ADC0809,转换后的数字量输入到单片机AT89C51中。
单片机中采用PID控制算法对测量数据和设定数据进行处理,处理后的数据经数模转换器DAC0832转换为模拟量,以此来控制全隔离单相交流调压模块,从而控制锅炉水温稳定与设定值。
二、温度控制系统方案设计采用K型热电偶测量温度,讲温度信号放大后通过A/D 转入单片机,单片机进行数滤波和PID运算处理后,结果经DAC0832转换为模拟量对全隔离单相交流调压模块进行控制,达到控制电炉水温的目的。
系统方案如图1所示。
三、温度控制系统硬件设计温度控制系统硬件包括:AT89C51单片机最小系统模块、A/D转换模块、D/A转换模块、信号放大电路、温控电路以及其它外围电路。
3.1 单片机的选择AT89C51是ATMEL公司采用CM0S工艺生产的低消耗、高性能8位单片机,与MCS-51单片机兼容,其功能特点为:(1)4K字节闪烁存储器(FLASH),可进行1000次写。
(2)静态操作,外界OHZ-24MHZ晶振。
(3)三层程序存储器锁。
(4)128字节内部数据存储器(RAM)。
(5)32跟可编程输入,输出线。
(6)两个6位定时/计数器。
(7)六个中断源。
(8)一个可编程串口。
(9)支持低功耗模式和掉电模式。
非常适合用作控制系统设计。
3.2传感器电路和信号放大电路采用K型热电偶作为温度传感器,它是一种能测量较高温度的廉价热电偶。
它的价格便宜,重复性好,产生的热电势大,约为0.041mV/度,因而灵敏度很高,而且它的线性很好。
虽然其测量精度略低,但完全满足工业测量要求,所以它是工业最常用的热电偶。
基于单片机的数字温度计设计摘要随着国民经济的发展,人们需要对各中加热炉、热处理炉、反应炉和锅炉中温度进行监测和控制。
采用单片机来对他们控制不仅具有控制方便,简单和灵活性大等优点,而且可以大幅度提高被控温度的技术指标,从而能够大大的提高产品的质量和数量。
在日常生活及工业生产过程中,经常要用到温度的检测及控制,温度是生产过程和科学实验中普遍而且重要的物理参数之一。
在生产过程中,为了高效地进行生产,必须对它的主要参数,如温度、压力、流量等进行有效的控制。
温度控制在生产过程中占有相当大的比例。
温度测量是温度控制的基础,技术已经比较成熟。
传统的测温元件有热电偶和二电阻。
而热电偶和热电阻测出的一般都是电压,再转换成对应的温度,这些方法相对比较复杂,需要比较多的外部硬件支持。
我们用一种相对比较简单的方式来测量。
我们采用美国DALLAS半导体公司继DS18B20之后推出的一种改进型智能温度传感器DS18B20作为检测元件,温度范围为-55~125 ºC,最高分辨率可达0.0625 ºC。
DS18B20可以直接读出北侧温度值,而且采用三线制与单片机相连,减少了外部的硬件电路,具有低成本和易使用的特点。
本文介绍一种基于AT89C51单片机的一种温度测量及报警电路,该电路采用DS18B20作为温度监测元件,测量范围0℃-~+100℃,使用LED模块显示,能设置温度报警上下限。
正文着重给出了软硬件系统的各部分电路,介绍了集成温度传感器DS18B20的原理,AT89C51单片机功能和应用。
该电路设计新颖、功能强大、结构简单。
关键词:温度测量;DS18B20;AT89C51- I -Design of Digital Thermomer Based on SCMAbstractAlong with national economy development, the people need to each heating furnace、the heat-treatment furnace、in the reactor and the boiler the temperature carry on the monitor and the control. Not only uses the monolithic integrated circuit to come to them to control has the control to be convenient, simple and flexibility big and so on merits, moreover may enhance large scale is accused the temperature technical specification, thus can big enhance the product the quality and quantity.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. In the production process, in order to efficiently carry out the production, to be its main parameters, such as temperature, pressure, flow control, etc... Temperature control in the production process of a large proportion. Temperature measurement is the basis of temperature-controlled, more mature technology.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 ~ 125 º C, up to a maximum resolution of 0.0625 º 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 AT89C51 MCU a temperatur measurement circuits, the circuits used DS18B20 high-precision temperatur sensor, measuring scope 0℃-~+100℃,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 founctions and applications of AT89C51 .This circuit design innovative, powerful, can be expansionary strong.Keywords:Temperatur measurement;DS18B20; AT89C51- II -目录摘要......................................... . (I)Abstract (II)第1章绪论 (5)1.1课题背景及研究意义 (5)1.2国内外现状 (5)1.3课题的设计目的 (6)1.4课题的主要工作 (6)1.5本文研究内容 (6)第2章开发工具Proteus与Keil (8)2.1 Proteus软件 (8)2.1.1 Proteus简介 (8)2.1.2 4大功能模块 (8)2.1.3 ISIS智能原理图输入系统 (10)2.1.4 Proteus简单应用 (10)2.2 Keil软件 (11)2.2.1 Keil软件简介 (11)2.2.2 Keil软件调试功能 (11)2.3本章小结 (12)第3章系统概述 (13)3.1方案选择 (13)3.1.1方案一 (13)3.1.2方案二 (14)3.2系统设计原理 (14)3.3系统组成 (14)3.4 DS18B20温度传感器与单片机的接口电路 (15)3.5本章小结 (16)第4章系统硬件设计 (17)4.1 80C51单片机的介绍 (17)4.1.1 80C51单片机主要特性 (18)4.1.2 80C51单片机管脚图 (19)4.1.3 80C51单片机的中断系统 (21)4.1.4 80C51单片机的定时/计数器 (21)4.2 LCD液晶显示器简介 (21)4.2.1液晶模块简介 (22)4.2.2液晶显示部分与89C51的接口 (23)4.3通讯模块 (24)4.4 DS18B20介绍 (25)4.4.1温度传感器工作原理 (25)- III -4.4.2 DS18B20相关介绍 (27)4.4.3 DS18B20使用中的注意事项 (28)4.5本章小结 (28)第5章系统软件设计 (29)5.1主程序设计 (29)5.2 DS18B20初始化 (30)5.3数据测试 (31)5.4仿真结果 (31)5.5本章小结 (33)结论 (34)致谢 (35)参考文献 (36)附录A (37)附录B (44)附录C (49)附录D (50)- IV -第1章绪论1.1课题背景及研究意义随着新技术的不断开发与应用,近年来单片机发展十分迅速,一个以微机应用为主的新技术革命浪潮正在蓬勃兴起,单片机的应用已经渗透到电力、冶金、化工、建材、机械、食品、石油等各个行业。
摘要随着科技的不断发展,现代社会对各种信息参数的精确度和准确度的要求都有了很大的增长,而如何准确和迅速的获得这些参数就需要受制于现代信息技术的发展水平。
目前的智能温度传感器(亦称为数字温度传感器)是在20世纪90年代问世的,是微电子技术、计算机技术和自动测试技术(ATE)的结合。
它的特点是能输出温度数据和相关的温度控制量,适合各种微控制器(MCU)。
社会的发展使得人们对传感器的要求也越来越高,现在的温度传感器正在基于单片机的基础之上从模拟到数字式,从集成化到智能化、网络化的发展,并且朝着多功能。
高精度、总线标准化、高安全性和可靠性、开发网络传感器和虚拟传感器、研制单片测温系统等高科技的方向迅速发展。
本文将介绍智能集成温度传感器DS18B20的结构特征和控制方法,并对以此传感器,89C51单片机为控制器构成的数字温度计测量装置的工作原理和程序设计做了详细的介绍。
和传统的温度计相比它具有测量广泛,读数方便,测温准确,输出温度采用数字显示,主要用于对测温要求比较准确的场所,或者是科研实验室使用。
该设计控制器使用ATMEL公司的AT89S51单片机,测温传感器使用DALLAS公司的DS18B20,用液晶显示器来实现温度显示。
关键词:18B20 单片机 LEDABSTRACTWith the development of science and technology, precision and accuracy of modern society on various parameters of information requirements, there has been a lot of growth, and how accurate and fast access to these parameters will need to be subject to the level of development of modern information technology.Current smart temperature sensor (also referred to as digital temperature sensor) is launched in in the 1990 of the 20th century, is micro-electronics technology, computer technology and automated testing technologies (ATE) combination. It features the output temperature data and related temperature control, suitable for various microcontroller (MCU). Society tends to make people's requirements have become more sophisticated about sensors, temperature sensors are now based on single-chip industry from analog to digital, from integration to the development of intelligent, networked, and versatile. High accuracy, standardization, high security and reliability, to develop bus networks sensors and virtual sensors, development of single-chip microcomputer temperature measuring system and the rapid development of high technology. This article describes the architecture of intelligent integrated temperature sensor DS18B20 feature and control method, and with this sensor, 89S51 single-chip controller working principle and design of a digital thermometer measurement unit is introduced in detail. And it has measured a wide range than traditional thermometers, reading, accuracy of temperature measurement, the output temperature with digital display, place used primarily for accurate temperature measurement requirements, or a research laboratory. The design of controller using ATMEL's AT89S51 single-chip, DS18B20 temperature sensor using the DALLAS company, realizes with the LCD temperature display.Keywords: 18B20 Single-chip microcomputer LED目录第1章前言 (1)第2章数字温度计总体设计方案 (2)2.1数字温度计设计方案 (2)2.2总体设计框图 (2)第3章数字温度计硬件设计 (3)3.1主控制器AT89C51 (3)3.1.1 AT89C51的特点及特性: (3)3.1.2管脚功能说明: (3)3.1.3片内振荡器: (5)3.1.4芯片擦除: (6)3.2单片机主板电路 (7)3.3温度采集部分的设计 (7)3.3.1温度传感器DS18B20 (7)3.4显示部分电路设计 (12)3.4.1 74LS164引脚功能及特性 (13)3.4.2温度显示电路 (13)3.5报警系统电路 (14)第4章数字温度计的软件设计 (16)4.1系统软件设计的流程图 (16)4.2数字温度计部分程序清单 (18)结论 (24)致谢 (25)参考文献 (26)第1章前言随着时代的进步和发展,单片机技术已经普及到我们生活,工作,科研,各个领域,已经成为一种比较成熟的技术,本文将介绍一种基于单片机控制的数字温度计,本温度计属于多功能温度计,可以设置上下报警温度,当温度不在设置范围内时,可以报警。
目录摘要 (I)Abstract (II)1绪论 (1)2系统方案设计 (1)2.1方案设计 (1)2.2方案论证 (1)3系统设计 (2)3.1单片机的选择 (2)3.2温度传感器的工作原理与单片机的连接 (3)3.3单片机与报警电路 (10)3.4电源电路 (11)3.5显示电路 (12)4系统软件设计 (14)4.1软件设计 (14)5元器件调试 (19)5.1调试产品 (19)参考文献 (20)致谢 (21)附录1 (22)附录2 (27)摘要本课题主要介绍基于AT89C51单片机和DS18B20数字温度传感器的温度测量系统。
该系统利用AT89C51单片机分别采集各个温度点的温度,实现温度显示、报警等功能。
它以AT89C51单片机为主控制芯片,采用数字温度传感器DS18B20实现温度的检测,测量精度可以达到0.5℃。
该系统采用了1602显示模块,形象直观的显示测出的温度值。
基于AT89C51单片机的单总线温度测控系统具有硬件组成简单、读数方便、精度高、测温范围广等特点,在实际工程中得到广泛应用。
关键词:数字温度传感器;AT89C51单片机;温度测量ABSTRACTThis subject introduces the temperature measurement system based on AT89C51 single-chip and DS18B20 digital temperature sensor. Adopting the AT89C51 single-chip microcomputer in the system to collected temperature from various temperature positions realizes the temperature display and alarm function. Applying AT89C51 single-chip microcomputer-based as main control chip, it realizes the multi-temperature testing by using of digital temperature sensor DS18B20, and measurement accuracy reaches to 0.5 ℃. At the time the system uses a 1602 display module to show the measured temperature values. Based on AT89C51 single-chip single-bus multi-point temperature measurement and control system’s hardware assemble simply, reading data conveniently, high accuracy and widely temperature measuring, in the actual projects it is widely applied.Keywords:digital temperature sensor; AT89C51 microcontroller; temperature measure1绪论在信息高速发展的21世纪,科学技术的发展日新月异,科技的进步带动了测量技术的发展,现代控制设备的性能和结构发生了翻天覆地的变化。
[键入文字] - 1 - 基于AT89C51单片机的温度传感器
目 录 摘 要............................................................. I ABSTRACT........................................................... II 第一章 绪论....................................................... 1 1.1 课题背景 .................................................... 1 1.2本课题研究意义 ................................................ 2 1.3本课题的任务 .................................................. 2 1.4系统整体目标 .................................................. 2
第二章 方案论证比较与选择.......................................... 3 2.1 引言 .......................................................... 3 2.2方案设计 ...................................................... 3 2.2.1 设计方案一.............................................. 3 2.2.2 设计方案二.............................................. 3 2.2.3 设计方案三.............................................. 3 2.3 方案的比较与选择 .............................................. 4 2.4 方案的阐述与论证 .............................................. 4
第三章 硬件设计 ................................................... 6 3.1 温度传感器 .................................................. 6 3.1.1 温度传感器选用细则........................................ 6 3.1.2 温度传感器DS18B20 ...................................... 7 3.2.单片机系统设计 ............................................... 13 [键入文字] - 2 - 3.3 显示电路设计 .................................. 错误!未定义书签。 3.4 键盘电路设计 ................................. 错误!未定义书签。 3.5 报警电路设计 .................................. 错误!未定义书签。 3.6 通信模块设计 .................................. 错误!未定义书签。 3.6.1 RS-232接口简介 ............................... 错误!未定义书签。 3.6.2 MAX232芯片简介 .............................. 错误!未定义书签。 3.6.3 PC机与单片机的串行通信接口电路 .............. 错误!未定义书签。
第四章 软件设计 ................................... 错误!未定义书签。 4.1 软件开发工具的选择 .......................... 错误!未定义书签。 4.2 系统软件设计的一般原则 ........................ 错误!未定义书签。 4..3系统软件设计的一般步骤 ....................... 错误!未定义书签。 4.4 软件实现 ..................................... 错误!未定义书签。 4.4.1系统主程序流程图 .......................... 错误!未定义书签。 4.4.2 传感器程序设计............................ 错误!未定义书签。 4.4.3 显示程序设计.............................. 错误!未定义书签。 4.4.4 键盘程序设计.............................. 错误!未定义书签。 4.4.5 报警程序设计.............................. 错误!未定义书签。 4.4.6 通信模块程序设计.......................... 错误!未定义书签。
第五章 调试与小结................................... 错误!未定义书签。 致谢................................................ 错误!未定义书签。 参考文献............................................ 错误!未定义书签。 附录................................................ 错误!未定义书签。 系统电路图 ........................................ 错误!未定义书签。 系统程序 .......................................... 错误!未定义书签。 摘要
I 基于AT89C51单片机的温度传感器
摘 要 随着社会的进步和工业技术的发展,人们越来越重视温度因素,许多产品对温度范围要求严格,而目前市场上普遍存在的温度检测仪器大都是单点测量,同时有温度信息传递不及时、精度不够的缺点,不利于工业控制者根据温度变化及时做出决定。在这样的形式下,开发一种能够同时测量多点,并且实时性高、精度高,能够综合处理多点温度信息的测量系统就很有必要。
本课题以AT89C51单片机系统为核心,能对多点的温度进行实时巡检。DS18B20是一种可组网的高精度数字式温度传感器,由于其具有单总线的独特优点,可以使用户轻松地组建起传感器网络,并可使多点温度测量电路变得简单、可靠。本文结合实际使用经验,介绍了DS18B20数字温度传感器在单片机下的硬件连接及软件编程,并给出了软件流程图。
关键词:温度测量;单总线;数字温度传感器;单片机 摘要
II Abstract As the industry and the society developing, the temperature becomes more and more important and a lot of products are sensitive to temperature. However, temperature measuring apparatus in the market now only can check and measure the temperature of one point, at the same time, the temperature information is not real time and the precision is low. It takes a great of troubles for the industry-controllers to make decision .In this situation, design and implement one applicable system which can watch measure and control the temperature and the measuring results is real time and the precision is great is more essential. In order to meeting this application, this paper talk about The Multiple-Point’s temperature Measuring System.
This system based on single chip computer, can inspect and control multiple temperatures in real time. As a kind of high-accuracy digital net temperature sensor,DS18 B20 can be used building a sensor net easily. It can also make the net simple and reliable with it's special 1-wire interface .This paper introduces the application of DS18B20 with single chip processor.
Key words: temperature measure;single bus;digital thermometer;single chip processor;