数字温度传感器外文翻译6
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
英文参考资料
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 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of –55°C to +125°C and is accurate to 0.5 C over the range of –10°C to +85°C. In addition, the DS18B20 can derive power directly f rom 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 HV AC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.
OVERVIEW
The 64-bit ROM stores the device’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 (T and T ), and the 1-byte configuration H L 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 T, T and configuration registers are nonvolatile (EEPROM), so H L they will retain data when the device is powered down. The DS18B20 uses Dallas’ exclusive 1-Wire bus protocol that implements bus communication using one control signal. The control line requires a weak pull up 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 device’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
Another feature of the DS18B20 is the ability to operate without an external power supply. Power is instead supplied through the 1-Wire pull up resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (C ), which then supplies power to the device when the bus is PP 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 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] command. 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 command 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 pull up during the entire temperature conversion. 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 two’s complement 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. POWERING THE DS18B20
The DS18B20 can be powered by an external supply on the VDD pin, or it can operate in “parasite power” mode, which allows the DS18B20 to function witho ut a
local external supply. Parasite power is very useful for applications that require remote temperature sensing or that are very space constrained. DS18B20’s parasite-power control circuitry, which “steals” power from the 1-Wire bus via the DQ pin when the bus is high. The stolen charge powers the DS18B20 while the bus is high, and some of the charge is stored on the parasite power capacitor (C ) to provide power when the bus is low. When the DS18B20 is used in parasite power mode, the VDD pin must be connected to ground. In parasite power mode, the 1-Wire bus and CPP can provide sufficient current to the DS18B20 for most operations as long as the specified timing and voltage requirements are met. However, when the DS18B20 is performing temperature conversions or copying data from the scratchpad memory to EEPROM, the operating current can be as high as 1.5mA. This current can cause an unacceptable voltage drop across the weak 1-Wire pull up resistor and is more current than can be supplied by CPP. To assure that the DS18B20 has sufficient supply current, it is necessary to provide a strong pull up on the 1-Wire bus whenever temperature conversions are taking place or data is being copied from the scratchpad to EEPROM.
DS18B20数字温度传感器提供9-12位的分辨率而且还有一种报警功能,它内部有非易失的用户可编程的单元用来设置温度的上限和下限。
DS18B20通过一总线技术来通信,只需要一根数据线就可以与单片机进行通信。
它可以检测的范围是-55°C 到+125°C,而且在–10°C 到+85°C.范围内它的精确度是0.5 C。
此外DS18B20能够通过数据线驱动,也就是通过数据线传递能量,这样就可以避免另外设计电源电路和电源线了。
每个DS18B20都有唯一的64位序列号。
可以把多个DS18B20连接在一根数据线上,通过这个序列号可以操作响应的温度传感器。
这样很容易就可以实现一个单片机控制多个温度传感器。
HV AC环境控制器和温度控制器系统都应用该传感器实现了很好的功能。
正如上面所说的64位的ROM中存储这温度传感器的唯一序列号。
RAM中存储着两个字节的温度值,这两个字节的数据将来要通过数据总线传到单片机那里。
此外,暂时寄存器还和一个字节的上限、下限寄存器相连,同时也和一个字节的配置字相连。
这个配置寄存器允许用户设置温度传感器的分辨率在9、10、11、12这四个数之间。
上下限寄存器和配置寄存器都是用非可易失性的材料做的,所以在掉电之后也不会丢失数据。
该温度传感器通过达拉斯公司独特的单总线技术通过一根数据线实现和单片机的交互。
数据线也就是总线需要一个比较小的上拉电阻,因为所有的信号都是通过总线来传输的,这根总线有三种状态,在单总线系统中,单片机也就是主设备通过温度传感器的唯一的64位码来识别和定位传感器。
因为每个但单总线设备都有一个唯一的64位的识别码,所以主机可以连接的从设备理论上说是没有数量限制的。
DS18B20另一个特征是它不需要额外的供电系统。
电源是通过单总线系统中的DQ管脚传入的,当这个管脚是高电压时供电。
而当DQ为低电平时,传感器就不工作了?当然不是了,在温度传感器的内部有一个电容,当DQ为高电平时充电,当DQ为低电平时放电,放出来的电给传感器供电。
当然如果不只使用温度传感器的一个管脚的话,也可以由额外供电,也就是通过传感器的VDD管脚,给它提供+5V的电压就可以使DS18B20正常工作了。
DS18B20的核心部位是其可以直接将外界温度信息直接转换成数字信号的温度传感器。
该温度传感器是可以用户设置的,有9位、10位、11位和12位的分辨率,分别对应0.5 C, 0.25 C, 0.125 C,和0.0625 C,的增量,也就是说数字每增加一温度增加的值。
默认情况下是设置成12位模式的。
为了能够初始化温度传
感器和使其内部的模数转换电路工作,主设备也就是单片机需要给DS18B20发出转换命令(即向DS18B20传送44H)。
在传感器接收到命令之后,并作出反应后,温度值被存储在温度传感器内部的两字节的温度寄存器中,这两个字节在断电后会丢失数据,然后温度传感器恢复等待命令状态(即空闲状态)。
如果DS18B20是由额外电源供电的话,那么DS18B20会在正在转换时保持低电平,而完成转换之后就会保持高电平了。
如果DS18B20是寄生供电的话,由于在传感器转换期间需要比较大量的电能,所以就不能够支持上诉的功能了。
温度传感器中要输出的温度数据单位是按照摄氏温度来的,如果要转换成华氏温度的话就需要用户自己做一个转换表了。
温度值在DS18B20中是以两字节的补码形式存储在温度传感器中的。
符号位标志着温度是正的还是负的,如果是正的那么就是0,如果是负的那么就是1.如果DS18B20被配置为12位精度的话,那么在温度寄存器中的数据都是有效的。
如果是11位精度的话,第一位没有定义。
如果是10位精度的话,第一位和第二位没有定义。
如果是9位精度的话,纳闷第一位、第二位和第三位都没有定义
DS18B20既可以通过VDD管脚来提供额外的电源,也可以通过寄生电源的方式来为其自身供电。
寄生电源对于要求要求远距离温度检测的应用或者是那些非常恶劣的环境下的一个用来说是非常合适的。
温度传感器的寄生电源是在DQ 管脚为高电压的时候存储电量来为以后DQ为低的时候供电。
而且当传感器工作在寄生电源的模式下时,VDD管脚一定要接地,不然就会不能判定究竟是在什么模式在工作了。
当DS18B20工作在寄生电源模式时,单总线和CPP能够为其大部分的操作提供足够的电源。
而当DS18B20进行温度转换或将数据从易失性存储介质中拷贝到EEPROM中时,操作需要的电流高达1.5mA这样大的电流必然导致不可接受的电压的下降,而且这样的电流也不是电容能够提供的。
为了确保DS18B20能够有足够的电流来实现温度转化功能和数据拷贝功能,所以不论在这两个功能中那一个即将进行之前都应该给温度传感器一个很强的高电压。