
DS1923: Hygrochron Temperature/Humidity Logger iButton with 8kB Data Log Memory
49 of 52
Step 2. Execution
Tc = TcH/2 + TcL/512 - Offset
Tcorr = Tc - (A * Tc
2
+ B * Tc + C)
Numerical Correction Example
(convert from binary to °C)
(the actual correction)
Converted Data from Calibration Memory
Tr2 = -10.1297°C
Tr3 = 24.6483°C
Tc2 = -10.0625°C
Tc3 = 24.5°C
Error Values
Err2 = 0.0672°C
Err3 = -0.1483°C
Err1 = Err2
Resulting Correction Coefficients
B = -0.008741
A = 0.000175/°C
C = -0.039332°C
Application of Correction Coefficients to Sample Reading
Tc = 22.500000°C
Tcorr = 22.647275°C
NOTE:
The software correction requires floating point arithmetic (24-bit or better). Suitable math libraries for
microcontrollers are found on various websites and are included in cross-compilers.
SOFTWARE CORRECTION ALGORITHM FOR HUMIDITY
The accuracy of humidity conversion results (forced conversion as well as logged data) can be improved through a
correction algorithm. The data needed for this software correction is stored in the calibration memory (memory
page 18). It consists of reference humidity (Hr) and conversion result (Hc) for three different humidity levels, as
shown below.
The data is taken at 25°C.
Address
Designator
Description
0248h
Hr1H
Low reference humidity, high-byte
0249h
Hr1L
Low reference humidity, low-byte
024Ah
Hc1H
Conversion result at low reference humidity, high-byte
024Bh
Hc1L
Conversion result at low reference humidity, low-byte
024Ch
Hr2H
Medium reference humidity, high-byte
024Dh
Hr2L
Medium reference humidity, low-byte
024Eh
Hc2H
Conversion result at medium reference humidity, high-byte
024Fh
Hc2L
Conversion result at medium reference humidity, low-byte
0250h
Hr3H
High reference humidity, high-byte
0251h
Hr3L
High reference humidity, low-byte
0252h
Hc3H
Conversion result at high reference humidity, high-byte
0253h
Hc3L
Conversion result at high reference humidity, low-byte
The correction algorithm consists of two steps: preparation and execution. The preparation step first converts
humidity data from binary to decimal %RH format. Next three coefficients A, B, and C are computed. In the
execution step the humidity reading as delivered by the DS1923 (raw data) is first converted from the low/high-byte
format (HcL, HcH) to %RH (Hc) and then corrected to Hcorr. Once step 1 is performed, the three coefficients can
be used repeatedly to correct any humidity reading and humidity log
of the same device
.