当前位置:文档之家› (完整版)数字温度计论文毕业设计论文

(完整版)数字温度计论文毕业设计论文

数字温度计的设计摘要温度是一种最基本的环境参数,人们生活与环境温度息息相关,在工业生产过程中需要实时测量温度,在工业生产中也离不开温度的测量,因此研究温度的测量方法和控制具有重要的意义。

本论文介绍了一种以单片机为主要控制器件,以DS18B20为温度传感器的新型数字温度计。

主要包括硬件电路的设计和系统程序的设计。

硬件电路主要包括主控制器,测温控制电路和显示电路等,主控制器采用单片机AT89C52,温度传感器采用美国DALLAS半导体公司生产的DS18B20,显示电路采用8位共阴极LED数码管,ULN2803A为驱动的动态扫描直读显示。

测温控制电路由温度传感器和预置温度值比较报警电路组成,当实际测量温度值大于预置温度值时,发出报警信号,即发光二极管亮。

系统程序主要包括主程序,测温子程序和显示子程序等。

DS18B20新型单总线数字温度传感器是DALLAS 公司生产的单线数字温度传感器, 集温度测量和 A D转换于一体,直接输出数字量,具有接口简单、精度高、抗干扰能力强、工作稳定可靠等特点。

由于采用了改进型智能温度传感器DS18B20作为检测元件,与传统的温度计相比,本数字温度计减少了外部的硬件电路,具有低成本和易使用的特点。

DS18B20温度计还可以在高温报警、远距离多点测温控制等方面进行应用开发,具有很好的发展前景。

此外,还介绍了系统的调试和性能分析。

关键词:显示电路,单片机,AT89C52,温度传感器,DS18B2 0 ,单总线The Design of DS18B20 Digit ThermometerABSTRACTTemperature is a basic parameters of the environment, people's lives and the environment are closely related to temperature. in the course of industrial production immediate need for temperature measurement in industrial production of the of the system program .The , the master controller used Micro Controller Unit AT89C52, the temperature sensor used DS18B20 which the American DALLAS semiconductor company produces, the display circuit used 8 altogetheranodes LED numerical code tube by the dynamic scanning method straight to read the demonstration.ULN2803A-driven dynamic scan showed straight time. Temperature control circuit from temperature sensors and preset temperature value compared alarm circuit components, When measured temperature greater than preset temperature value, issued warning signal that the bright light emitting diodes. The system program mainly included the master routine, the temperature subroutine, the data renovates subroutine and so on. DS18B20 is a digital temperature sensor of single bus .It is producted by DALLAS cooperation . DS18B20 assembles temperature measure and A D converter, exports digital signal directly, operation easily, better precise, protecting disturb, running steably and so on.Because used the advanced version intelligence tem perature sensor DS18B20 as the examine part, compared with the traditional thermometer, this digital thermometer reduced the exterior temperature control carries on the application development, addition, introduced the system debugging and the performance analysis.KEY WORDS: Display Circuit, Microcontroller Unit , AT 89C52,Temperature Sensor, DS18B20,1-Wire目录前言................................................................................................第1章设计任务及方案分析...........................................................§1.1 设计任务及要求................................................................§1.2 设计总体方案及方案论证................................................§1.3 温度测量的方案与分析....................................................§1.3.1 芯片选择...................................................................§1.3.2 实现方法简介...........................................................§1.3.3 测温流程图...............................................................第2章芯片功能简介 ......................................................................§2.1 AT89C52的功能简介........................................................§2.1.1 AT89C52芯片简介 ...................................................§2.1.2 引脚功能说明...........................................................§2.2 DS18B20的功能简介 ........................................................§2.2.1 芯片简介...................................................................§2.2.2 DS18B20外形和内部结构........................................§2.2.3 DS18B20的工作时序 (1)§2.2.4 DS18B20与单片机的典型接口设计 (1)§2.2.5 DS18B20的各个ROM命令 (1)第3章系统硬件电路的设计 (1)§3.1 主控制电路和测温控制电路原理图 (1)§3.2 驱动电路模块原理图 (1)§3.3 显示模块原理图 (1)第4章软件编程调试及性能分析 (1)§4.1 主程序流程图 (1)§4.2 主程序 (1)§4.3 温度子程序 (2)§4.3.1 DS18B20复位子程序 (2)§4.3.2 读DS18B20子程序 (2)§4.3.3 写DS18B20子程序 (2)§4.3.4 比较报警子程序 (2)§4.3.5 按键子程序 (2)§4.4 显示子程序 (2)§4.5 调试性能分析和注意事项 (2)§4.5.1 调试性能分析 (2)§4.5.2 DS18B20使用中的注意事项 (3)结论 (3)参考文献 (3)致谢 (3)附录 (3)前言日常生活及工农业生产中经常要用到温度的检测及控制,在冶金、食品加工、化工等工业生产过程中,广泛使用的各种加热炉、热处理炉、反应炉等,都要求对温度进行严格控制。

在日常生活中,电烤箱、微波炉、电热水器、烘干箱等电器也需要进行温度检测与控制。

传统的测温元件有热电偶和热电阻。

而热电偶和热电阻测出的一般是电压,再转换成对应的温度,需要比较多的外部硬件支持,硬件电路复杂,软件调试复杂,制作成本高。

而采用单片机对温度进行控制,不仅具有控制方便,简单和灵活等优点,而且可以大幅度提高温度控制的技术指标。

测量温度的关键是温度传感器,温度传感器正从模拟式向数字式、从集成化向智能化、网络化的方向发展。

在测温电路中,可以使用热敏电阻之类的器件利用其感温效应,将随被测温度变化的电压或电流采集过来,先进行AD转换,然后用单片机进行数据的处理,再在显示电路上,将被测温度显示出来。

这种设计需要用到AD转换电路,因此感温电路的设计比较复杂。

相关主题