cancel
Showing results for 
Search instead for 
Did you mean: 

MEMS accelerometer measures

karoui
Associate II
Posted on April 26, 2013 at 18:25

HI,

 I want to know how to convert the values ​​that provides MEMS accelerometer on  g  because I need to set the threshold for single /double click detect.

For example in the program MEMS in STM32F4-Discovery_FW_V1.1.0 firmware how to change buffer[4]'s value en g ???

thanks in advance.
4 REPLIES 4
karoui
Associate II
Posted on April 26, 2013 at 19:05

for more explanation, for example, a value higher than 70 along the axis Z causes an interrupt so how to set the threshold for single / double click to generate this interrupt?

raptorhal2
Lead
Posted on April 27, 2013 at 21:05

See paragraph 7.21 in the LIS302DL data sheet.

Cheers, Hal

karoui
Associate II
Posted on April 28, 2013 at 13:06

my problem is how to convert data that i got from accelerometer on g  ?

while searching i found out that i have to multiply values on the buffer wich contains MEMS's mesures by the sensibility (18 mg/digit) because the bit FS is set to 0 is that correct? 

raptorhal2
Lead
Posted on April 29, 2013 at 20:26

You have the right idea, but the answer is a bit more complicated than that.

The accelerometer provides 8 bits (0 to 255) to represent full scale from maximum negative to maximum positive acceleration. The accelerometer data should be converted to a signed number, then subtract 128 before multiplying by the sensitivity. That will give an answer from -2304 to 2286 mg.

Cheers, Hal