2015-06-02 09:20 AM
I have an application using the LIS3DH. I need to read the values from the on chip Temperature Sensor. I have properly setup the ADC_PD and TEMP_EN bit in the TEMP_CFG_REF (1Fh). I'm reading the OUT_3_L (0Ch) and OUT_3_H (0Dh) at an ODR of 50 Hz. The OUT_3_L seems to be random while OUT_3_H looks like valid data. Three different chips measure (OUT_3_H) as follows FA, F6 and FE. This translates to -6, -9 and -2. The Datasheet describes the TSDr as Temperature sensor output change vs temperature with a resolution of 1 digital/C. So my assumption is that the translated values of -6, -9 and -2 are delta (changes) from some reference temperature (possible at MFG calibration). The ambient temperature in the room is 23 C (~73 F). My assumption per Datasheet was that the reference temperature is 25 C but this only correlated to the 3rd value. Is there a reference temperature that is different in each chip? Is there a way to access this reference temperature? Possible in one of the reserved addresses?
Thank you,
#temperature-sensor #lis3dh2015-06-23 07:00 AM
** BUMP **
Does anyone from ST look this forum? Anyone have information regarding my question?2016-04-01 06:02 AM
2016-06-21 09:49 AM
Hi ketkar,
I am using lis2dh. If you know then can you please tell me how to convert temperature raw data to actual temperature. I didn't find this info in datasheet.Is there any formula for this?Thanks..2016-07-11 12:14 AM
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.
Do following to correctly work with temperature sensor:
- enable the bits 6 and 7 in TEMP_CFG_REG(1Fh): enable aux ADC and enable temperature sensor.
- enable Block Data Update, BDU, feature. CTRL_REG4(0x23) , BDU (bit#7)=1.
- read both the ADC output 3 registers (because of BDU enabled): OUT_ADC_3_L(0x0C) and OUT_ADC_3_H(0x0D).
Data representation: 2's complement.
Useful bits: 8, left aligned, hence useful data in OUT_ADC_3_H.
Temperature sensor output change vs temperature: 1digit/degrCelsius
Best regards
Miroslav
2016-11-09 07:22 AM
Finally it starts to make sense to me.
I also use the LIS3DH and trying to understand the temperature reading from OUT_ADC3_H (0x0D). You may need a heat source to heat up the sensor to see the changes of the reading from OUT_ADC3_H. Here is the scenario: -my initial reading from OUT_ADC3_H get a value 0xFA (translated to -6) -consider this -6 value as a relative indicator of the temperature at the time of the reading. assuming your ambient temperature was 24degree C. -heat up the LIS3DH sensor with your choice of heat source. -reading the OUT_ADC3_H again and you will see the new value goes up. -each 1 degree C rise in the LIS3DH temperature will increment OUT_ADC3_H value by 1. -ie, if a person apply a heat source and risen the LIS3DH temperature 10 degree C higher, the OUT_ADC3_H will now give a new reading of 0x04 (-6+10=4). (The sensor is now 34 degree C) -after cooling the sensor back down to the ambient temperature, the OUT_ADC3_H will again give 0xFA (-6) -According to ketkar.satyajit, each chip may give different reading from the OUT_ADC3_H even from the same temperature. Unfortunate, that's why the LIS3DH is not referenceing the reading to any fix reference. Anyway, Happy Programmming. Best regards, Witt2017-10-26 02:00 AM
when LIS3DH is in room temperature condition(about 20°C), temperature variation data from the LIS3DH is as below:
temperature viriation is: -2,
temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2, temperature viriation is: -2,if '
temperature variation' is the
Comparison results
(current temperature to a base temperature)? if the value -2 represent the temperature variation compared to the last time , then -2-2-2....-2 equal to a very large value . then what is the base temperature? why thetemperature variation of my sensor is so much while the ambient temperature is about constant?
2017-10-26 03:01 AM
The temperature sensor can be used to measure temperature variations. The output value represents difference respect to a reference not specified value.
So it is not variation compered to the last measurement. The base temperature is not known, you would have to do a calibration for each device.
Lats say the base temperature for your device is 25°C, so your measurement is 25 - 2 = 23°C
2017-10-26 03:10 AM
Thanks a lot!!!
2017-10-26 05:49 PM
Then what is the purpose of the embedded temperature device ?