Calculating Speed using Accelerometer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Calculating Speed using Accelerometer

5,940 次查看
ashokfair
Contributor IV

is it possible to determine an speed of Object using Accelerometer Sensor?

7 回复数

2,204 次查看
ashokfair
Contributor IV

Hi Jose,

I tried the Accelerometer example for calculating Speed. But its not giving proper output (PositionX,PositionY) . Always i could see the variation in position for the data X,Y,Z from Sensor is constant. can i get any help?

0 项奖励
回复

2,204 次查看
reyes
NXP TechSupport
NXP TechSupport

Hi,

If the acceleration of an object is known, we can get a proportional approximation of the velocity data if an integration is applied.

Unfortunately we do not have any updated document with information about how to do this with one of our new accelerometers, however, we do have an application note that mentions how to calculate velocity (and positioning) using the accelerometer MMA7260 (which is no longer manufactured), that can be used as a reference.

Application note AN3397 “Implementing Positioning Algorithms Using Accelerometers”: http://cache.freescale.com/files/sensors/doc/app_note/AN3397.pdf

Regards,

Jose

2,204 次查看
ashokfair
Contributor IV

Hi Jose,

Thank you!  Can i use MMA8451Q 3-Axis Digital Accelerometer (FRDM kit)? instead of the MMA7260

it can be possible ?

Regards,

Ashok r

0 项奖励
回复

2,204 次查看
reyes
NXP TechSupport
NXP TechSupport

Hi Ashok r,

Yes, that’s actually one of our current bests accelerometers, you can even find an example code for this sensor on the following link:  https://community.freescale.com/docs/DOC-98836

Regards,

Jose

0 项奖励
回复

2,204 次查看
ashokfair
Contributor IV

Thanks Jose , let me try out the example code :-)

0 项奖励
回复

2,204 次查看
ashokfair
Contributor IV

Hi Jose,

I tried the example code "https://community.freescale.com/docs/DOC-98836"  i am able to get 14bit Acc data. The same project i tried with process export it was working for 8bit Fast Acc data mode. But for 14bit mode i could not set the proper Configuration to Accelerometer.

res = MMA8451_WriteReg(MMA8451_CTRL_REG_1,  MMA8451_F_READ_BIT_MASK|MMA8451_ACTIVE_BIT_MASK);

      if (res==ERR_OK) {

        for(;;) {

          res = MMA8451_ReadReg(MMA8451_OUT_X_MSB, (uint8_t*)&xyz, 3);

    

          AccelX = xyz[0];

          AccelY = xyz[1];

          AccelZ = xyz[2];

         

        }

      }

how to configure for 14bit data ? in this above code

Regards,

Ashok r

0 项奖励
回复

2,204 次查看
reyes
NXP TechSupport
NXP TechSupport

TomasVaverka Can you please take a look at this inquiry, please?

0 项奖励
回复