应用笔记 2810

DS2422 Trim Procedure and Software Correction


摘要 : Before it can accurately measure temperatures, the DS2422 needs to undergo a two-point trim. For the highest level of accuracy, this trim needs to take place as late as possible, i.e., with the end product that the DS2422 resides in. The accuracy can be further improved through software correction if actual values and temperature readings of the DS2422 at additional temperature points are stored in the calibration memory. This application note describes how to perform the trim, how to obtain, format and store the data for the software correction and how to perform the software correction. A spreadsheet with calculations and format conversions used in this application note can be downloaded from www.ibutton.com.

Introduction

With exception of the lasered ROM, the DS2422 needs a backup power source to keep memory data nonvolatile. Although one can write to the ROM while the chips are still on the wafer, a trim at this stage is technically not feasible. In addition, the trim could not compensate for shifts that occur at later processing steps, such as packaging of the chip and manufacturing of the end product. For these reasons, to achieve the highest level of accuracy, the trim needs to take place as late as possible, i. e., with the end product that the DS2422 resides in.

The minimum preparation of the DS2422 before it can measure temperature with any accuracy is a two-point trim. To perform this trim, one needs a temperature chamber that provides an even temperature distribution and that includes a calibrated, very precise temperature measurement system.

To increase accuracy, one can store actual value and temperature reading of the DS2422 at additional temperature points in the calibration memory and use that data with a correction algorithm. These steps are referred to as Obtain Data for Software Correction and Perform Software Correction.

Part 1. Required Two-Point Trim

The purpose of this trim is to fine-tune the parameters Conversion Length| CLEN and Temperature Reset Value Treset, which control the temperature measurement core of the DS2422. There is access to these parameters through addresses 0404/5h (Treset) and 0406/7h (CLEN) within the Trim Register Page. This trim needs to take place at 60°C (Tref1) and at -10°C (Tref2). Table 1 lists all constants and parameters that are involved in the trim.

Table 1. Two-point trim constants and parameters
Name Value Units Description
K1 0.0625 °C System constant, resolution
K2 273 --- System constant, Celsius to Kelvin offset, in °C
Treset_init 116B --- Temperature Reset Value, default value, hex format as read from device
Treset_init_D 4459 --- Treset_init, but converted into decimal
CLEN_init 12A6 --- Conversion Length, default value, hex format as read from device
CLEN_init_D 4774 --- CLEN_init, but converted into decimal
Tref1 60 °C Hot trim point, nominal value
Tref2 -10 °C Cold trim point, nominal value
Tref1_D   °C Hot trim point temperature, reading from temperature chamber
Tref2_D   °C Cold trim point temperature, reading from temperature chamber
Tread1   --- Temperature conversion result when DS2422 is exposed to Tref1, hex format as read from device
Tread2   --- Temperature conversion result when DS2422 is exposed to Tref2, hex format as read from device
Tread1_D   °C Tread1, but converted into decimal °C
Tread2_D   --- Tread2, but converted into decimal °C

The following steps are necessary to obtain the data required for the trim:

  • Put the end product (with power applied to VBAT and the oscillator running, connected through the 1-Wire® interface to a PC) into the temperature chamber.
  • Set the DS2422 into the high-resolution mode (TLFS = 1).
  • Ramp up the temperature chamber to Tref1 (60°C).
  • When the temperature has stabilized, read Tref1_D from sensors that are part of the temperature chamber.
  • Immediately after reading Tref1_D, issue the Forced Conversion command for the DS2422 to perform a temperature conversion.
  • Read Tread1 from DS2422, address 020C/Dh, convert it into decimal °C format, and store it as Tread1_D together with Tref1_D for later use.
  • Ramp down the temperature chamber to Tref2 (-10°C).
  • When the temperature has stabilized, read Tref2_D from sensors that are part of the temperature chamber.
  • Immediately after reading Tref2_D, issue the Forced Conversion command for the DS2422 to perform a temperature conversion.
  • Read Tread2 from DS2422, address 020C/Dh, convert it into decimal °C format, and store it as Tread2_D together with Tref2_D for later use.

Now perform the following computation, which yields the new values for the trim registers of the DS2422:

Ratio = (Tread1_D + K2)/(K1 x 2 x (CLEN_init_D + 1))
CLEN_new_D = (CLEN_init_D + 1) x (Tref1_D - Tref2_D) / (Tread1_D - Tread2_D) - 1

Tread1_new_D = 2 x (CLEN_new_D + 1) x Ratio x K1 - K2
Tzero_adjust_D = (Tref1_D - Tread1_New_D) / K1
Treset_new_D = Treset_init_D + Tzero_adjust_D
Round Treset_new_D to the nearest integer value and convert into 16-bit hexadecimal Treset_new.
Round CLEN_new_D to the nearest integer value and convert into 16-bit hexadecimal CLEN_new.
Write Treset_new and CLEN_new to the trim registers 0404/5h (Temperature Reset Value) and 0406/7h (Conversion Length), with the low-order byte going to the lower address.

This concludes the Two-Point Trim. The device is now ready for use. It retains its trim as long as the VBAT pin of the DS2422 remains connected to a backup power source to keep the data nonvolatile. If power is removed, the calculated trim values will remain valid and can be rewritten to the CLEN and Treset registers as long as the VBAT level from the calibration step is used in the final application.

Part 2. Obtain Data for Software Correction

The accuracy of temperature data taken with the DS2422 can be improved through postprocessing, also referred to as software correction. The correction algorithm described in this document is based on a total of three temperatures, Tref1, Tref2, and Tref3. The first two points are identical to the hot and cold trim points. The third point is the center between -10°C and 60°C, i. e., 25°C.

To perform the software correction, one needs to know the difference between DS2422 conversion result and actual value at the three reference temperatures (Table 2). For Tref2 and Tref3 the actual value and conversion result are communicated to the end user through the calibration memory of the DS2422. Due to the method used for the trim process, the temperature error at Tref1 is the same as the error at Tref2. Tref1 and the DS2422 conversion result at Tref1, therefore, need not be stored in the calibration memory.

Table 2. Data for software correction
Name Value Units Description
Tref1 60 °C Hot trim point, nominal value
Tref2 -10 °C Cold trim point, nominal value
Tref3 25 °C Center temperature, nominal value
Tref2_D   °C Cold trim point temperature, reading from temperature chamber
Tref3_D   °C Center temperature, reading from temperature chamber
Tread2   --- Temperature conversion result when DS2422 is exposed to Tref2, hex format as read from device
Tread3   --- Temperature conversion result when DS2422 is exposed to Tref3, hex format as read from device

To obtain the data for software correction, perform the following steps:

  • Put the end product (with power applied to VBAT and the oscillator running, connected through the 1-Wire interface to a PC) into the temperature chamber.
  • Set the DS2422 into the high-resolution mode (TLFS = 1).
  • Ramp down the temperature chamber to Tref2 (-10°C).
  • When the temperature has stabilized, read Tref2_D from sensors that are part of the temperature chamber.
  • Immediately after reading Tref2_D, issue the Forced Conversion command for the DS2422 to perform a temperature conversion.
  • Read Tread2 from DS2422, address 020C/Dh, and store it together with Tref2_D in the calibration memory of the DS2422 for later use.
  • Ramp up the temperature chamber to Tref3 (25°C).
  • When the temperature has stabilized, read Tref3_D from sensors that are part of the temperature chamber.
  • Immediately after reading Tref3_D, issue the Forced Conversion command for the DS2422 to perform a temperature conversion.
  • Read Tread3 from DS2422, address 020C/Dh, and store it together with Tref3_D in the calibration memory of the DS2422 for later use.
This concludes the preparation for software correction. The device retains its data as long as the VBAT pin of the DS2422 remains connected to a backup power source. If power is removed, the calculated trim values and software correction data will remain valid and can be rewritten to the CLEN and Treset registers as long as the VBAT level from the calibration step is used in the final application.

If compatibility to the DS1922L software calibration is desired, Tref2_D and Tref3_D need to be converted into the raw data format of the DS2422 (Tref2_H, Tref3_H) and stored in the calibration memory along with Tread2 and Tread3 as shown in Table 3.

Table 3. Data for software correction
Address Designator Description
0240/1h Tref2_H Cold trim point temperature, reading from temperature chamber, but converted into DS2422 hex format; high-byte at the lower address
0242/3h Tread2 Temperature conversion result when the trimmed DS2422 is exposed to Tref2, hex format as read from device, high-byte at the lower address
0244/5h Tref3_H Center temperature, reading from temperature chamber, but converted into DS2422 hex format; high-byte at the lower address
0246/7h Tread3 Temperature conversion result when the trimmed DS2422 is exposed to Tref3, hex format as read from device, high-byte at the lower address

Part 3. Perform Software Correction

The correction algorithm consists of three steps, a) retrieve and convert the data for software correction, b) compute correction factors, and c) apply correction factors to temperature readings. The software correction assumes that temperature readings are available in 16-bit format (11-bit resolution). A correction of 8-bit readings does not improve accuracy.

Retrieve and convert values into decimal °C format

Tref2_D Temperature chamber reading at Tref2, converted to °C
Tref3_D Temperature chamber reading at Tref3, converted to °C
Tread2_D DS2422 Temperature conversion result at Tref2_D, converted to °C
Tread3_D DS2422 Temperature conversion result at Tref3_D, converted to °C

The three correction factors A, B, and C are computed from the converted temperatures and conversion results as shown below.

Err2 = Tread2_D - Tref2_D
Err3 = Tread3_D - Tref3_D
Err1 = Err2
Tref1 = 60°C
B = (Tref2_D² - Tref1²) x (Err3 - Err1)/[(Tref2_D² - Tref1²) x (Tref3_D - Tref1) + (Tref3_D² - Tref1²) x (Tref1 - Tref2_D)]
A = B x (Tref1 - Tref2_D) / (Tref2_D² - Tref1²)
C = Err1 - A x Tref1² - B x Tref1

Apply correction factors to temperature reading

Tcorr = Tread - (A x Tread² + B x Tread + C)
Tread is any 16-bit DS2422 Temperature conversion result, converted to °C.

Once the correction factors are computed, they can be used repeatedly to correct any temperature reading and temperature log of the same device.

General hints

  • If the temperature chamber is large, fill it with multiple devices and heat/cool them simultaneously. This saves time because it may take an hour for the temperature chamber to get from one temperature point to the next one.
  • If software correction is desired, obtain the data for software correction as part of the trim procedure. Once CLEN_new and Treset_New are written to the DS2422, the device is ready for a temperature conversion that yields a valid reading at Tref2. This saves time since the temperature chamber is still at Tref2.
  • A spreadsheet with calculations and format conversions used in this application note can be downloaded as https://www.maximintegrated.com/en/products/ibutton/software/ibutton/AN2810_DS2422_Trim.zip.

相关型号
DS2422 免费样品
下一步
EE-Mail 订阅EE-Mail,接收关于您感兴趣的新文档的自动通知。
© , Maxim Integrated Products, Inc.
The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.
APP 2810:
应用笔记 2810,AN2810, AN 2810, APP2810, Appnote2810, Appnote 2810