77范文网 - 专业文章范例文档资料分享平台

基于51单片机的温度报警系统设计 - 图文

来源:网络收集 时间:2020-04-17 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

宝鸡文理学院电子电气工程学院

单片机实习设计报告

设计题目: 基于51单片机的温度报警系统设计

班 级: 2013级自动化2班 姓 名: 赵阳 201395124062 李杰 201395124063 江超 201395124064

王珊 201395124065

指导教师: 李军生 张曦

2016年 1月8日

基于51单片机的温度报警系统设计

摘要

温度是一个十分重要的物理量,对它的测量与控制有十分重要的意义。随着现代工农业技术的发展及人们对生活环境要求的提高,人们也迫切需要检测与控制温度。温度控制电路在工农业生产中有着广泛的应用。日常生活中也可以见到,如电冰箱的自动制冷,空调器的自动控制等等。在工业生产中,温度、压力、流量和液位是四种最常见的过程变量。其中,温度是一个非常重要的过程变量。例如:在冶金工业、化工工业、电力工业、机械加工和食品加工等许多领域,都需要对各种加热炉、热处理炉、反应炉和锅炉的温度进行监控。然而,用常规的监控方法,潜力是有限的,难以满足较高的性能要求。采用单片机来对它们进行监控不仅具有监控方便、简单和灵活性大的优点,而且可以大幅度提高被测温度的技术指标,从而能够大大提高产品的质量和数量。因此,单片机对温度的监控问题是一个工业生产中经常会遇到的监控问题。现代社会是信息化的社会,随着安全化程度的日益提高,而通过温度报警器及时报警,避免不必要的损失。

研究了基于STC-89C52RC单片机温度控制系统的原理和功能,温度测量单元由单总线数字温度传感器DS18B20构成。该系统可进行温度设定,时间显示和保存监测数据。如果温度超过任意设置的上限和下限值,系统将报警并可以和自动控制的实现,从而达到温度监测智能一定范围内。基于系统的原理,很容易使其他各种非线性控制系统,只要软件设计合理的改变。 关键字:STC-89C52RC单片机;温度;时间 ;DS18B20。

I

Design of temperature alarm system based on 51 single

chip microcomputer

Abstract

temperature is a very important physical quantity of its measurement and control has very important significance. Along with the development of modern industry and agriculture technology development and people living environment improved, people urgently need to detect and control the temperature. Temperature control circuit in the industry and agriculture production is widely used. In daily life can also be seen, such as a refrigerator automatic refrigeration and air conditioning automatic control and so on. In industrial production, temperature, pressure, flow and level is one of the four most common process variables. The temperature is a very important process

variables. For example: in metallurgical industry, chemical industry, power industry, machinery processing and Food processing and many other fields, we need to all kinds of heating furnace, heat treatment furnace, reactor and boiler temperature

monitoring. However, conventional monitoring methods, the potential is limited, it is difficult to meet the higher performance requirements. The use of single-chip

microcomputer to monitor not only convenient monitoring, simple and flexibility big advantages, and can greatly improve the technical indicators measured temperature, which can greatly improve the quality and quantity of products. Therefore, the problem of temperature monitoring chip is often encountered in an industrial

production monitoring problem. Modern society is the information society, with the increasing of the degree of security, and through Temperature alarm in time, to avoid unnecessary losses.

Study based on the STC-89C52RC single chip microcomputer temperature control principle and function of the system, the temperature measurement unit is composed of a single bus digital temperature sensor DS18B20 constitute. The system can set temperature and time display and save the monitoring data. If the temperature exceeds the arbitrarily set the upper limit and lower limit value, the system will alarm and automatic control, so as to achieve a range of intelligent temperature monitoring. Based on the principle of the system, it is easy to make a variety of other nonlinear control system, so long as the software design is reasonable.

Key words:STC-89C52RC single chip microcomputer; temperature; time; DS18B20.

II

目 录

第一章 引言 .......................................................................................................................................... 4 第二章 设计要求 ................................................................................................................................. 5

2.1 基本要求 ........................................................ 5 2.2 扩展功能 ........................................................ 5 第三章 总体方案设计 ........................................................................................................................ 6

3.1 方案论证 ........................................................ 6

3.1.1 方案一 .................................................... 6 3.1.2 方案二 .................................................... 6 3.2 总体设计框图 .................................................... 6 第四章 硬件设计 ................................................................................................................................. 8

4.1 单片机系统 ...................................................... 8 4.2 STC89C52芯片特性 ............................................... 9

4.2.1简介: ..................................................... 9 4.2.2 主要特性: ............................................... 10 4.2.3 管脚说明: ............................................... 11 4.2.4 振荡器特性: ............................................. 13 4.2.5 芯片擦除: ............................................... 14 4.2.6 结构特点: ............................................... 14 4.3 数字温度传感器模块 ............................................. 14

4.3.1 DS18B20性能: ............................................ 14 4.3.2 DS18B20外形及引脚说明: .................................. 15 4.3.3 DS18B20接线原理图: ...................................... 15 4.3.4 DS18B20时序图: .......................................... 16 4.3.5 数据处理: ............................................... 17 4.4 DS18B20内部结构图: ........................................... 18 4.5 声光报警电路 ................................................... 19 4.6 键盘输入电路 ................................................... 20 第五章 软件设计 ............................................................................................................................... 21

5.1 主程序模块: ................................................... 21 5.2 读温度值模块: ................................................. 21 5.3 中断模块: ..................................................... 24 5.4 温度设定、报警模块: ........................................... 25 第六章 LCD1602模块 ....................................................................................................................... 26

6.1 液晶显示器 ..................................................... 26

6.1.1 液晶显示器简介: ......................................... 27 6.2 LCD1602简介: ................................................. 28

6.2.1 LCD1602的参数和引脚: .................................... 29 6.2.2 LCD1602的指令说明及时序: ................................ 31 6.2.3 LCD1602的一般初始化(复位)过程: ........................ 34

第七章 结论 ........................................................................................................................................ 36 附录:程序代码 ................................................................................................................................. 37 参考文献 ............................................................................................................................................... 52

3

第一章 引言

随着人们生活水平的不断提高,单片机控制无疑是人们追求的目标之一,它所给

人带来的方便是不可否定的,各种数字系统的应用也使人们的生活更加舒适。数字化控制、智能控制为现代人的工作、生活、科研等方面带来方便。其中数字温度计就是一个典型的例子。

数字温度计与传统的温度计相比,具有读数方便、测温范围广、测温精确、功能

多样话等优点。其主要用于对测温要求准确度比较高的场所,或科研实验室使用,该设计使用STC89C52单片机作控制器,数字温度传感器DS18B20测量温度,单片机接受传感器输出,经处理用LED数码管实现温度值显示。

随着电子技术和微型计算机的迅速发展,微机测量和控制技术也得到了迅速的发展和广泛的应用。利用微机对温度进行测控的技术,也便随之而生,并得到日益发展和完善,越来越显示出其优越性。

作为获取信息的手段——传感器技术得到了显著的进步,其应用领域较广泛。传感器技术已成为衡量一个国家科学技术发展水平的重要标志之一。因此,了解并掌握各类传感器的基本结构、工作原理及特性是非常重要的。

为了提高对传感器的认识和了解,尤其是对温度传感器的深入研究以及其用法与用途,基于实用、广泛和典型的原则而设计了本系统。本系统利用传感器与单片机相结合,应用性比较强,本系统可以作为仓库温度监控系统,如果稍微改装可以做热水器温度调节系统、实验室温度监控系统,以及构成智能电饭煲等等。课题主要任务是完成环境温度监测,利用单片机实现温度监测并通过报警信号提示温度异常。本设计具有操作方便,控制灵活等优点。

4

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库基于51单片机的温度报警系统设计 - 图文在线全文阅读。

基于51单片机的温度报警系统设计 - 图文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/979471.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: