温度传感器应用设计2



《温度传感器应用设计2》由会员分享,可在线阅读,更多相关《温度传感器应用设计2(30页珍藏版)》请在文档大全上搜索。
1、编号: 传感器综合设计实训实训(论文)说明书题 目: 温度传感器应用设计温度传感器应用设计 院 (系): 信息与通信学院 专 业: 电子信息工程 学生姓名: 学 号: 指导教师: 王守华、童有为、李秀东、 归发弟、胡机秀 2012 年 7 月 4 日 摘要随着现代信息技术的飞速发展和传统工业改造的逐步实现,能够独立工作的温度检测与显示系统应用于诸多领域。传统的温度检测以热敏电阻为温度敏感元件。热敏电阻的成本低,需要外加信号处理电路,而且可靠性相对较差,测温准确度低,检测系统也有一定的误差。数字温度计是一种利用数字显示温度的装置,与传统的水银温度计相比,它具有测温准确,显示直观等优点,因而得到了
2、广泛的应用。本文的设计主要是基于 DS18B20 的数字式温度传感器,它具有读数方便,测温范围广,测温精确,数字显示,适用范围宽等特点。本文的设计以 STC89C52 单片机为主控制器,采用 DS18B20 数字温度传感器作为测温元件,采用 1602LCD 液晶显示模块,它是一种可编程的器件,实现温度显示。本次的设计分为两个模块:一是硬件设计,包括温度采集电路、显示电路以及报警电路;二是对系统软件部分的设计,应用汇编语言实现温度的采集与显示。通过 DS18B20 直接读取被测温度值,送入单片机进行数据处理,之后进行输出显示,最终完成了数字温度计的总体设计。其系统构成简单,信号采集效果好,数据处
3、理速度快,便于实际检测使用。关键词关键词:STC89C52;DS18B20;1602LCD 液晶显示;蜂鸣器; Abstract With the rapid development of modern society, swift development and traditional industry transformations gradual realization. Able to work independently of the temperature detection and display system used in many other fields. Traditi
4、onal temperature examination take thermistor as temperature sensitive unit. Thermistors cost is low, needs the sur- signal processing electric circuit, moreover the reliability is relatively bad, the temperature measurement accuracy is low, the examination system also has certain error.Digital therm
5、ometer is a device with digital display of temperature, compared with the conventional mercury thermometer, it has a temperature measurement accuracy, visual display, etc., which have been widely used. This design is mainly based on the digital temperature sensor DS18B20. It has convenient readings,
6、 temperature measuring range, temperature measurement precision, the digital display, wide application scope etc. Characteristics. This paper designed to STC89C52 single chip computer is used as controller, the digital temperature sensor DS18B20 as temperature sensor, using 1602 LCD module. It is a
7、programmable devices, realize temperature display. This design is divided into two modules: one is the hardware design, including the temperature acquisition circuit and display circuit. The second part of the design of the system software, application assembly language realize the collection of tem
8、perature and display. Through the DS18B20 directly read temperature being measured, into the single chip microcomputer data processing. After the output shown, eventually completed the overall design of digital thermometer. The system structure is simple, signal acquisition effect is good, data proc
9、essing speed, and it is easy to use the actual detection.Key words: STC89C52 ;DS18B20;1602 LCD;Duzzer 桂林电子科技大学实训(论文)报告用纸 第 0 页 共 1 页 目 录引言 .11 绪论 .11.1 课题背景 .11.2 课题设计的目的及意义 .21.3 技术要求及指标 .22 硬件基础知识及设计思路介绍 .32.1 MCS-52 单片机的总体结构.32.1.1 MCS-52 单片机包含的功能部件:.32.2 温度采集电路的设计 .42.2.1 DS18B20 内部结构.42.2.2 DS1
10、8B20 测温原理.42.3 温度显示电路的设计 .52.4 时钟控制电路.62.5 按键控制电路.72.6 复位电路 .72.7 蜂鸣器电路.73 系统软件设计 .83.1 主程序.83.2 读出温度子程序.83.3 显示子程序 .83.4 报警子程序 .94 系统调试 .95 结论 .10谢辞 .12参考文献 .13附录 .14附录 1:整体电路原理图.14附录 2:PCB 排版图 .15附录 3:整体程序.16 桂林电子科技大学实训(论文)报告用纸 第 0 页 共 25 页 引言 DS18B20 是美国 DALLAS 公司生产的一线式数字式温度计芯片,它具有结构简单,不需外接元件,采用一
11、根 I/ O 数据线既可供电又可传输数据、并可由用户设置温度报警界限等特点,可广泛用于食品库、冷库、粮库等需要控制温度的地方。DS18B20 是DS1820 的改进型产品,但该产品具有比 DS1820 更好的性能,目前,该产品已成为 DS1820的替代品而在温控系统中得到广泛的应用.它是支持 “一线总线”接口的温度传感器,在其内部使用了在板(ON-B0ARD)专利技术。测量温度范围为-55C+125C,在-10+85C 范围内,精度为0.5C。现场温度直接以“一线总线”的数字方式传输,大大提高了系统的抗干扰性。适合于恶劣环境的现场温度测量,如:环境控制、设备或过程控制、测温类消费电子产品等。D