# How to get linear acceleration with IMU

**URL:** <https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334>\
**Category:** General Guidance\
**Created:** [June 25, 2024, 9:36am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334 "2024-06-25T09:36:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mubash3r](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@mubash3r](https://forum.arduino.cc/u/mubash3r)\
**Post date:** [June 25, 2024, 9:36am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/1 "2024-06-25T09:36:08Z")

</div>

Hello Everyone!

I am planning to use IMU sensor in a Football to get its linear acceleration.  
At the moment, I have a kit with MPU6050 and I am experimenting with its data. The main problem I am facing is that when I tilt/rotate the kit, it shows acceleration. I don't want this. I am only interested in the data related to football movement from one point to other. When football is kicked, it definitely spins and rotates. I want to remove this spinning/rotating effect. Direction of motion is not required, just acceleration is required. In other words, I am just interested in how hard the ball is kicked.

I need your help regarding the following

1-Is MPU6050 suitable for this type of project? If not, what are other options?  
2-If MPU6050 can do the job then how can I remove the effect of spin and rotation of the sensor?

Looking forward for your advice/suggestion.

Thanks & regards.

---

<div class="post-metadata">

**Author:** ![SurferTim](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/surfertim/32/1072341_2.png) [@SurferTim](https://forum.arduino.cc/u/SurferTim)\
**Post date:** [June 25, 2024, 9:45am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/2 "2024-06-25T09:45:56Z")

</div>

You probably need to use the gyro to determine which way is forward, then use that to determine which accelerometers to use.

---

<div class="post-metadata">

**Author:** ![DrDiettrich](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drdiettrich/32/219048_2.png) [@DrDiettrich](https://forum.arduino.cc/u/DrDiettrich)\
**Post date:** [June 25, 2024, 11:26am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/3 "2024-06-25T11:26:04Z")

</div>

> [@mubash3r](#):
>
> how can I remove the effect of spin and rotation of the sensor?

You have to calculate the effective acceleration vector, based on all (XYZ) axes, IIRC it's the sqrt of the sum of all squared accelerations.. With the ball in rest this vector is 1 g towards center of earth. With the ball pushed the acceleration vector will increase and point somewhere else, depending on the rotation of the ball. In free flight acceleration will be almost the same as in rest.

---

<div class="post-metadata">

**Author:** ![SurferTim](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/surfertim/32/1072341_2.png) [@SurferTim](https://forum.arduino.cc/u/SurferTim)\
**Post date:** [June 25, 2024, 11:38am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/4 "2024-06-25T11:38:49Z")

</div>

After reading DrDeittrich post, once the ball is kicked, there is no further acceleration except down. In free flight, the ball falling at 32 feet per second per second, it would be zero G. Like riding the Vomit Comet.

Edit: ...except maybe wind speed and direction.

---

<div class="post-metadata">

**Author:** ![DrDiettrich](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drdiettrich/32/219048_2.png) [@DrDiettrich](https://forum.arduino.cc/u/DrDiettrich)\
**Post date:** [June 25, 2024, 11:44am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/5 "2024-06-25T11:44:06Z")

</div>

> [@SurferTim](#):
>
> it would be zero G

Only if the ball is falling down freely. But you will not normally drop the ball, so that a kick will give it an upward speed as well. That speed then is reduced by gravity.

---

<div class="post-metadata">

**Author:** ![SurferTim](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/surfertim/32/1072341_2.png) [@SurferTim](https://forum.arduino.cc/u/SurferTim)\
**Post date:** [June 25, 2024, 11:47am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/6 "2024-06-25T11:47:59Z")

</div>

Yes, at 32 feet per second per second. Zero G.

---

<div class="post-metadata">

**Author:** ![DrDiettrich](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drdiettrich/32/219048_2.png) [@DrDiettrich](https://forum.arduino.cc/u/DrDiettrich)\
**Post date:** [June 25, 2024, 11:53am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/7 "2024-06-25T11:53:24Z")

</div>

> [@SurferTim](#):
>
> Zero G.

**Zero** G is **zero** feet per second per second.

---

<div class="post-metadata">

**Author:** ![SurferTim](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/surfertim/32/1072341_2.png) [@SurferTim](https://forum.arduino.cc/u/SurferTim)\
**Post date:** [June 25, 2024, 11:54am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/8 "2024-06-25T11:54:02Z")

</div>

No, that would be one G.

Edit: Maybe I'm wrong. I'll have to think about it. It's acceleration and not gravity, then I'm wrong.

Edit2: Wouldn't the fall be acceleration at 32 feet per second per second? Maybe I had it backwards. Zero G at rest, -1G falling. That sound correct?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [December 22, 2024, 11:54am UTC](https://forum.arduino.cc/t/how-to-get-linear-acceleration-with-imu/1275334/9 "2024-12-22T11:54:12Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
