superkensou Posted August 19, 2013 Report Share Posted August 19, 2013 Hi, I'm using Arduino Uno, and GY-521 MPU6050, trying to run the example MPU6050_DMP6. I uncommented #define OUTPUT_READABLE_YAWPITCHROLL, commented the teapot define. and got data like this, really in a mess: Initializing DMP... Initializing I2C devices... Testing device connections... MPU6050 connection successful Send any character to begin DMP programming and demo: Initializing DMP... Enabling DMP... Enabling interrupt detection (Arduino external interrupt 0)... DMP ready! Waiting for first interrupt... ypr -11.65 -5.99 -0.20 ypr -117.95 -2.31 5.66 ypr 41.37 -71.00 6.51 ypr 180.00 0.00 -0.07 ypr -74.75 39.15 0.42 ypr 20.44 59.11 -29.95 ypr 179.98 -11.79 -0.56 ypr -80.68 -2.44 28.89 ypr 179.38 6.68 -3.68 ypr 66.52 52.38 36.50 ypr -37.36 -65.09 -20.80 ypr -180.00 -0.00 0.14 ypr -75.51 -47.65 15.82 ypr 1.41 1.11 -57.96 ypr -172.87 1.83 -43.98 ypr 106.46 -13.79 1.29 ypr -180.00 0.03 58.89 ypr 11.27 37.51 -51.48 ypr -30.22 39.54 34.30 ypr 180.00 0.01 5.10 ypr -1.55 -33.32 32.75 ypr -11.38 -6.58 -0.30 ypr -113.70 20.09 -58.35 ypr -5.59 -2.23 30.65 ypr 180.00 0.00 -0.07 ypr 50.86 57.03 19.18 ypr -6.88 59.55 13.49 ypr 179.98 -11.87 -0.52 ypr 36.61 25.55 5.77 ypr 179.35 7.47 -4.53 ypr 28.58 -28.44 -61.56 ypr 0.77 -23.04 62.77 PS: My chip works well with MPU6050_raw(can get stable data). Does anyone have any idea about this?why the data is so unstable? Quote Link to comment Share on other sites More sharing options...
superkensou Posted August 20, 2013 Author Report Share Posted August 20, 2013 some more ypr code I've got after running more than 5 minutes... ypr 4.93 -0.11 -0.70 ypr -112.40 -20.92 59.66 ypr -173.57 11.33 -58.04 ypr 180.00 0.00 0.00 ypr 4.54 -2.19 79.81 ypr 24.02 29.37 -51.33 ypr 180.00 -0.14 -1.41 ypr -115.94 -22.47 6.89 ypr -179.99 -15.97 -0.45 ypr 61.03 17.57 -18.42 ypr 31.60 60.21 20.00 ypr 180.00 8.80 0.00 ypr 122.38 -6.27 13.62 ypr -0.11 -0.28 -72.17 ypr -179.48 0.54 -44.66 ypr 177.74 5.32 11.87 ypr 180.00 0.16 -3.25 ypr 28.35 -50.26 33.27 ypr -50.64 50.66 -13.15 ypr -180.00 0.89 19.83 ypr 4.04 18.68 -44.68 ypr 4.93 -0.11 -0.70 ypr -112.38 -21.13 60.57 ypr -164.63 1.57 10.21 ypr -180.00 -0.16 0.00 ypr 38.98 15.24 50.89 ypr -26.42 -62.41 -27.59 ypr 180.00 -0.30 -1.39 ypr 3.27 -1.81 -1.47 ypr -179.99 -15.97 -0.45 ypr 63.43 33.10 4.14 ypr -167.66 4.00 -69.67 ypr 180.00 5.19 5.19 ypr 40.90 -28.86 27.70 ypr -0.14 0.34 61.74 ypr -179.48 0.53 -44.56 ypr 152.86 -1.59 6.94 ypr -180.00 0.00 -3.25 ypr 5.33 12.11 69.82 ypr 13.81 6.01 -65.48 ypr 180.00 1.14 21.02 ypr -6.77 -18.47 1.79 ypr 4.93 -0.12 -0.69 ypr -112.42 -21.16 60.79 ypr -162.64 -8.94 1.98 ypr -180.00 -0.16 0.00 ypr 53.22 44.92 17.46 ypr 15.44 -61.50 24.17 ypr 180.00 -0.23 -1.37 ypr 2.74 -12.13 -12.96 ypr -179.99 -15.81 -0.44 ypr 60.75 19.28 -16.50 ypr -13.53 2.70 -11.91 ypr 180.00 6.71 6.71 ypr -134.16 -8.63 -3.78 ypr -0.38 0.42 73.68 ypr -179.47 0.54 -44.60 ypr 168.94 19.80 -17.33 ypr 180.00 0.00 -3.41 ypr 28.53 -59.94 30.04 ypr -125.85 -1.14 -60.98 ypr 180.00 0.00 12.55 ypr 5.92 7.06 -60.96 ypr 4.93 -0.12 -0.70 ypr -112.51 -21.20 61.11 ypr -158.96 -8.42 10.03 ypr 180.00 -0.16 0.00 ypr -50.16 6.22 -14.19 ypr 6.62 -54.03 16.40 ypr 180.00 -0.20 -1.41 ypr 4.64 -2.29 -1.92 ypr -179.99 -15.98 -0.31 ypr 64.77 39.27 14.48 ypr -35.80 -0.74 6.15 ypr 180.00 6.36 0.00 ypr -143.03 32.17 17.79 ypr -0.06 -0.26 -58.45 ypr -179.50 0.51 -44.58 ypr 146.19 8.82 5.04 ypr -180.00 0.00 -3.41 ypr 9.68 -29.75 58.84 ypr -115.89 5.90 58.95 ypr 180.00 1.16 20.08 ypr -7.35 -13.39 -73.16 ypr 4.93 -0.12 -0.69 ypr -112.40 -21.27 61.21 ypr -167.40 -6.94 42.11 ypr -180.00 -0.16 0.00 ypr -35.96 45.48 -37.33 ypr -16.03 37.27 52.02 ypr 180.00 -0.28 -1.49 ypr 25.53 -7.26 14.60 ypr -179.99 -15.97 -0.47 ypr 64.84 41.82 17.74 ypr 51.74 -48.77 -40.87 ypr 180.00 8.80 0.00 ypr -5.92 -43.18 8.88 ypr -0.14 -0.28 -80.78 ypr -179.57 0.50 -44.57 FIFO overflow! FIFO overflow! ypr 4.93 -0.11 -0.70 ypr -112.44 -21.40 61.89 ypr -179.44 9.42 -60.16 ypr -180.00 0.00 0.16 ypr 1.52 32.79 -39.06 ypr 87.70 18.20 -13.04 ypr 180.00 -0.15 -1.39 ypr 177.74 -28.80 56.23 ypr -179.99 -16.00 -0.45 ypr 54.15 -4.55 -51.24 ypr 21.22 -67.87 -4.07 ypr 180.00 7.59 7.59 ypr 179.61 -18.48 41.08 ypr -0.62 0.33 34.91 ypr -179.52 0.52 -44.59 ypr -165.64 32.57 -4.00 ypr 180.00 0.00 -3.25 ypr -18.68 27.09 52.22 ypr 49.46 38.78 26.85 ypr 180.00 1.19 12.02 ypr -77.31 -46.39 -24.82 ypr 4.93 -0.11 -0.70 ypr -112.44 -21.35 61.64 ypr -166.49 -13.12 8.15 ypr -180.00 -0.16 0.16 ypr -24.29 -18.15 -34.57 ypr 47.06 6.01 -8.51 ypr 180.00 -0.20 -1.34 ypr -6.02 -22.68 19.55 ypr -179.99 -15.98 -0.42 ypr 61.39 22.47 -11.83 ypr -53.45 41.70 -26.95 ypr 180.00 8.17 0.00 ypr 47.74 -14.36 -6.32 ypr -0.64 0.01 -20.35 ypr -179.52 0.55 -44.53 ypr 167.33 -45.66 29.00 ypr 180.00 0.00 -3.09 ypr -14.87 35.06 52.38 ypr 9.48 -21.05 68.95 ypr 180.00 0.00 19.11 ypr 8.71 -15.83 52.99 ypr 4.93 -0.10 -0.70 ypr -112.42 -21.39 61.77 ypr -164.32 -1.01 -48.57 ypr 180.00 0.00 0.00 ypr -2.13 -9.39 -55.68 ypr 15.31 -30.62 59.38 ypr 180.00 -0.24 -1.39 ypr 179.41 5.02 39.98 ypr -179.99 -15.98 -0.42 ypr 43.81 -20.20 -69.44 ypr -35.35 26.23 -5.43 ypr 180.00 0.00 8.17 ypr 4.12 3.28 46.79 ypr -0.64 0.30 30.08 ypr -179.51 0.54 -44.55 ypr 178.27 2.71 -30.20 ypr 180.00 0.17 -3.09 ypr -6.10 -14.85 74.93 ypr 38.36 -57.67 2.09 ypr -180.00 -0.14 14.53 ypr 1.55 -2.44 66.99 ypr 4.92 -0.10 -0.70 ypr -112.34 -21.60 62.57 ypr -169.96 5.06 -23.09 ypr 180.00 0.00 0.00 ypr 43.67 87.22 1.44 ypr 43.28 43.19 -35.94 ypr 180.00 -0.27 -1.41 ypr -4.97 -11.16 2.61 ypr -179.99 -16.00 -0.43 ypr 45.48 -18.62 -68.87 ypr 22.92 59.79 2.53 ypr 180.00 0.00 0.00 ypr -18.87 46.76 43.08 ypr -0.34 -0.22 -64.43 ypr -179.59 0.50 -44.60 ypr 146.08 3.05 5.34 ypr -180.00 0.00 -3.09 ypr -1.29 17.42 70.42 ypr 51.58 63.93 26.00 ypr -180.00 -0.12 11.65 ypr -0.51 0.40 -81.64 ypr 4.92 -0.10 -0.70 ypr -112.52 -21.73 63.52 ypr -176.82 -3.35 68.95 ypr -180.00 -0.16 0.00 ypr 14.52 -11.68 71.80 ypr 148.06 16.10 -4.77 ypr 180.00 -0.11 -1.39 ypr -3.47 2.51 11.79 ypr -179.99 -16.00 -0.43 ypr 65.02 50.71 28.37 ypr -16.68 79.43 -9.68 ypr 180.00 8.13 8.13 ypr -119.13 1.93 -11.91 ypr -0.19 -0.28 -89.57 ypr -179.52 0.53 -44.59 FIFO overflow! ypr 4.93 -0.10 -0.69 ypr -112.47 -22.07 65.10 ypr 163.52 -1.41 -75.83 ypr -180.00 -0.16 0.16 ypr -31.63 -28.42 1.34 ypr -16.84 39.17 50.20 ypr 180.00 -0.23 -1.39 ypr 45.51 -0.78 -30.74 ypr -179.99 -15.84 -0.40 ypr 52.01 -3.49 -49.24 ypr -58.84 14.98 -26.80 ypr 180.00 9.46 9.46 ypr 54.24 56.33 -16.96 ypr -0.30 0.41 85.54 ypr -179.53 0.54 -44.59 ypr 175.36 2.34 5.45 ypr 180.00 0.17 -2.93 ypr -11.56 17.04 64.40 ypr 19.30 -47.72 41.07 ypr 180.00 1.15 21.24 ypr -2.95 16.07 41.08 ypr 4.93 -0.10 -0.69 ypr -112.54 -21.78 63.87 ypr 179.05 5.47 -54.12 ypr 180.00 -0.16 0.00 ypr 23.71 -21.04 58.83 ypr -152.75 -26.21 -5.89 ypr 180.00 -0.21 -1.37 ypr 4.91 -14.80 9.47 ypr -179.99 -15.84 -0.42 ypr 65.37 51.28 30.28 ypr -159.45 3.49 -83.20 ypr 180.00 0.00 8.17 ypr -22.12 58.89 20.27 ypr -0.11 0.30 54.32 ypr -179.54 0.53 -44.56 ypr -173.48 39.03 -7.83 ypr 180.00 0.16 -2.93 ypr -12.65 32.16 57.77 ypr -75.55 -66.39 23.56 ypr -180.00 -0.08 8.01 ypr -0.19 -0.21 -85.81 ypr 4.93 -0.10 -0.69 ypr -112.55 -21.83 64.10 ypr 134.73 11.37 69.93 ypr 180.00 -0.16 0.00 ypr 50.17 -46.80 -42.17 ypr 22.52 28.32 -52.93 ypr 180.00 -0.16 -1.41 ypr 4.18 -11.40 1.24 ypr -179.99 -15.68 -0.40 ypr 57.89 16.28 -22.62 ypr -95.36 32.80 -54.93 ypr 180.00 5.45 0.00 ypr -56.56 -42.56 -28.73 ypr -0.06 -0.26 -57.36 ypr -179.48 0.52 -44.61 ypr -152.37 15.56 -5.11 ypr 180.00 0.17 -3.09 ypr -26.85 37.96 42.29 ypr -43.71 -53.55 17.55 ypr 180.00 0.00 16.26 ypr -2.13 15.21 31.95 ypr 4.93 -0.10 -0.69 ypr -112.47 -21.71 63.34 ypr -166.50 -23.45 61.53 ypr 180.00 0.00 0.16 ypr 15.06 41.49 23.38 ypr 30.51 5.09 -10.54 ypr 180.00 -0.23 -1.42 ypr 174.18 70.42 -12.67 ypr -179.99 -15.84 -0.24 ypr 63.70 43.76 16.85 ypr 140.64 -14.50 -35.97 ypr 180.00 0.00 0.00 ypr 50.84 66.75 -22.49 ypr -0.15 0.35 64.68 ypr -179.51 0.53 -44.67 ypr -146.25 -8.67 3.86 ypr 180.00 0.00 -3.09 ypr 41.60 -67.87 12.42 ypr -77.70 22.33 -34.08 ypr -180.00 0.90 21.52 ypr 3.04 -2.97 21.18 ypr 4.93 -0.10 -0.69 ypr -112.40 -21.63 62.86 ypr 168.45 7.22 37.45 ypr 180.00 -0.16 0.16 ypr 19.46 -35.80 52.44 ypr 5.78 56.33 -14.40 ypr 180.00 -0.17 -1.46 ypr 163.22 -33.85 34.24 ypr -179.99 -15.84 -0.40 ypr 60.88 28.79 -5.13 ypr 40.02 -28.23 -25.02 ypr 180.00 11.31 11.31 ypr -23.55 14.77 5.05 Quote Link to comment Share on other sites More sharing options...
Jeff Rowberg Posted August 26, 2013 Report Share Posted August 26, 2013 Is this running on a standard Arduino Uno platform, and do you know if any other output formats work correctly? This looks like the FIFO data is misaligned, so that e.g. the quaternion data is off by one or more bytes. Try dumping the FIFO count out the serial port as well and make sure that it is in fact growing in 42-byte chunks. If it is some other increment, then the data is not being generated and/or read properly. Quote Link to comment Share on other sites More sharing options...
superkensou Posted August 26, 2013 Author Report Share Posted August 26, 2013 Oh, I see, my I2C Library is not a correct one. Arduino import Library to document/Arduino/Libraryies and I did put the I2CDev Lib into the install directory.so actually it was using the the previous one. now I've got the correct data. Thank you Jeff R. Staunlich 1 Quote Link to comment Share on other sites More sharing options...
nicososa Posted October 28, 2013 Report Share Posted October 28, 2013 Hello. I have a similar issue. After a minute of working properly, the dmp output data gets messed. I dumped the fifo count and I get a count not proportional to 48, for example 52 (actually it with mpu-9150). How is that this happens and how can it be avoided? Thank you very much Quote Link to comment Share on other sites More sharing options...
Jeff Rowberg Posted November 4, 2013 Report Share Posted November 4, 2013 I have a similar issue. After a minute of working properly, the dmp output data gets messed. I dumped the fifo count and I get a count not proportional to 48, for example 52 (actually it with mpu-9150). How is that this happens and how can it be avoided? It sounds like your DMP is generating a different binary packet than what the existing MotionApps code is expecting, and since it sends larger packets and only reads smaller ones, eventually the FIFO overflows. You would need to somehow decode the DMP packet structure and change the read size to whatever the correct number of bytes is. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.