多功能空气温湿度计外文翻译_第1页
多功能空气温湿度计外文翻译_第2页
多功能空气温湿度计外文翻译_第3页
多功能空气温湿度计外文翻译_第4页
多功能空气温湿度计外文翻译_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、浙江师范大学本科毕业设计 ( 论文) 外文翻译译文:基于 DSl8B20 的多点温度测量系统设计 摘要:介绍一种基于数字温度传感器芯片 DSl8B20 的高精度、多点温度测量系统设 计方案;阐述单总线数字温度传感器 DSl8B20 的基本工作原理和使用方法;主要分 析由多个 DSl8B20组成的温度传感器网络的自动搜索算法,井给出系统设计实例。 关键词:温度测量 数字温度传感器 单线总线 搜索算法引言在传统的温度测量系统设计中,往往采用模拟技术进行设计,这样就不可 避免地遇到诸如引线误差补偿、 多点测量中的切换误差和信号调理电路的误差等问 题;而其中某一环节处理不当,就可能造成整个系统性能的下

2、降。随着现代科学技 术的飞速发展,特别是大规模集成电路设计技术的发展,微型化、集成化、数字化 正成为传感器发展的一个重要方向。美国 Dallas 半导体公司推出的数字温度传感 器 DSl8820,具有独特的单总线接口,仅需要占用一个通用 I/O 端口即可完成与微 处理器的通信; 在一 10+85温度范围内具有 O5精度;用户可编程设定 9 12位的分辨率。以上特性使得 DSl8820非常适用于构建高精度、 多点温度测量系统。1 DSl8B20 简介11 DSl8B20 的特点DSl8B20 是美国 Dallas 半导体公司继 DSl820 之后最新推出的一种改进型 智能数字温度传感器。与传统的

3、热敏电阻相比,它能够直接读出被测温度,并且可 根据实际要求通过编程实现 912 位的数字值读数方式; 可以分别在 9375ms和 7 5O ms内完成 9 位和 12位的数字量;从 DSl8B20读出信息或写入 DSl8B20信息仅需 要 1 根口线 ( 单线接口 ) ;温度变换功率来源于数据总线,总线本身也可以向所挂接 的 DSl8B20 供电,而无需额外电源。使用 DSl8B20可使系统结构更趋简单,可靠性 更高。DSl8B20在测温精度、转换时间、传输距离、分辨率等方面较 DSl820 有了很 大的改进。12 DSl8B20 内部结构及工作原理DSl8B20 的内部结构如图 1 所示,主

4、要包括寄生电源电路、 64 位只读存储 器(ROM)和单线接口、存储器和控制逻辑、存放中间数据的高速暂存存储器、温度 传感器、报警上限寄存器 TH、报警下限寄存器 TL、配置寄存器和 8位 CRC(循环冗 余校验码 )发生器。19本科毕业设计(论文)外文翻译DSl8B20 的核心是其数字温度传感器,精度可以通过用户编程配置为 9、10、l l 和 12 位,其分别对应于 05、O,25、O125和 0062 5 ,可以满足各 种不同的分辨率要求。开始一次温度转换时,微处理器需要向 DSl8820 发出 Conve rt T 指令。转换完成之后, 该温度数据存放在高速暂存存储器的温度寄存器中,

5、占 用 2 字节,并且 DSl8820 返回到空闲状态。当 DSl8820 采用外部供电方式时,主机 可以在发送温度转换指令后发起一次读时隙。 若此时该 DSl8820 已经完成温度转换, 它将会返回“ 1”,否则返回“ 0”。2温度测量系统设计由 DS18B20和美国 Microchip 公司推出的 PIC 单片机 PICl8F8620 以及相 关外围电路组成的高精度、多点温度测量系统的结构框图如图 2 所示。系统采用 6 片 DSl8B20 构成小型温度传感器网络,通过单线连接方式连接至微处理器的通用IO端口 RB0。其中 DSl8B20的分辨率为 11 位模式,即 O125。微处理器通过

6、单 线协泌与温度传感器网络实现通信。微处理器获得温度信息后,通过特定的算法, 将处理后的温度信息通过 USB 口或 RS485 接口传送至上位机。20本科毕业设计(论文)外文翻译2.1 DSl8B20 的自动搜索算法由于系统中使用了多片 DS18B20构成温度传感器网络, 因此,如何准确、 有效 地对每一温度传感器进行寻址成为该系统设计的一个核心问题。 结合 DS18B20的实 际特点和系统的需求,提出如下解决方案:首先利用 DS18B20的内部报警上限寄存 器(如图 1所示,以下简称“ TH寄存器”)存放温度传感器的编号,并将其编号贴在 温度传感器表面。由于 TH寄存器具有掉电不丢失数据功能

7、,因此,便把每片 DSl8 B20的唯一 64 位注册码及其编号一一对应起来。 这一过程需要对 DSl8B20进行单独 编程。然后,将确定好编号的温度传感器接入单线网络,利用DSl8B20 特有的单线网络自动搜索功能,即可搜寻到每片 DSl8B20 的注册码,再利用该注册码和相应的 ROM操作指令,即可从每片 DSl8820 的 TH寄存器中读出相应的设定编号, 实现每片 DS18B20的寻址功能。下面重点介绍一下该自动搜索功能。每片 DS18B20有唯一的 64位注册码,存储在只读存储器 (ROM)中,其结构如下 :其中低 8位是产品的工厂代码 (DSl8B20(1 为 28H),接着是每个

8、器件的唯一序号, 共 48 位,最高 8 位是前 56 位的循环冗余校验码。这就准许总线主机对总线上特定 的 DS18B20进行寻址。 只有与 64 位注册码严格相符的 DSl8B20,才能对后续的操作 作出反应。所有与 64 位注册码不符的 DSl8B20将等待复位脉冲。搜索算法首先通过复位和在线应答脉冲时隙将单线总线上的所有DS18B20复位。成功地执行该操作后发送 1 字节的搜索命令,使所有连接到单总线的 DSl8B20 准备就绪,开始进行搜索操作。搜索命令发出之后,开始实际的搜索过程。首先,总线上的所有 DSl8B20同时发送注册码中的第 1 位(最低有效位, 参见上 述 DS18B2

9、0内部 64 位注册码结构 ) 。按照单总线的特性,当所有 DS18B20同时应答 主机时,结果相当于全部被发送数据位的逻辑“与”。 DSl8B20 发送其注册码的第 1 位后,主机启动下一位操作,接着 DS18B20发送第 l 位数据的补码。从两次读到 的数据位可以对注册码的第 1 位作出几种判断,如表 1 所列。21本科毕业设计(论文)外文翻译然后,主机向总线上的所有器件发回一个指定位。如果 DSl8B20 巾注册码的当 前位的值与该数据位匹配, 则继续参与搜索过程; 若 DS18B20的当前位与之不匹配, 则该器件转换到等待状态并保持等待状态,直到下一个复位信号到来。其余 63 位 注册

10、码的搜索依然按照这种读 2 位写 1位的模式进行重复操作。 按照这种搜索算法 进行下去,最终除了唯一一个 DSl8B20外,所有 DS18B20将进入等待状态,经过最 后一轮检测就可得到最后保留未进入等待状态的 DSl8B20的注册码。 在后续搜索过 程中选用不同的路径或分支来查找其他器件的注册码, 即可完成所有器件注册码的 识别。2 2 软件系统设计系统软件采用 C语言编写。在中断服务程序中,实现用户输入以及和上位 机的接口功能;在主程序中,实现温度传感器网络的自动搜索、编号排序、获取温 度信息,并根据预先设定的温度上下限,实现相应的报警功能。该系统中,根据不 同的分辨率要求, DSl8B2

11、0的分辨率可通过编程设定, 最高分辨率为 12位,即 00 625,可满足高精度设计要求。同时,由于设计中使用传感器网络的自动搜索算 法,因此,当对网络中的温度传感器作出调整 ( 如更换、添加、删除等操作 ) 时,系 统具有很强的自适应能力。系统软件流程如图 3 所示。22本科毕业设计(论文)外文翻译3结论在传统的温度测量系统中, 往往采用模拟的温度传感器进行设计, 必须经过 A/D 转换后才可以被微处理器识别和处理。 这样的设计方法不仅对前端模拟信号处理电 路提出了更高的要求,而且不具有数字通信和网络功能。本文结合DSl8B20 的新特性和现代温度测量系统提出的新要求, 提出了基于智能数字温

12、度传感器 DSl8B20的 高精度、多点温度测量系统设计方案。该方案具有安装方便、数字化程度高、精度 高、适应性强等特点,在多种温度检测中具有广阔的应用前景。23本科毕业设计(论文)外文翻译原文:DSl8B20-based multi-point temperature measurementsystem designJiang Hong-yu Wang Yong Zhi YongSichuan University Microcontroller and Embedded SystemsAbstract: A digital temperature sensor chips based on

13、 high-precision DSl8B20, multi-point temperature measurement system design; the single-bus digital temperature sensor DSl8B20 the basic working principle and use; principal component analysis by a number of temperature sensors DSl8B20 Automatic network search algorithm, well give examples of system

14、design.Key words: temperature measurement single-bus digital temperature sensor search algorithm IntroductionTemperature measurement in the traditional system design, simulation techniques are often used to design, so that, inevitably, encountered error compensation, such as lead, multi-point measur

15、ement error in the switching and signal conditioning circuits, such as the problem of error; one of the aspect of a deal misconduct, it may cause a decline in the overall system performance. Modern science and technology with the rapid development, especially large-scale integrated circuit design te

16、chnology, miniaturized, integrated, digital sensors are becoming an important direction of development. Dallas Semiconductor has introduced the United States the number of temperature sensors DSl8B20, has a unique single-bus interface, only need to occupy a common I / O port to complete the communic

17、ation with the microprocessor; one at 10 +85 temperature range with O. 5 accuracy; 9 user programmable settings to 12 bit resolution. The above characteristics make DSl8B20 very applicable to building a high-precision, multi-point temperature measurement system.1DSl88B20 brief introduction1.1 Charac

18、teristics of DSl8B20Dallas Semiconductor DSl8B20 companies are following the United States after DSl820 a new improved version of intelligent digital temperature sensor. And compared to the traditional thermistor, which can directly read the measured temperature, and can be programmed according to t

19、he actual requirements of implementation of the 9-figure value of 12 readings of the way; 93.75ms, respectively, and 75O ms to complete 9 and figure the amount of 12; DSl8B20 read from or write information DSl8B20 only information I need one line (one-way interface); temperature transform power from

20、 the data bus, the bus itself can also be mounted to the power supply DSl8B20 without the need for additional power. DSl8B20 system architecture allows the use of more simple, more reliable. DSl8B20 in the temperature measurement accuracy, conversion time, transmission distance, resolution and so mu

21、ch more DSl820 improvements.1.2 DSl8B20 internal structure and working principleDSl8B20 internal structure as shown in Figure 1, including parasitic power circuit, a 64-bit read-only memory (ROM) and one-way interface, memory and control logic, storage of data between24本科毕业设计(论文)外文翻译high-speed tempo

22、rary storage, temperature sensors, alarm ceiling registers TH, lower limit alarm registers TL, configuration registers and 8-bit CRC (cyclic redundancy check code) generator.FIG. 1 DSl8820 diagram of the internal structureDSl8B20 is the core of its digital temperature sensors, precision can be progr

23、ammed through the user configuration for 9,10, ll and 12, respectively, corresponding to 0.5, O, 25 , O. 125 ,and 0.062 5 , to meet the requirements of a variety of resolutions. Start a temperature conversion, the microprocessor DSl8B20 required to issue a Convert T command. Conversion is complete,

24、the temperature data stored in the temperature of high-speed temporary storage register, the occupier of 2 bytes, and return to DSl8B20 free status. When DSl8B20 external power supply, the host can send the temperature conversion command to initiate a read time slot. If at this time the temperature

25、DSl8B20 conversion has been completed, it will return 1, otherwise return 0.2 temperature measurement system designDS18B20 and the United States by the introduction of Microchips PIC single-chip companies and related peripheral circuits PICl8F8620 composed of high-precision, multi-point temperature

26、measurement system block diagram shown in Figure 2. 6 DSl8B20 system constitute a small temperature sensor network through a single cable connected to the microprocessors general-purpose I / O port RB0. DSl8B20 a resolution of one of the 11 model, that is, O. 125 . Secretion throughthe one-way Assoc

27、iation microprocessor and temperature sensor network implementation of communication. Temperature of the microprocessor to obtain information through a specific algorithm, to deal with the temperature of information after the mouth or through the USB interface RS485-bit machine to send first.25本科毕业设

28、计(论文)外文翻译FIG.2 Block diagram of temperature measurement system2.1 DSl8B20 automatic search algorithmSystem because of the use of multi-chip temperature sensor network DS18B20 constitute, therefore, how to accurately and effectively addressing each of the temperature sensors in the system design to b

29、ecome a core issue. DS18B20 combining the actual features and system requirements, the following solution: First, the internal alarm DS18B20 ceiling register (as shown in Figure 1, hereinafter referred to as TH register) kept the number of temperature sensors and ID attached to the temperature senso

30、r surface. TH register because of missing data does not have a power-down function, so each DSl8B20 then the only 64-bit code and the number-one correspondence with. This process required a separate program to DSl8B20. And, will determine the number of good one-way network access temperature sensors

31、, the use of specific DSl8B20 single network auto search function, you can search the key DSl8B20 each, and then make use of the ROM code and the corresponding operating instructions, can be from DSl8B20 each of the TH register set to read out the corresponding number of implementation each addressi

32、ng DS18B20. Highlight the following about the automatic search function.DS18B20 each have only 64-bit code stored in read-only memory (ROM) in one of the low 8-bit products are Factory code (DSl8B20(1 to 28H), Its structure is as follows:followed by the Unique Serial Number for each device, A total

33、of 48, the maximum is eight of 56 before the cyclic redundancy check code. This is permitted on the bus on the host bus specific to addressing DS18B20. 64 License only and strictly in line with the DSl8B20, can follow-up to respond to the operation. all with 64-bit code will not wait for the reset p

34、ulse DSl8B20.First of all search algorithms and online responses through the reset pulse on time slot will be all one-way bus reset DS18B20. Successful implementation of this operation to send one byte after the base drive and making the base voltage slightly negative (within VBE(max). The saturatio

35、n voltage26本科毕业设计(论文)外文翻译search order, so that all connect to a single bus DSl8B20 ready to start the search operation. Search order after the actual start of the search process.First of all, the bus simultaneously sent to all key DSl8B20 the first one (least significant bit, see the above-mentioned

36、 64-bit code DS18B20 internal structure). In accordance with the characteristics of single-bus, when all the host response DS18B20 simultaneously, the results were equivalent to the logic of sending data bit and. License DSl88B20 sent its first one, the host to start the next operation, then the fir

37、st l Send DS18B20-bit data of complement. Read the data from the two-bit code can be the first one to make some judgments, such as listed in Table 1.Table 1 The number of data bits to determineAnd, host to all the devices on the bus back to a designated place. If the current DSl8B20 towel-bit key va

38、lue and the data bits match, then continue to be involved in the search process; if the current position with the DS18B20 does not match, the device transition to Wait for Wait for status and maintain status until the arrival of a reset signal . The remaining 63 search code is still read 2 According

39、 to this Writing a duplicate operation mode. According to this search algorithm to continue, eventually the only one apart from DSl8820, all DS18B20 will enter a wait state, after the last round of testing can not enter the final to retain the status DSl8B20 Wait for the key. At follow-up search or

40、choose a different path to find other branches of the key components to complete the identification code for all devices.2.2 Software System DesignSystem software using C language. In the interrupt service routine, the user input as well as the implementation and interface functions of the PC; in the main program, the temperature sensor network implementation of the automatic search, sort code, to obtain the temperature information, and in accordance with pre-set upper and lower limits of temperature, the corres

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论