登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 外文翻译 > 理工学类 > 电气工程及其自动化 > 正文

基于Proteus的数字温度监控系统仿真研究外文翻译资料

 2022-12-10 04:12  

DS18B20 Single - wire temperature sensor

I. FEATURES

● Unique 1-Wireinterface requires only one port pin for munication ● Each device has a unique 64-bit serial code stored in an onboard ROM
● Multidrop capability simplifies distributed temperature sensing applications ● Requires no external ponents
● Can be powered from data line. Power supply range is 3.0V to 5.5V
● Measures temperatures from –55°C to 125°C (–67°F to 257°F) 0.5°C accuracy from –10°C to 85°C
● Thermometer resolution is user-selectable from 9 to 12 bits
● Converts temperature to 12-bit digital word in 750ms (max.)
● User-definable nonvolatile (NV) alarm settings
● Alarm search mand identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)
● Available in 8-pin SO (150mil), 8-pin SOP, and 3-pin TO-92 packages
● Software patible with the DS1822
● Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive

II. DESCRIPTION

The DS18B20 Digital Thermometer provides 9 to 12–bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 municates over a 1-Wire bus that by definition requires only one data line (and ground) for munication with a central microprocessor. It has an operating temperature range of –55°C to 125°Cand is accurate to 0.5°C over the range of –10°C to 85°C. In addition, the DS18B20 can derive power directly from the data line (―parasite power‖), eliminating the need for an external power supply.

Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1–wire bus; thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HVAC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.

III. OVERVIEW

Figure 1 shows a block diagram of the DS18B20, and pin descriptions are given in Table 1. The 64-bit ROM stores the devicersquo;s unique serial code. The scratchpad memory contains the 2-byte temperature register that stores the digital output from the temperature sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (TH and TL), and the 1-byte configuration register. The configuration register allows the user to set the resolution of the temperature-to-digital conversion to 9, 10, 11, or 12 bits. The TH, TL and configuration registers are nonvolatile (EEPROM), so they will retain data when the device is powered down.

The DS18B20 uses Dallasrsquo; exclusive 1-Wire bus protocol that implements bus munication using one control signal. The control line requires a weak pullup resistor since all devices are linked to the bus via a 3-state or open-drain port (the DQ pin in the case of the DS18B20). In this bus system, the microprocessor (the master device) identifies and addresses devices on the bus using each devicersquo;s unique 64-bit code. Because each device has a unique code, the number of devices that can be addressed on one bus is virtually unlimited. The 1-Wire bus protocol, including detailed explanations of the mands and ―time slots‖ is covered in the 1-WIRE BUS SYSTEM section of this datasheet.

Another feature of the DS18B20 is the ability to operate without an external power supply. Power is instead supplied through the 1-Wire pullup resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (CPP), which then supplies power to the device when the bus is low. This method of deriving power from the 1-Wire bus is referred to as ―parasite power.‖ As an alternative, the DS18B20 may also be powered by an external supply on VDD.

IV. OPERATION — MEASURING TEMPERATURE

The core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5 C, 0.25 C, 0.125 C, and 0.0625 C, respectively. The default resolution at power-up is 12-bit. The DS18B20 powers-up in a low-power idle state; to initiate a temperature measurement and A-to-D conversion, the master must issue a Convert T [44h] mand. Following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the scratchpad memory and the DS18B20 returns to its idle state. If the DS18B20 is powered by an external supply, the master can issue ―read time slots‖ (see the 1-WIRE BUS SYSTEM section) after the Convert T mand and the DS18B20 will respond by transmitting 0 while the temperature conversion is in progress and 1 when the conversion is done. If the DS18B20 is powered with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pullup during

the entire temperature conversion. The bus requirements for parasite power are explained in detail in the POWERING THE DS18B20 section of this datasheet.
The DS18B20 output temperature data is calibrated in degrees centigrade; for Fahrenheit applications, a lookup table or conversion routine must be used. The temperature data is stored as a 16-bit sign-extended tworsquo;s plement number in the temperature register (see Figure 2). The sign bits (S) indicate if the temperature is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. If the DS18B20 is configured for 12-bit resolution, all bits in the temperature register will contain valid data. For 11-bit resolution, bit 0 is undefined. For 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1 and 0 are undefined. Table 2 gives examples of

剩余内容已隐藏,支付完成后下载完整资料


DS18B20 单线温度传感器
一. 特征:

● 独特的单线接口,只需 1 个接口引脚即可通信
● 每个设备都有一个唯一的64位串行代码存储在ROM上
● 多点能力使分布式温度检测应用得以简化
● 不需要外部部件
● 可以从数据线供电,电源电压范围为3.0V至5.5V
● 测量范围从-55 ° C 至 125 ° C(-67 ° F至257 ° F),从-10℃至 85 °C的精度为0.5 °C
● 温度计分辨率是用户可选择的9至12位
● 转换12位数字的最长时间是750ms
● 用户可定义的非易失性的温度告警设置
● 告警搜索命令识别和寻址温度在编定的极限之外的器件 (温度告警情况)

● 采用8引脚SO(150mil),8引脚SOP和3引脚TO - 92封装
● 软件与DS1822兼容
● 应用范围包括恒温控制工业系统消费类产品温度计或任何热敏系统
二. 简介

该DS18B20的数字温度计提供9至12位的摄氏温度测量,并具有与非易失性用户可编程上限和下限报警功能。信息单线接口送入DS18B20或从DS18B20 送出,因此按照定义只需要一条数据线与中央微处理器进行通信。它的测温范围从-55°C到 125°C,其中从-10 °C至 85 °C可以精确到0.5°C 。此外,DS18B20可以从数据线直接供电(“寄生电源”),从而消除了供应需要一个外部电源。

每个 DS18B20 的有一个唯一的64位序列码,它允许多个DS18B20的功

能在同一总线。因此,用一个微处理器控制大面积分布的许多DS18B20是非常简单的。此特性的应用范围包括 HVAC、环境控制、建筑物、设备或机械内的温度检测以及过程监视和控制系统。

三. 综述

64位ROM存储设备的独特序号。存贮器包含2个字节的温度寄存器,它存储来自温度传感器的数字输出。此外,暂存器可以访问的1个字节的上下限温度告警触发器(TH和TL)和1个字节的配置寄存器。配置寄存器允许用户设置的温度到数字转换的分辨率为9,10,11或12位。TH,TL和配置寄存器是非易失性的,因此掉电时依然可以保存数据。

该DS18B20使用Dallas的单总线协议,总线之间的通信用一个控制信号就可以实现。控制线需要一个弱上拉电阻,因为所有的设备都是通过3线或开漏端口连接(在DS18B20中用DQ引脚)到总线的。在这种总线系统中,微处理器(主设备)和地址标识上使用其独有的64位代码。因为每个设备都有一个唯一的代码,一个总线上连接设备的数量几乎是无限的。单总线协议,包括详细的解释命令和“时间槽”,此资料的单总线系统部分包括这些内容。

DS18B20的另一个特点是:没有外部电源供电仍然可以工作。当DQ引脚为高电平时,电压是单总线上拉电阻通过DQ引脚供应的。高电平信号也可以充当外部电源,当总线是低电平时供应给设备电压。这种从但总线提供动力的方法被称为“寄生电源“。作为替代电源,该DS18B20也可以使用连接到 VDD 引脚的外部电源供电。

四. 运用 —— 测量温度

该DS18B20的核心功能是它是直接输出数字信号的温度传感器。该温度传

感器的分辨率为用户配置至9,10,11或12位,相当于0.5° C,0.25° C,0.125 ° C和0.0625° C的增量。其中传感器默认为12位。该DS18B20在低功耗空闲状态;启动温度测量和模数转换,主机必须发出一个转换命令。转换后,所产生的数据存储在内存中的2比特温度寄存器中,DS18B20返回其空闲状态。如果DS18B20是由外部电源供电的,主机可以发出“读时隙”,转换后,通过发送低电平T命令和DS18B20将响应,同时温度转换继续进行,当转换完成时变为高电平。如果DS18B20的是寄生电源供电的,在整个温度转换过程中此通知技术不能使用,因为总线必须变为高电平。总线需要寄生电源供电将在此资料的DS18B20驱动部分将详细介绍。

DS18B20的输出温度数据为标准摄氏度;对于华氏温度的应用,必须通过查表或运用转换方法。温度数据在温度寄存器存储为一个16位符号扩展位和2位的补码。该标志位(S)表示温度的正负符号位:为正数时S = 0,为负数时S = 1。如果是DS18B20配置为12位分辨率,在温度寄存器的所有位将包含有效数据。对于11位分辨率,位0是未定义的。对于10位分辨率,位1和0是未定义的。对于9位分辨率,位2,1和0是未定义的。表2给出了输出数字数据和相应的12位分辨率温度读数转换例子。

五. 运用——报警信号

DS18B20温度转换完成后,温度值与用户定义的2个报警触发值存储在1个字节的TH和TL寄存器。符号位(S)表示温度值的正负: S = 0时为正值, S = 1为负值。TH和TL寄存器是非易失(EEPROM),因此他们将保留设备掉电时的数据。TH和TL可通过暂存器中字节2和3获得,此内容在本数据表内存部分解释。

六. TH和TL寄存器格式


只有温度寄存器4中的11位用于和TL的比较中,由于TH和TL都是 8位寄存器。如果测量温度低于或等于TL或超过TH,报警情况存在而且报警标志将设置在DS18B20的内部。每个温度测量后,这个标志位将被更新,因此,如果报警条件消失,下一个温度转换后,该标志位将被关闭。主设备可以通过搜索ECH命令检查总线上所有DS18B20报警标志位的状态。任何有设置报警标志位的DS18B20将响应命令,所以主设备可以决定到底是哪个DS18B20在经历一个报警条件。如果报警的情况存在,TH和TL设置已经改变了,另一个温度转换应该去验证报警条件。

七. DS18B20的驱动

该传感器DS18B20可以用外部电源接VDD端供电,或者它可以工作在“寄生电源”模式下,这种模式允许DS18B20在没有外部电源下工作。寄生电源在远程或者空间受限情况下感温是非常有用的。寄生功率控制电路,其中当总线引脚为高电平时,力部门宿舍从DS18B20通过连接单总线的DQ端“偷”电。当总线是高电平或者总线是低电平,而一些能量存贮在CPP中来提供电源,“偷”来的电位DS18B20提供驱动。

当DS18B20在寄生电源模式下使用时,VDD引脚必须接地。在寄生电源模式下,单总线和CPP可以提供足够的电流给DS18B20的大部分操作,只要指定的时间和电压的要求得到满足(参考本数据手册DC电气特性和AC电气特性章节)。

然而,当DS18B20温度转换或复制暂存器的数据到EEPROM时,工作电流可高达1.5毫安。这个电流会导致无法接受的电压下降,整个单总线电阻压降减小,更多的电流可以由寄生电源供应。为了确保DS18B20有足够的电流供应,无论正在发生温度转换或复制暂存器的数据到EEPROM,单总线都必须接一个强上拉电阻。这可以通过使用一个MOSFET以直接把总线电压下降到如图4所示。

单总线必须在转换T[44h]或暂存器复制[48H]命令发出后,10秒内(最大)转换到强上拉状态,而且总线必须在转换(tconv)或数据传输(twr = 10ms)期间通过上拉保持高电平。在单总线上拉使能时,其他活动不能发生。该DS18B20的也可以采用的连接外部电源到VDD脚上的传统方法。

这种方法的优点是不需要MOSFET的上拉, 而且单总线可以在进行温度转换时间自由地进行其他操作。在 100℃以上的高温时不推荐使用寄生电源,因为在这些温度下存在较高泄漏电流,DS18B20可能无法维持通信。对于像在这种高温下的使用,强烈建议由一个DS18B20的外部电源供电。在某些情况下,总线主机可能不知道DS18B20是外部电源还是寄生电源供电。主机需要这些信息来确定是否强大的总线上拉应在温度转换时使用。要获得这些信息,主机可以在 “阅读时段” 一个读取电源[B4h]命令后,发出一个跳过ROM[CCh]命令。在读时隙,寄生电源给DS18B20供电将把总线电平拉低,外部供电时DS18B20将会让总线仍然保持高电平。如果总线拉低,主机知道在温度转换期间它必须提供单总线强上拉。

八. 64位激光ROM

每一 DS18B20 包括一个唯一的 64 位长的 ROM 编码。开绐的 8 位是单线产品系列编码:28h,接着的 48 位是唯一的系列号。最重要的8位是开始 56 位 CRC位,从56位的ROM端计算而来。CRC比特的详细内容将在CRC概述一章中介绍。64位ROM代码和相关ROM功能控制逻辑使DS18B20作为使用协议的单线设备的运作,单总线系统的数据表部分详细介绍了这个协议。

九. 存贮器

DS18B20的存贮器那样被组织 存贮器由一个高速暂存 便笺式 RAM、一个

存贮高温度和低温度和触发器 TH 和 TL的非易失性电可擦除 E2RAM和存储配置寄存器组成。请注意,如果DS18B20的报警功能不使用,TH和TL寄存器可以作为通用存储器。 DS18B20的功能命令部分详细叙述了所有内存的命令。暂存器的字节0和字节1分别包含LSB和MSB温度寄存器。这些字节是只读的。字节2和3提供是提供接入的TH和TL寄存器。字节4包含配置寄存器数据,数据表配置寄存器部分详细解释了它的内容。字节5,6和7是保留供内部使用的设备,不能被覆盖,当被读到时,这些字节将返回1秒。8字节暂存器是只读的,并且包含了循环冗余校验码,通过暂存器的0到7字节。DS18B20使用在CRC生成一节中描述的方法生成该CRC。数据写入字节2,3,暂存器4使用写入暂存[4Eh]指令;数据必须传输到DS18B20以最低有效位开始的第2字节。为了验证数据的完整性,数据被写入后暂存器可以读取(使用数据读取暂存器[与Beh]命令)。当读取暂存器,数据是从最低有效位的0字节开始的。要传送的TH,TL和配置数据从暂存器到EEPROM,主机必须发起复制暂存 [48h]命令。设备关机时,在EEPROM寄存器的数据将被保留,上电时EEPROM中的数据到相应的位置暂存器重新加载。数据也可以使用召回E2 [B8h]命令在任何时间从EEPROM中重新加载向暂存器。主机可以在召回E2命令后发出读时隙后,DS18B20的将通过传输0表明处在召回状态,当召回完成时将传输1。

十. 配置寄存器

暂存存储器的第四字节包含配置寄存器。用户可以使用该寄存器的R0和R1的位设置DS18B20的转换分辨率。这些位默认是R0和R1都等于1(12位)的分辨率。请注意,两者之间是有直接的分辨率和转换时间的对比。第7位,并在配置寄存器0至4位是保留供内部使用的设备,不能被覆盖,这些位被读出时将返回1秒。

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[31208],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图