电子数显温度计控制器 - 图文 下载本文

江苏城市职业学院南通办学点

江苏城市职业学院

毕业设计(论文)

(2015届)

设计(论文)题目 电子数显温度计控制器

办 学 点 (系) 南通办学点 专班学学指指

生导导

姓教教

业 机电一体化 级 10机电1 号 1033010126 名 张炜铭 师 吴长贵 职称 讲师 师 周建锋 职称 高工

年 月 日

I

江苏城市职业学院南通办学点

摘 要

本系统是基于AT89S51单片机的温度计控制器。以51系列单片机作为控制核心,由DS18B20温度采集模块、供电模块和数码管显示器构成。

由程序控制AT89S51对DS18B20收集到的温度信息进行处理,通过单片机的I/O口将温度信息进行输出,所产生的是温度信息相对应的电流,然后进行模数转换,得到相对应的温度值。此外,温度的测量范围可以设置一个区间来实时监控,超出设定范围就会发出警报声。

系统可以实现温度的实时测定,具有效率高、准确性高等优点。温度测量误差控制在1%以内,通过程序编写,可以改变温度测定范围,可应用于日常温度测定和工业中的温度测定。

关键词:AT89S51;最小系统; DS18B20;数码管

II

江苏城市职业学院南通办学点

Abstract

This system is a thermometer controller based on AT89S51 mcu. With 51 series single chip microcomputer as control core, by the DS18B20 temperature acquisition module, power supply module and digital tube display form.

By AT89S51 on the DS18B20 program control temperature information collected for processing, through the MCU and I/O port will output the temperature information is generated by the current temperature information corresponding to the analog to digital conversion, and then obtain the corresponding temperature values. In addition, temperature measurement range can be set to an interval to real-time monitoring, exceeds the set range can send out alarm sound.

Real time measurement system can achieve the temperature, with high efficiency, has the advantages of higheraccuracy. Temperature measurement error is controlled within 1%, through programming, can change thetemperature measurement range, can be applied to determination of daily temperature and the temperature measurement in industry.

Keywords: AT89S51; minimum system; DS18B20; digital tube

III

江苏城市职业学院南通办学点

目 录

摘 要 .................................................................... II Abstract ................................................................ III 1 绪论 .................................................................... 1

1.1选题意义 ........................................................... 1 1.2 国内外现状及水平 .................................................. 1 1.3 论文实现目标 ...................................................... 2 2 系统的功能要求 .......................................................... 3

2.1系统功能要求 ....................................................... 3 2.2 系统的技术要求 .................................................... 3 2.3 系统的组成及方案设计 .............................................. 3 3 系统的硬件设计 .......................................................... 4

3.1 单片机的IO口概述 ................................................ 4 3.2 单片机最小系统 .................................................... 5

3.2.2 时钟电路 ..................................................... 5 3.2.3 单片机的复位状态 ............................................. 6 3.2.4振荡电路 ..................................................... 7 3.3 电源供电模块 ...................................................... 8 3.4 DS18B20温度采集模块 ............................................... 8

3.4.1 DS18B20传感器工作原理 ....................................... 9 3.5 数码显示模块 ..................................................... 10 4 软件部分设计 ........................................................... 11

4.1 主程序 ........................................................... 11 4.2 读温度子程序 ..................................................... 11 4.3计算温度子程序 .................................................... 12 5 调试及设计分析 ......................................................... 13 结论 ..................................................................... 14 致谢 ..................................................................... 15 参考文献 ................................................................. 16 附录: ................................................................... 17

设计电路图 ........................................................... 17 设计程序 ............................................................. 17

IV