cancel
Showing results for 
Search instead for 
Did you mean: 

LPS22HH reporting inaccurate raw pressure values

DN_1
Associate II

I am currently interfacing the LPS22HH component and have been encountering some very strange pressure data.

Currently I am interfacing this in I2C mode and reading the pressure sensor values from PRESS_OUT_XL (28h), PRESS_OUT_L (29h) and PRESS_OUT_H (2Ah). At the start I usually set CTRL_REG2 (11h) to the value 0x04 to reset all the buffers.

Strange due to two reason:

1) My BMP280 barometer and Android mobile phone both show pressure values(1002) that within 1-2 hpa of each other while the LPS22HH is different by almost 15Hpa. The value of 1002 is my expected value.

2) I am in an apartment, with open windows. The pressure value of 1018 does not make sense at all because the sea level pressure based on the met station is 1009. This seems to indicate that I am actually below sea level which is not true because I am in an apartment.

3) The value of the pressure is fluctuating by a significant amount.

Does anyone or @Eleon BORLINI​  know what could be the cause of the strange values? I have tried it on multiple modules and have gotta the same strange values. Could it be that I supposed to calibrate this sensor prior to using? Or is there some specific configuration of the barometer that I should apply?

Any help is appreciated on debugging this issue is appreciated, thanks!

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @DN_1​ ,

I would suggest you to first check you have configured the sensor as described in the datasheet or, for example, on Github C example: lps22hh_read_data_polling.c.

I moreover suppose the conversion formula is ok.

float_t lps22hh_from_lsb_to_hpa(uint32_t lsb)
{
  return ( (float_t) lsb / 1048576.0f );
}

But ok, there could be residual effects due for example to soldering procedures, since the LPS22HH is a sensible device (quite huge, indeed, since the typ ds value should be ±0.5 mbar...).

What I would suggest you is to check:

  • Whether you are in the same environmental condition both for the LPS22HH and the references (in terms of proximity to the application processor of the board, external environment, etc...: you could be measuring higher temperature and, maybe, higher pressure);
  • If the offset you are experiencing with respect to your reference barometers, you could store the 25°C in the RPDS_L (18h) and RPDS_H (19h) registers so that the device automatically apply this compensation to the output data. You can store in your software this characterized value and use it .

For this second point, I suggest you to refer to the application note AN5209, p.17:

If, after the soldering of the component, a residual pressure offset is still present, it can be removed with a onepoint calibration (OPC), leveraging on the RPDS registers which can store the residual offset value to be removed. The calibration offset value is expected to be stored as a signed 16-bit value expressed as 2’s complement in the RPDS_L(@18h) and RPDS_H(@19h) registers. The default value for RPDS is 0 (zero). The content of the RPDS registers is always automatically subtracted from the compensated pressure output and provided to the standard output pressure registers PRESS_OUT_x(@28h, 29h and 2Ah) and FIFO. It is provided as the difference between the measured pressure and the content of the RPDS registers (@18h, @19h) multiplied by 256, when DIFF_EN = ‘0’, AUTOZERO=‘0’, AUTOREFP= ‘0’ (see Section 4.2 Data path).

To increase the sensor accuracy over temperature, you can also try applying a (software) gain compensation by considering the typ ds value of ±0.65 Pa/°C.

-Eleon