1、 目 录 1 引言 4 2 正文 4 第 1 章 绪论 . 4 1.1 设计背景 . 4 1.2 设计来源 . 4 1.3 设计内容与要求 . 5 第 2 章 硬件电路设计 . 5 2.1 A T89S52 单片机 5 2.2 温度测量模块 6 2.3 蜂鸣器报警模块 . 6 2.4 LED 显示模块. 6 2.5 系统电路 . 7 第 3 章 软件设计 7 3.1 A T89S52 . 7 3.2 DS18B20. 8 第 4 章 焊接调试过程与问题分析 9 4.1 焊接调试过程 9 4.2 焊接实物图 10 第 5 章 总结 11 参考文献. 11 - 2 - 基于 DS18B20 的单片
2、机温度采集系统 x x xxxxxxxxxxxxxxxxxx 摘要:随着现代信息技术的飞速发展和传统工业改造的逐步实现,能够独立工作的温度检测与显示系统应用于诸多领域。传 统的温度检测以热敏电阻为温度敏感元件。热敏电阻的成本低,需要外加信号处理电路,而且可靠性相对较差,测温准确度 低,检测系统也有一定的误差。与传统的温度计相比,这次设计的是基于 DS18B20 的数字温度计,它具有读数方便,测温范 围广,测温精确,数字显示,适用范围宽等特点。 在本设计中选用 AT89S52 型单片机作为主控制器件,采用 DS18B20 数字温度传感器作为测温元件,通过 4 位共阳极 LED 数码显示管并行传送
3、数据,实现温度显示。本设计的内容主要分为两部分,一是对系统硬件部分的设计,包括温度采集电路 和显示电路;二是对系统软件部分的设计,应用 C 语言实现温度的采集与显示。通过 DS18B20 直接读取被测温度值,送入单 片机进行数据处理,之后进行输出显示,最终完成了数字温度计的总体设计。其系统构成简单,信号采集效果好,数据处理 速度快,便于实际检测使用。 关键词:单片机 AT89S52,温度传感器 DS18B20,LED 数码管,数字温度计 Abstract:With the rapid development of modern information technology and tradit
4、ional industrial transformation gradually realize, able to work independently temperature detection and display system applied to many fields. The traditional temperature detection to thermistors for temperature sensitive components. Thermistors of low cost, need and signal processing circuit, and r
5、elatively poor reliability, low temperature measurement accuracy, detection system also has the certain error. Compared with the traditional thermometer, this design is based on digital thermometer chip DS18B20, it has convenient readings, temperature measuring range, temperature measurement precisi
6、on, the digital display, wide application scope etc. Characteristics. In the design of AT89S52 single chip microcomputer as the main selection of control device, the digital temperature sensor DS18B20 as temperature sensor, through a total of 4 anode LED digital display tube parallel data transmission, realize temperature display. This design is the main content of the divided into two parts, one is the hardware part of the design, including the temperature acquisition circuit and display circui