Jump to content
I2Cdevlib Forums

How to get speed from MPU6050


Recommended Posts

Hello everyone!

I am experimenting with MPU6050. I am working with Jeff Rowberg's library using DMP (MotionApps v2.0)). MPU6050 gives acceleration on x, y & z axis. I want to know, at what speed the object is moving. Please suggest the proper way for this purposeĀ 

Thanks & regards.

Link to comment
Share on other sites

  • mubash3r changed the title to How to get speed from MPU6050

Fundamentally, you want to take the linear acceleration output (accel data with gravity removed) and then integrate it over time. The integral of acceleration is velocity. However, practically this is quite difficult to do with reasonable accuracy. You need to obtain and process acceleration data at consistent and precise intervals--sometimes more precise than the IMU or your MCU are able to achieve. Errors in each computed data point compound over time, so you drift rapidly away from accurate values.

This process is called dead reckoning (and is often extended with a second integration of velocity to find position), and it's just plain hard to do well, especially with inexpensive consumer IMUs and microcontrollers.

Ideally, you can augment the data with something like a GPS for an external reference point. For example, if you've computed a 5m/sec velocity but your GPS says you're staying in the same place, you can use this info to reset your velocity to zero and stay closer to accurate output.

Here's one of many other discussions about the topic:

https://forum.arduino.cc/t/imu-calculating-velocity/902488/26?page=2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...