Basic equations:
Example:
Start
Read calibration data (factory calibrated) from
PROM of MS5540
Word1 = 46940
Word2 = 40217
Word3 = 25172
Word4 = 47212
Word1, Word2, Word3 and Word4 (4x16 Bit)
Convert calibration data into coefficients:
(see bit pattern of Word1-Word4)
SENST1
C1 = 23470
C2 = 1324
C3 = 737
C4 = 393
C5 = 628
OFFT1
TCS
TCO
C1: Pressure sensitivity
C2: Pressure offset
C3: Temperature coefficient of pressure sensitivity (10 Bit)
C4: Temperature coefficient of pressure offset
C5: Reference Temperature
C6: Temperature coefficient of the temperature
(15 Bit)
(12 Bit)
Tref
(10 Bit)
(11 Bit)
(6 Bit)
TEMPSENS
C6 =
25
Read digital pressure value from MS5540
D1 (16 Bit)
D1 = 16460
Read digital temperature value from MS5540
D2 (16 Bit)
D2 = 27856
Calculate calibration temperature
UT1 = 25248
UT1 = 8*C5+20224
Calculate actual temperature
Difference between actual temperature and reference
temperature:
dT(D2) = D2 - Tref
dT
= 2608
dT = D2 - UT1
TEMP(D2) = 20°+dT(D2)*TEMPSENS
TEMP = 391
= 39.1 °C
Actual temperature:
TEMP = 200 + dT*(C6+50)/210 (0.1°C resolution)
Calculate temperature compensated pressure
Offset at actual temperature:
OFF(D2) = OFFT1+TCO*dT(D2)
SENS(D2) = SENST1+TCS*dT(D2)
OFF = 5220
SENS = 49923
OFF = C2*4 + ((C4-512)*dT)/212
Sensitivity at actual temperature:
SENS = C1 + (C3*dT)/210 + 24576
X
P
= 23093
X = (SENS * (D1-7168))/214 - OFF
Temperature compensated pressure:
P(D1,D2) = D1*SENS(D2)-OFF(D2)
P = X*10/25 + 250*10
(0.1 mbar resolution)
= 9716
= 971.6 mbar
Display pressure and temperature value
Fig. 3: Flow chart for pressure and temperature reading and software compensation.
NOTES
1) Readings of D2 can be done less frequently, but the display will be less stable in this case.
2) For a stable display of 0.1 mbar resolution, it is recommended to display the average of 8 subsequent
pressure values.
DA5540B_007
September 25th, 2006
10
00005540767 ECN 865