I cannot believe that I'm the only one who noticed that! I would write it off as a faulty device but I've got two brand new once here that produce identical output with the same unmodified firmware (V1.9)
Here is the description of the problem:
1. Initialize IMU level
2. Slowly turn 90 in roll
3. Return to horizontal orientation.
4. Slowly turn -90 in roll
5. Return to horizontal orientation.
6. Repeat for pitch and yaw (yaw rotate 360 in 90 deg increments)
Each axis output should correspond to the number of degrees turned. Instead I get the following:
Roll reading: actual roll: - 90 deg -> RLL output: - 120
+ 90 deg -> RLL output: + 120
Pitch reading: actual pitch: -90 deg -> PCH output: -50 (goes from 0 to -89 and then decreases to -50)
+90 deg -> PCH output: +50 (goes from 0 to 89 and then decreases to 50)
Yaw reading: actual yaw: 0 deg -> YAW output: 180
90 deg -> YAW output: 108
180 deg -> YAW output: 45
270 deg -> YAW output: -40
360 deg -> YAW output: -180
Replies
Artem,
I left you a long reply last night, but I must of accidentally deleted it as I edited it a few times and it was very late. So let me try again. There are different hardware revisions of the MPU6000 out there. The early ones were version C and later ones are version D.
A while back I had expanded on the imu v1.9 to make it into a head tracker and a gimbal stabilizer and control. I have a CLI system for manaul calibration of the mag offsets. Everything was working fine on my 2 imu3 boards, so I never encountered a problem. After seeing your discussion I remembered that the APM2 had this same issue with the accelerometer scaling. It was solved by asking the chip for it's product code and setting the proper scaling according to the chip installed. I couldn't find the codes in the data sheet, so I just ported it over from ArduPlane 2.40 to my 1.9 based gimbal controller. It will print out the product code on initialization. Both my boards reported 0x14 which is version C. I'll bet you have a version D. Version C needs the 4096 selected and ver D needs 8192 for the accel scaling. You can download the gimbal controller zip file here. Be sure and read the wiki for instructions. You can run it without any RC input or servos and print out euler angles. After loading the code start the Arduino serial monitor and reset the board. It will show you the product code. Look in the MPU6000.h tab in the #definitions for the code definitions. My boards were both 0x14.
My comment about the mag calibration was only concerning yaw. Version 1.9 has no mag offset calibration. My version has manual calibration using cli input. You need to rotate the board flat on a nonmetallic table to get the x & y offsets, then turn it on its' side 90 deg and rotate again to get the z offsets.
Try it out and let me know if it fixes the problem on your board. The cli is always on. Type 'set up' to see the main menu, type 'go' to print out data. Also look at the user selectable options in the defines.h tab.
arduimu_v3_gimbal_control.01.zip
Greg,
As some time has passed, I wonder if you have updated your program to use MPU9150? For you I think it would be easy, for me impossible!
ABC
Artem,
Your yaw values are off due to lack of magnetometer offset calibration with imu 1.9. Try my version and do the calibration procedure and you will be amazed with the yaw performance. Just stay away from large ferrous metal objects like cars or steel desk tops.
Hi! I am having the same problems as you with my ArduIMU V3 board. I was wondering if you ever figured out how to solve this issue?