1
\$\begingroup\$

I'm running into an odd issue with a motion control processor (MPU 6050 / 9150) that is returning raw gyroscope values as specified between the -/+ 32768 which in the way this gyro is configured corresponds to -/+ 2000 deg / sec. This makes total sense as this goes along with the specified documentation.

However, when I process data from the digital motion processor (6 axis sensor fusion) I get a maximum of 1429. I don't think that there's an error reading the data from the MPU buffer as the other measurements look good (reading from the same FIFO buffer). I assume this is likely some units issue that has to do with the 6 axis sensor fusion, and also likely involving radians

Wondering if any of you bright people with your light bulb brains have some insight here?

\$\endgroup\$
  • \$\begingroup\$ 2000 deg/sec is pretty fast, it means 5.5 rounds per second or 333rpm. Have you spin it at that speed? \$\endgroup\$ – Marko Buršič Feb 18 '16 at 18:51
  • \$\begingroup\$ Yea my application is a frisbee so its pretty easy to max out. 300rpm is on the lower end of the range. (300-1000) \$\endgroup\$ – SoundsSerious Feb 18 '16 at 18:56
  • \$\begingroup\$ Have you tried without fusion algorithm, to record only gyro rate? Likely the fusion algorithm, which is unknown and kept secure, is used for mobile devices, posture sensors,..etc everything to wear on humans or animals, perhaps the freesbee is an overkill for the algo. \$\endgroup\$ – Marko Buršič Feb 18 '16 at 19:07
  • \$\begingroup\$ Your MPU gyros saturating at 1429 even if You spin at maximum speed or it is one maximum reading You were read (and most of readings were below 1429)? I suspect hardware problem with capacitor connected to charge pump (pin 20). \$\endgroup\$ – Jakub Rakus Feb 18 '16 at 19:19
  • \$\begingroup\$ @MarkoBuršič Yea I've been able to read the 'raw' gyro values and they come out as expected. \$\endgroup\$ – SoundsSerious Feb 19 '16 at 0:16
1
\$\begingroup\$

So it turns out that my dmp packet structure is off from the specification.

The DMP returns a 48byte packet, and the accelerometer and gyroscope values coming out are 32 bit integers. When handled improperly this gives scaled and wrong data.

    /* ================================================================================================ *
 | Default MotionApps v4.1 48-byte FIFO packet structure:                                           |
 |                                                                                                  |
 | [QUAT W][      ][QUAT X][      ][QUAT Y][      ][QUAT Z][      ][GYRO X][      ][GYRO Y][      ] |
 |   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  |
 |                                                                                                  |
 | [GYRO Z][      ][MAG X ][MAG Y ][MAG Z ][ACC X ][      ][ACC Y ][      ][ACC Z ][      ][      ] |
 |  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  |
 * ================================================================================================ */
\$\endgroup\$
  • \$\begingroup\$ Perhaps you have trouble with endianess. If you look for ex. quaternion W comes in 0, 1, 2, 3 byte that's 32-bit, but possibly you read them swaped, for ex. the output is big endian and you read as little endian. \$\endgroup\$ – Marko Buršič Feb 19 '16 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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