【精品】基于单片机控制的温度控制器.doc
文本预览下载声明
电子与信息工程学院
本 科 毕 业 论 文
论文题目基于单片机控制的温度控制器设计
学生姓名 杨铭
学 号 083522061
专 业 电气工程及其自动化
班 级 083521
指导教师 邓方雄
2012年5月
摘 要
基于单片机的温度控制器,采用 DS18B20 温度传感器采集所要测量的当前环境的温度,通过单片机进行处理并加以显示。该温度控制器具有设定温度上下限的功能,超限报警功能以及置位复位功能,并且可以通过控制继电器控制外部加热装置及制冷装置,从而实现环境温度处于设定温度上下限范围内。显示时具有显示当先温度、温度上限值、温度下限值的功能。本设计不仅拟定了基本原理及设计方案,而且进行了proteus仿真操作并制作出了实物电子产品。这种温度控制器原理简单、功能齐全、价格便宜,已得到广泛应用。
关键词:单片机DS18B20;继电器;加热装置;制冷装置
ABSTRACT
The Microcontroller-based temperature controller use the DS18B20 to collect temperature data of the current environment, then the data will be processed and displayed by the microcontroller. The temperature controller can set the upper and lower limits, alarm when it run out of the limit, have a set and reset device, and can control a relay to control external heating device and cooling device in order to ensure the temperature is within the range of upper and lower limit. It can show the current temperature, temperature’s upper limit,and lower limits. This design not only drew up the basic principles and design, but also carry on proteus simulation and produce a electronic products. The temperature controller has an simple principle, full function, it’s very cheap, and has been widely used.
KEY WORDS: Microcontroller; DS18B20; Relay; Heating device; Cooling device
目 录
1 绪论 1
1.1 本课程设计的设计背景 1
1.2 本课程设计的主要内容和意义 1
2 整体方案设计 3
2.1 整体方案 3
2.1.1 系统分析 3
2.1.2 系统功能划分 3
2.2 方案的选择 3
2.2.1 机型器件选择 3
2.2.2 软件程序方案选择 4
3 硬件设计 5
3.1 时钟电路和复位电路设计 5
3.2 按键电路设计 6
3.3 蜂鸣器报警电路设计 7
3.4 继电器控制加热电路设计 7
3.5 继电器控制制冷电路设计 9
3.6 温度采集电路设计 10
3.7 LED数码管显示电路设计 13
4 系统软件程序设计 15
4.1 主程序设计 15
4.2 中断子程序设计 17
5 系统调试 19
5.1 硬件调试 19
5.2 Proteus仿真 19
5.3 软件硬件联调 22
6 结论与展望 23
致谢 25
参考文献 26
附 录 27
附录1 本设计原理图 27
附录2 本设计实物图 28
附录3 主程序 31
即可):
绪论
本课程设计的设计背景
温度是工业生产中常见的工艺参数之一,任何物理变化和化学反应过程都与温度密切相关,因此温度控制是生产自动化的重要任务。例如:在农业温室大棚生产、冶金工业、化工生产、电力工程、造纸行业、 加热炉、热处理炉、反应炉和对锅炉中的温度进行检测和控制。可以毫不夸张的说,温度控制应用于我们日常生活中的方方面面,在我们的生产生活
显示全部