Speed calculating using MMA8452 accelerometer.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Speed calculating using MMA8452 accelerometer.

1,212 Views
NakkaMalesh
Contributor I

Hello,

           This is Malesh. I am trying to calculate Speed of Moving vehicle using MMA8452 accelerometer.

When i had given a JERK, it given me set of +ve values following with set of -ve values and their sum is ZERO. But after the JERK when i am moving with constant speed for some time then came to rest(means Deceleration) at this moment it doesn't given me -ve values as a result my speed is not decreased, it showing ERROR.

Is my assumption is correct(accelerometer gives -ve values in deceleration)? Please explain me, how this accelerometer behaves in Acceleration and Deceleration.

Thank you.

0 Kudos
Reply
3 Replies

1,149 Views
Campbell_C
Contributor I

Thanks for the information MyAARPMedicare

0 Kudos
Reply

1,161 Views
NakkaMalesh
Contributor I

Hi Reyes,

             Is the code of AN3397 is Worked well? some functions are missing in that PDF? They achieve it accurately? how accurately they are achieve it?  why nxp stop manufacturing MMA7260 accelerometer.

0 Kudos
Reply

1,200 Views
reyes
NXP TechSupport
NXP TechSupport

Hi Malesh,

 

In theory it is possible to calculate speed of an object using an accelerometer sensor.

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

 

Unfortunately we do not have any updated document with information about how to do this with the MMA8452, however, we do have an application note that mentions how to calculate velocity/speed (and positioning) using the accelerometer MMA7260 (which is no longer manufactured), but you can use this document as a reference to create your own code.

Application note: AN3397 “Implementing Positioning Algorithms Using Accelerometers”: https://www.nxp.com/docs/en/application-note/AN3397.pdf  

 

You can also use the bare metal example project of the MMA8451Q that can be found in NXP communities: https://community.nxp.com/t5/Sensors-Knowledge-Base/MMA8451Q-Bare-metal-example-project/ta-p/1127268

 

I hope this helps.

0 Kudos
Reply