没有合适的资源?快使用搜索试试~ 我知道了~
单片机的温度检测与控制系统设计.doc
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 98 浏览量
2022-07-07
23:15:08
上传
评论
收藏 291KB DOC 举报
温馨提示
试读
35页
单片机的温度检测与控制系统设计
资源推荐
资源详情
资源评论
摘要
本设计以 AT89S52 作为主控芯片,以电热水箱作为被控对象,通过单片机
系统设计实现对电热水箱的温度显示和控制功能。本温度控制系统是一个闭环
负反馈调节的控制系统。由温度传感器 DS18B20 对电热水箱温度进行检测,采
集被控对象的温度值,将采集到的温度用 LED 数码管显示出来,并将所得到的
温度值与设定的温度值进行比较得到偏差,运用 PID 算法对偏差信号进行运算
处理得到控制信号。由单片机一个引脚输出控制信号,将控制信号施加给继电
器,通过调节 PWM 波的占空比调节继电器的通断,达到控制电热水箱的平均
功率,来调节电热水箱的温度,实现电热水箱的温度显示和控制功能。
采用 AT89S52 单片机来对温度进行控制,不仅具有控制方便、组态简单和
灵活性大等优点,而且可以大幅度提高被控温度的技术指标,从而能够大大提
高产品的质量和数量。 因此,单片机对温度的控制问题是一个工业生产中经常
会遇到的问题。本次设计采用 AT89S52 系列单片机与各种外围电路构成单片机
温度自动检测和控制系统,实现对温度的实时检测和精确控制。
随着自动控制技术的发展,各种控制手段开始应用于温度控制,目前国内
外的温度控制方式越来越趋向于智能化。基于单片机以及基于微机的温度控制
取得了很快的发展。
本课题设计的适用范围广,灵活性强,稳定性好,测量精度较高,适合一
般环境下的温度测量,而且各项功能比较完备,充分发挥了集成温度传感器
DS18B20 的测温特性和单片机控制的优越性。
ABSTRACT
AT89S52 as the main chip design to electric water tank as the controlled
object, through the MCU system design and implementation of the electric
water tank temperature display and control functions. The temperature
control system is a closed-loop negative feedback control system. DS18B20
by the temperature sensor to detect the temperature of the heating water
tank, the temperature of the object and capture the value of the collected
temperature out with LED digital display, and the resulting temperature
and set temperature values are compared by bias, the use of PID algorithm
for computing the error signal processing by the control signal. A pin
from the microcontroller output control signal, the control signal
applied to the relay, by adjusting the duty cycle of PWM wave off the
relay adjustment, to control electric water tank of the average power
to regulate the temperature of heating water tank, electric water tank
to achieve temperature display and control functions.
AT89S52 microcontroller used to control the temperature, not only easy
to control, simple configuration and flexibility of big advantages, but
also can greatly improve the technical indicators accused of temperature,
which can greatly improve the quality and quantity. Therefore, the
microcontroller on the temperature control is often an industrial
production problems. The design uses AT89S52 MCU and a variety of
peripheral circuits SCM temperature automatic detection and control
system to realize real-time detection and precise temperature control.
With the development of automatic control technology, various control
methods began to be used temperature control, temperature control methods
at home and abroad tends to be more intelligent. Microcontroller-based
and PC-based temperature control achieved a rapid development.
The subject of the application of a wide range of design, flexibility,
good stability and high measurement precision for general environment
temperature measurements that functions in every aspect complete, full
use of Integrated Temperature Sensor DS18B20 the temperature
characteristics and SCM Kongzhi superiority.
Keywords: microcontroller; DS18B20; PID algorithm; temperature control
目录
1 绪论 .............................................................1
1.1 课题设计背景和目的 ...........................................1
1.2 国内外研究状况和发展趋势 .....................................1
1.3 本课题的内容安排 .............................................3
2 系统总体方案设计 .................................................4
2.1 系统硬件设计方案 ..............................................4
2.2 系统软件设计方案 ..............................................5
3 系统硬件设计 .....................................................6
3.1 芯片选择 ......................................................6
3.1.1 中央处理器................................................6
3.1.2 时钟电路设计 ..............................................6
3.1.3 复位电路的设计 ............................................7
3.2 温度测控的主要方法 ............................................8
3.2.1 温度的检测方法 ............................................8
3.2.2 温度的控制方法 ............................................8
3.2.3 数字温度传感器 DS18B20.....................................9
3.3 LED 显示 .....................................................12
3.4 键盘接口 ....................................................14
3.5 控制电路 ....................................................15
3.6 报警电路及保护电路 ...........................................17
3.7 电源电路 .....................................................17
3.8 通信电路设计 ................................................18
4 系统软件设计 ....................................................20
4.1 PID 计算程序 .................................................21
4.2 控制子程序 ...................................................23
4.3 键盘子程序 ...................................................24
结论 ..............................................................26
1
1 绪论
1.1 课题设计背景和目的
温度是工业生产中最常见和最基本的工业参数之一,是与人类的生活、工
作关系最密切的物理量,也是各学科与工程研究设计中经常遇到和必须精确测
量的物理量。从工业炉温、环境气温到人体温度;从空间、海洋到家用电器,
各个技术领域都离不开测温,测温技术也是发展最快、范围最广的技术之一,
对温度的进行准确的测量和控制也成为工业生产和科学研究中的重要任务之一。
而随着电子技术和计算机技术的迅速发展,特别是单片微机的发展,使传
统的测量仪器在原理,功能,精度及自动化水平等方面发生了巨大的变化,使
很多的传统电子仪器被相应的全新的仪器类型和测试系统体系所代替。在科学
技术高速发展的今天,如何用简单便宜,性能良好的元器件制造出对人类生活
有用的产品,已经成为人们研究的主要趋势。
采用 AT89S52 单片机来对温度进行控制,不仅具有控制方便、组态简单和
灵活性大等优点,而且可以大幅度提高被控温度的技术指标,从而能够大大提
高产品的质量和数量。 因此,单片机对温度的控制问题是一个工业生产中经常
会遇到的问题。本次设计采用 AT89S52 系列单片机与各种外围电路构成单片机
温度自动检测和控制系统,实现对温度的实时检测和精确控制。通过本次设计
掌握温度检测控制系统的硬件设计方法和软件编写方法,熟悉 Protel、KeiC51
等软件的使用方法。在巩固所学知识的同时,将理论知识和实际应用联系了起
来,提高了运用知识的能力和动手能力。
1.2 国内外研究状况和发展趋势
国内外工业的日益发展,直接推动了温度检测技术和控制技术的进步。目
前的温度检测技术原理很多,大致包括以下几种:(1)物体热胀冷缩原理 (2)热电
效应 (3)热阻效应 (4)利热辐射原理。测温仪器由温度传感器和信号处理两部分
组成。温度测量的过程就是通过温度传感器将被测对象的温度值转换成电的或
其它形式的信号,传递给信号处理电路进行信号处理转换成温度值显示出来。传
统的温度传感器有热电偶传感器、铂金属传感器、双金属开关传感器等。它们
剩余34页未读,继续阅读
资源评论
老帽爬新坡
- 粉丝: 83
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功