2
\$\begingroup\$

The MPU-6500 is an IMU IC from InvenSense/TDK that superseded the (legendary, by now) MPU-6050 IMU IC. Supposedly, the major performance improvement was that it has a sample rate of 32k samples a second, over the earlier 8k/s, (which, itself was only really achievable on the versions of the MPU-6000's that had the faster SPI bus.)

At least, this is what just about every wannabe drone blog small time web site keeps saying. As well as flight controller makers that include this IMU, paired with the higher end STM32s, like the F4 or F7.

Edit: I've been asked to provide sources to this claim.

I, however, am not seeing much to support this claim in the actual datasheets for said devices.

There are a few places where sample rate is mentioned in the datasheet:

To add insult to injury, there is also the simple math of it. The data that would need to be transferred is X, Y, Z, angular rate values, as well as X, Y, and Z, acceleration values, where each scalar/value is stored as a signed short/short int (16 bits). This adds up as 16 bits * 6 values, or 96 bits, for one sample for all dimensions and all sensors. To move this out of the IMU and into a MCU at 32k samples a second would require a bit-rate of at least 32k x 96 bits, or just over 3Mbps.

If, however, you look at the specs for the SPI bus for the IMU, the fastest it seems to be able to send data is about 1Mbps at best 1/3 of the required theoretical. This is not factoring in overhead, which probably pushes the practical need up to about 4Mbps. Not looking good here either.

What really is the true useable sample rate for the MPU-6500? Can one put the IMU into a mode where is vomits out ~3Mbps worth of gyro/accel data, or is most of the internet wrong, or reading the wrong part of the story?


Note: there are at least 3 revisions of the datasheet for this IMU, I have checked all and they seem to be consistent with what I have posted above. The links I give are to revision 1.1, and are provided by DigiKey.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ The data sheet does mention in several places that certain read-only registers (including the sensor data registers) can be read using SPI at 20 MHz. Still doesn't explain the claim of 32 kHz sample rate. For example, all of the specs related to the gyros agree that their maximum sample rate is 8 kHz. \$\endgroup\$
    – Dave Tweed
    Commented Jul 25, 2022 at 0:33
  • \$\begingroup\$ Right. Best explanation I can come up with for the claim of 32 kilo Hertz sample rate is Table 4, combined with the fact that the gyros oscillate at something like 32 kilo Hertz. Of course, Nyquist–Shannon sampling theorem forbids a 32 kilo Hertz sample rate with a 32 kilo Hertz oscillating member. \$\endgroup\$
    – Charlie
    Commented Jul 25, 2022 at 1:10
  • \$\begingroup\$ .... that, and a 4x overstatement of capability tends to be REALLY convenient mistake if you are trying to sell the things, or devices that use them. Which is something I can't help but muse about . . . \$\endgroup\$
    – Charlie
    Commented Jul 25, 2022 at 1:14
  • \$\begingroup\$ "this is what just about every wannabe drone blog small time web site keeps saying." - can you give an example? \$\endgroup\$ Commented Jul 25, 2022 at 5:57
  • \$\begingroup\$ The datasheet mentions something called "Fchoice" which isn't defined there. Searching that leads to the register description, which also indicates that you get Fs=32kHz with one of the settings (table 4.6). \$\endgroup\$
    – hobbs
    Commented Jul 25, 2022 at 8:00

2 Answers 2

5
\$\begingroup\$

I can't explain what the MPU-6500 does at 32kHz, but it does appear that it really can do it.

  1. Setting sample rate to 32kHz.

Table 4 from the datasheet says you can do it:

enter image description here

  1. Setting the sample rate to 32kHz.

Table 4.6 from the MPU-6500 Register Map and Descriptions gives you more details on the mysterious "Fchoice":

enter image description here

  1. Transferring the data fast enough.

Table 5 of the datasheet says that the maximum speed for reading and writing to the SPI bus is 1MHz, but right under that it says that you can read from the registers as 20MHz:

enter image description here

  1. Transferring the data fast enough.

Figure 2 and Table 8 from the datasheet give you the timing diagram for the 20MHz transfer rate for the SPI bus.

enter image description here

enter image description here

If you do all of that, it seems that you will get (according to the decription of register 27) data sampled at 32kHz with a bandwidth of 8800 Hz.

\$\endgroup\$
1
  • \$\begingroup\$ I've accepted this as the answer for now, as you have at least shown that there is a sequence of instructions that can be sent that are expected to put the chip into some kind of 32 kHz mode. However, I'm expecting another shoe, as I've been able to put a ton of chips into speeds they couldn't actually physically handle. My MPU-6500s arrive tomorrow. I will see for myself what actually happens! \$\endgroup\$
    – Charlie
    Commented Jul 28, 2022 at 1:19
3
\$\begingroup\$

What really is the true useable sample rate for the MPU-6500? Can one put the IMU into a mode where is vomits out ~3Mbps worth of gyro/accel data, or is most of the internet wrong, or reading the wrong part of the story?

Good question. As JRE shows in his answer, you can read the data registers at 32 kHz. However the gyro mechanical oscillation frequency is nominally 27 kHz, and there is a large noise spike at about 3 kHz:-

enter image description here

So you can sample at 32 kHz to get the lowest possible latency, but to get a good signal you will still have to low pass filter the data with a bandwidth < 3 kHz, which will increase latency to about the same as sampling at 8 kHz. In most applications you will probably want to reduce the bandwidth even further to filter out mechanical noise.

\$\endgroup\$
2
  • \$\begingroup\$ This data is for the MPU-9000 series, which I would certainly expect to be a different die from the earlier MPU-6000, since the 9000s also contain a magnetometer. I suppose it COULD still be the 6000s MEMS lithography, I've seen weirder crap. Even so, it's really not certain the linked data makes a good apples-to-apples comparison, but it's still very interesting. To think that even the next generation units would also have odd gyro issues. :facepalm: +1 \$\endgroup\$
    – Charlie
    Commented Jul 28, 2022 at 1:13
  • 1
    \$\begingroup\$ @Charlie "The MPU-9250 is a System in Package (SiP) that combines two chips: the MPU-6500..." invensense.tdk.com/products/motion-tracking/9-axis/mpu-9250 \$\endgroup\$ Commented Jul 28, 2022 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.