How to get real motion data using MPU6150

IMU - Inertial Measurement Unit.
SanjeeviRangan
Posts: 10
Joined: Wed Mar 20, 2013 3:58 am

How to get real motion data using MPU6150

Postby SanjeeviRangan » Fri Apr 05, 2013 12:05 pm

Once the device MPU6150 is successfully detected by I2C scanner, I tried the to get the raw data using Jeff's example MPU6050_raw.ino
the setup is kept undisturbed on a table and the sensor raw values keeps changing drastically. I tried keeping the setup in ground and found the similar results. The values are changing drastically. Please find the results below.

Is it possible to get the accurate motion data (Xtrans, Ytrans, Ztrans, Xrot, Yrot, Zrot) of a moving object in a 3D space using this device? If yes, how can I get the actual motion data using Jeff's example (either raw or DMP), I mean the meaningful motion data in mm/cm and degree?

Data for the setup kept undisturbed in a table.
Initializing I2C devices...
Sensor sleep status: 0
Sensor Device ID: 52
Testing device connections...
MPU6050 connection successful
Ax:832 Ay:832 Az:-17276 Gx:323 Gy:-186 Gz:148
Ax:916 Ay:740 Az:-17268 Gx:357 Gy:-158 Gz:166
Ax:848 Ay:784 Az:-17360 Gx:341 Gy:-175 Gz:160
Ax:812 Ay:812 Az:-17304 Gx:333 Gy:-157 Gz:158
Ax:772 Ay:648 Az:-17184 Gx:338 Gy:-183 Gz:150
Ax:836 Ay:812 Az:-17216 Gx:344 Gy:-190 Gz:156
Ax:820 Ay:836 Az:-17348 Gx:343 Gy:-177 Gz:145
Ax:952 Ay:768 Az:-17280 Gx:341 Gy:-163 Gz:149
Ax:820 Ay:628 Az:-17232 Gx:343 Gy:-176 Gz:143
Ax:928 Ay:672 Az:-17180 Gx:351 Gy:-163 Gz:146
Ax:792 Ay:836 Az:-17140 Gx:341 Gy:-185 Gz:176
Ax:824 Ay:820 Az:-17244 Gx:368 Gy:-182 Gz:189
Ax:760 Ay:780 Az:-17296 Gx:342 Gy:-169 Gz:131
Ax:764 Ay:588 Az:-17296 Gx:353 Gy:-162 Gz:149
Ax:832 Ay:688 Az:-17324 Gx:344 Gy:-160 Gz:156
Ax:772 Ay:980 Az:-17352 Gx:348 Gy:-166 Gz:145
Ax:768 Ay:716 Az:-17324 Gx:348 Gy:-166 Gz:172
Ax:832 Ay:808 Az:-17392 Gx:350 Gy:-185 Gz:160
Ax:688 Ay:864 Az:-17296 Gx:323 Gy:-144 Gz:124
Ax:824 Ay:732 Az:-17188 Gx:351 Gy:-178 Gz:168
abhimanyu
Posts: 94
Joined: Tue Oct 18, 2011 9:49 pm

Re: How to get real motion data using MPU6150

Postby abhimanyu » Fri Apr 05, 2013 3:53 pm

This is completely normal behaviour from MPU-6150. If you look at the full scale readings of Accel's and Gyro's components, they are 16-bit, i.e., the values vary from -32768 to 32767. See the attached screenshot of my current setup.
SS1 shows when the setup is lying on the table.
SS2 shows a hard tap of the setup to the table.
SS2 shows the setup falling to the ground!
Attachments
SS1 normal.png
SS1 normal.png (102.83 KiB) Viewed 14470 times
SS2 tap.png
SS2 tap.png (124.1 KiB) Viewed 14470 times
SS3 fall.png
SS3 fall.png (123.17 KiB) Viewed 14470 times
abhimanyu
Posts: 94
Joined: Tue Oct 18, 2011 9:49 pm

Re: How to get real motion data using MPU6150

Postby abhimanyu » Fri Apr 05, 2013 3:57 pm

In continuation of the previous post, if you want the data in human readable format, such as Euler angles or yaw-pitch-roll values, you should use the DMP sketch in the examples folder.

There is also a nice Processing sketch in the same folder to graphically view the orientation result.
[Be sure to connect D2 pin (interrupt) of Arduino to INT pin of the IMU 6DoF for proper DMP functioning].

Return to “IMU”

Who is online

Users browsing this forum: No registered users and 1 guest