AnsweredAssumed Answered

LPS25H wrong pressure value

Question asked by Hrncic.Zlatko on Jul 27, 2015
Latest reply on Mar 21, 2017 by Kiesenhofer.Michael
Hi ST Community!

I am working with LPS25H pressure sensor and STM32F1 uC. I am able to read out temperature and pressure but the pressure value is too low (temperature is fine). It should be 1009.5 mbar and the sensor outputs 979.4 mbar.

I have tried adding pressure offset value after soldering, but the pressure is then 1035.2 mbar. Does anyone have any clue what should I be carefull about? Initialization and read routines:

INITIALIZATION
// RES_CONF 0x05
I2C1_numData = 1;
I2C1_buffer[0] = 0x05;
I2C1_Send_Data(I2C1_buffer, PRESSURE_ADDRESS, 0x10 | 0x80, &I2C1_numData);
 
// CTRL_REG1 0xC0
// CTRL_REG2 0x00
// CTRL_REG3 0x00
// CTRL_REG4 0x00
I2C1_numData = 4;
I2C1_buffer[0] = 0xC0;
I2C1_buffer[1] = 0x00;
I2C1_buffer[2] = 0x00;
I2C1_buffer[3] = 0x00;
I2C1_Send_Data(I2C1_buffer, PRESSURE_ADDRESS, 0x20 | 0x80, &I2C1_numData);
 
// FIFO_CTRL 0x00
I2C1_numData = 1;
I2C1_buffer[0] = 0x00;
I2C1_Send_Data(I2C1_buffer, PRESSURE_ADDRESS, 0x2E | 0x80, &I2C1_numData);

READOUT
I2C1_numData = 5;
I2C1_Read_Data(I2C1_buffer, PRESSURE_ADDRESS, 0x28 | 0x80, &I2C1_numData);
 
pressure = (I2C1_buffer[2] << 16 ) | (I2C1_buffer[1] << 8 ) | (I2C1_buffer[0] << 0 );
temperature = (I2C1_buffer[4] << 8 ) | (I2C1_buffer[3] << 0 );
 
pressureFloat = pressure / 4096.0;
temperatureFloat = temperature / 480.0 + 42.5;

Outcomes