2020-11-30 02:59 AM
I'm using sensor LIS2DH12, acceleration data I get looks OK. But I'm bit confused about temperature data.
CTRL_REG4.BDU is set to 1
CTRL_REG4.FS is set to 0 (= 2g scale)
CTRL_REG1.LPEN is set to 0
CTRL_REG4.HR is set to 0 (= 10bit normal mode)
CTRL_REG1.ODR is set 0x04 (50Hz)
TEMP_CFG_REG.TEMP_EN is set to 1 (enable temperature sensor)
I left measuring for 10 minutes, once every second, and I get these values (99% of time):
OUT_TEMP_H = 0b01111011 (7Bh = 123)
OUT_TEMP_L = 0
rarely I get value like 6Fh, 7Fh, 73h, 77h, 79h, 6Bh (I take those as some fluctuations).
Ambient temperature is around 23C.
How to interpret those values? They look too high to me.
UPDATE:
In normal mode (10bit) I get:
OUT_TEMP_H = 0b01111011 (7Bh = 123)
OUT_TEMP_L = 0
In low-power mode (8bit) I get:
OUT_TEMP_H = 0b01101111 (6Fh = 111)
OUT_TEMP_L = 0
This doesn't seem right.
Solved! Go to Solution.
2020-12-01 03:35 AM
I would check if I get some proportional response from the temperature sensor.
If not, there is definitely something wrong.
2020-12-01 03:57 AM
If I touch it by finger there is no noticable response. When I touch it by soldering iron, OUT_TEMP_H goes to 0b01111111 (which is absolute maximum as I understand it)
2020-12-01 04:04 AM
Hi @Chupacabras , @Ozone ,
then there could be something not working well...
>> I already contacted official ST support to ask about this problem. Waiting for response.
This is of course a good approach (going though the OLS / Representatives). Did you also open a report on Github (which is maintained by ST employees, as you correctly guessed)?
-Eleon
2020-12-01 04:13 AM
Nope. I did not contact anybody on github so far.
My approach is generally to ask on public forum first.
I might misunderstood something silly, somebody could give me some easy answer.
Then contact official support. There are actually 2 problems. The device is working weirdly. There are missing information about this in datasheet.
2020-12-01 09:27 AM
Hi @Chupacabras ,
well, the datasheet is not so clear and I'll report it internally, even if one can find the info to decode data in p.12 (maybe except from the 25°C "zero point"). Did you have the possibility to try a different LIS2DH12 sample?
-Eleon
2020-12-01 11:38 AM
I have changed the IC and now it looks like working.
I'm getting values like:
OUT_TEMP_H = 0b00000100 (04h = 4)
OUT_TEMP_L = 0b11000000 (C0h = 192)
that translates to 29.75C. This looks like reasonable value. Not sure whether this measuring is useful or not, but at least I got a reasonable value.
That means the problem was in defective IC. Case closed, I guess.