• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Increasing data update rate of MPU9250

Status
Not open for further replies.

John Manuel

New Member
Hi,
I am using MPU9250 with Raspberry Pi and coding with Python. I am trying to make a virtual compass. The compass is working fine. But when I move the compass swiftly, it takes some time (around 2 seconds) to stabilize to the new direction. MPU9250 records a few (around 5) data points during the interval but it takes time to output it. Is there any way of reducing this latency and increasing the number of data points so that the virtual compass will follow the real motion more simultaneously?

I have been using the following Python library - Link. I have tried using "Accel Full Scale Select 16G" and "Gyro Full Scale Select 2000dps" but there was no observable difference.
 

dknguyen

Well-Known Member
Most Helpful Member
Have you actually read the datasheet of the MPU? Or are you relying solely on what the software library tells you? If not, you need to read it. Libraries don't make all options available (or make them available but obscure them due to lack of detail). For example, the MPU has configurable sampling rates and filters which are the first place you would normally look and it is odd you mention library configuration options before mentioning these.

https://www.invensense.com/download-pdf/mpu-9250-datasheet/
https://www.invensense.com/download-pdf/mpu-9250-register-map/

How swift is swift? A snap turn of the wrist is a lot more than the 2000deg/s of the MPU9250.

You also do not say what readings you are referring to. The MPU has magnetometer, acceleromter, gyro, and sensor fused readings.

If the compass has no trouble keeping up with a more reasonable turn rate, you might be saturating the gyro and many gyros give false readings when that happens (the output doesn't just saturate at the max angular velocity. It becomes unstable and oscillates or gives a wild reading).

https://www.analog.com/en/technical-articles/gyro-mechanical-performance.html
"Major Misbehavior Due to Mechanical Abuse"
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top