-6
\$\begingroup\$

I'm using a cheap BLE accelerometer MPU 6050 that notifies X, Y, Z values as a single attribute. It seems that this type of value hasn't been standardized and I don't know how to read data correctly.

Here are some samples:

  • 0xFF52FFBC36AC
  • 0xFF5CFFD83656
  • 0xFF50FFB83620
  • 0xFF4EFFE43648
  • 0xFF6AFFEC3676
  • 0xFF4EFFEC365A

It is quite obvious, even moving the device that X, Y, Z can be split for example in 0xFF52, 0xFFBC, 0x36AC.

How I should convert it to something usable (signed [g] maybe?)?

I started by putting the device on the plane and rotating only around X axis, and I get these values (quickly collected as draft) for Y and Z (decimal):

|  Rotation Around X |      Y     |         Z           |
|:------------------:|:----------:|:-------------------:|
| 0°                 | 65535 or 0 | 13900 (only g here) |
| 45°                | 56000      | 11100               |
| 90°                | 49000      | 62000               |
| 135°               | 54000      | 52000               |
| 180° (upside down) | 65535 or 0 | 46300               |
| 225                | 8300       | 49000               |
| 270                | 1600       | 63000               |
| 315                | 9400       | 11100               |
| 360                | 65535 or 0 | 13900               |
\$\endgroup\$

closed as unclear what you're asking by Andy aka, Enric Blanco, Bimpelrekkie, PeterJ, Dmitry Grigoryev Jun 30 '17 at 8:51

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    \$\begingroup\$ Read the data sheet. \$\endgroup\$ – Andy aka Jun 23 '17 at 15:22
  • \$\begingroup\$ I can't find useful information beyond the fact that, with the +-2G scale, 2 bytes for each axis are used. I think this is more a problem of how the manufactured designed the data array sent via bluetooth or a trigonometric problem. \$\endgroup\$ – mattewre Jun 23 '17 at 15:46
  • 1
    \$\begingroup\$ Then look harder at the tables (specifically 6.2). \$\endgroup\$ – Andy aka Jun 23 '17 at 15:52
1
\$\begingroup\$

From the MPU-6000/MPU-6050 Register Map and Descriptions datasheet:

enter image description here

\$\endgroup\$

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