cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH12 Temperature readings

anilnadargi
Associate
Posted on September 26, 2016 at 14:54

Hi Team , 

We are working on LIS2DH12 chip for accelerometer and temperature readings . 

Hardware Cicuit details :

 

a. VDD and VDDIO : 1.8 V 

We are facing issue in the temperature readings. Please find below for the steps for reading the temperature value .

 

Sensor Initialization for Temperature :

 

a. Initialization of the temperature sensor : TEMP_CFG_REG to 11

b. CTRL_REG4 BDU bit set to 1

Reading the temperature : 

 

a. Reading the OUT_TEMP_L (0Ch), OUT_TEMP_H (0Dh)

b. Convert the value of OUT_TEMP_H register content ( which is in 2s complement ) to decimal .

b. Temperature Value  =  25C (Reference Temperature )  + ( Converted decimal value from above step .This value may be + or - as per value )

We are getting value as 0x09,0x08,0x0a in OUT_TEMP_H (0Dh) register content. Our ambient temperature is 22 to 23 C.

But as per calculation we are getting temperature as (25+10)=35 which is not correct . 

Please let us know what shall be valid reference temperature ( currently used as 25 ) for VDD 1.8 V . 

Datasheet says that reference temperature for VDD 2.5 V is 25 . What shall be reference temperature for VDD 1.8 V.

Thanks ,

Anil N

5 REPLIES 5
Miroslav BATEK
ST Employee
Posted on October 07, 2016 at 17:04

The temperature sensor can be used to measure temperature variations. It isn't suitable to return absolute temperatures measures. The value represents difference respect to a reference not specified value. The reference temperature is not guaranteed to be 25C as you assumed. You would need to calibrate all your devices to get reference value for each device. The reference temperature is not dependent on Vcc.

Best regards

Miroslav
green_om_2006
Associate III
Posted on October 13, 2016 at 14:36

Hi,

Can we calibrate each device at production line (i.e at 25C) and save the value once and then count on the measured value for calculations in feature ?

Thanks

Miroslav BATEK
ST Employee
Posted on October 13, 2016 at 15:36

Unfortunately it is not possible to calibrate the device (write any calibration constants into the sensor). I suppose you have some microcontroler in your device, so you would have to store the calibration value in the microcontroler memory and also calculate the corrected value by the microcontroler.

Best regards

Miroslav

green_om_2006
Associate III
Posted on October 14, 2016 at 09:10

Yes, i meant to save the reference value in MCU and then calculate absolute temperature by MCU ...

so we can do it ? the reference value won't change later because of VCC or other reasons ?!

Thanks.

Miroslav BATEK
ST Employee
Posted on October 25, 2016 at 13:27

I double checked your issue with application team, and they pointed out the temperature sensor operation is guaranteed only in range 2V-3.6V (see datasheet page 11). 

If in your case the Vcc and Vddio is only 1.8V the operation of the temperature sensor is not guaranteed.

Best regards

Miroslav