cancel
Showing results for 
Search instead for 
Did you mean: 

MIS2DH relative acceleration measurement

Philip Scharf
Associate
Posted on March 07, 2018 at 09:33

Hi

I�m working on a projekt where I have to measure the acceleration relative to the gravitation. I want to get an alert when there is an relative acceleration in any direction greater than x mg. I have tried with the build in high-pass filter and the click function, but I didn�t get results as expected. Does someone have an idea how i can use the build in functions of the sensor to get this working?

And I have a second question related to the sensor:

When i measure the temperature with the build in sensor, I get the values as 8bit two�s complement, left justified, but I haven�t found out how to convert them to the real temperature. I mostly get values of about -3 or -4 (converted from two�s complement into decimal) in a normal heated room. The temperature range is -40 to 85.

#relative-acceleration #lis2dh
3 REPLIES 3
Miroslav BATEK
ST Employee
Posted on March 07, 2018 at 14:33

Please share you sensor configuration and what was exactly the problem. What results do you expect?

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.
Posted on March 08, 2018 at 14:32

Thank you for your answer. I solved the questions above, but I have another problem with the 6D position detection.

First of all my configuration:

  • All three Axis enabled, Low-Power mode 10Hz (Register 0x20=0x2F)
  • BDU activated, +-2g FS (Register 0x23=0x80)
  • AOI1 on INT1 PIN (Register 0x22=0x40)
  • INT1 Treshhold 500mg (Register 0x32=0x20)
  • INT1 Time 0s (Register 0x33=0x00)
  • INT1 6D position detection, z high & low activated (Register 0x30=0xF0)

With this configuration the PIN INT1 is high, when the value of the z-axis is above about 900mg or below -900 mg, but the treshhold should be 500mg.

Have I made a mistake in the configuration?

Is there a calulation, to get the angle with the configured treshhold?

Posted on March 12, 2018 at 15:57

The angle and the threshold have following relation    =    × sin (  ) where A is acceleration in g, g is Earth?s gravity (1g) and ? is angle in degrees.

So for your value 0x20 (500mg) the interrupt is generated up to 30° deviation from landscape up or landscape down orientations (

Register 0x30=0xF0)

.

0690X0000060A2CQAU.png

To detect these two orientations the values in X and Y axis is compared with the threshold. You can check the INT1 pin is high only if the value in X and Y axis are bellow 500mg, Z axis value is not important.