violinuxer Posted November 7, 2013 Report Share Posted November 7, 2013 Hi everyone! First of all, many thanks to jrowberg for making an absolutely wonderful library! It certainly saved me a lot of trouble! I recently have been working with the MPU-6050 and the Arduino for a project of mine. I've been using i2cdevlib for its DMP support, and I've run in to some issues with regard to accelerometer calibration and how it interacts with the DMP. I've worked with the example code in the various modes (worldaccel, yawpitchroll, etc) and it works great, but I've had some trouble with interperiting the data it gives back. This lead to my questions about the accelerometer calibration process. Here are some of my questions: First of all, does the DMP auto-calibrate the accelerometer and gyroscope? Does the DMP eliminate bias and scaling factors? From my experience, the gyroscope worked great (it actually informed me that my table wasn't level!) but the accelerometer at rest had nonzero values even when gravity was accounted for. Why does this happen? If the DMP doesn't calibrate the sensors, how would I go about doing it manually? Where should I look for this kind of process? One thing that I saw in the code was the use of gyro and accelerometer offsets. Might I use these to somehow remove the error? How does the DMP use these in its sensor calculations? How might I calculate the offsets for my sensors? Sorry for the barrage of questions... I'm pretty new to working with inertial sensors like this.... Thanks soo much! violinuxer Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted December 17, 2013 Report Share Posted December 17, 2013 Well, I don't know yet how the DMP works exactly, but I can tell you that you need to calibrate your particular offsets in order to make it work. Check this post: http://www.i2cdevlib.com/forums/topic/91-how-to-decide-gyro-and-accelerometer-offsett/ Quote Link to comment Share on other sites More sharing options...
Massel Posted December 22, 2013 Report Share Posted December 22, 2013 Hello, I have a similar question. Hope this fits here. I want to use the MPU6050 with the DMP to get the acceleration in world coordinates, which is available as function in the lib. And it works quite good. BUT now it comes to calibration. I have calibrated the acceleration in x,y and z direction with the raw acc template. I measured the acceleration of each axis in positive and negative direction. So I got the range and the offset of each axis. With this offsets I started the sample with DMP, but I got an offset of 300 in both directions for the z axis. The x and y axis seam to fit or be adapted within the DMP. The z axis stays with this relatively big offset. I know 300 of 4096 as 1g (scaled to +-8g) is not much, but I need to integrate this two times in order to get the distance. Therefore it needs to fit as good as possible. Without the DMP I would just add the offset and divide it by the range to get the acceleration in g. Is something like scaling possible within the DMP? Or anything else? (raw_accl + offset)/range; // range is calculated by the value for 1g and the value for -1g divided by two Hope I explained the problem well enough. Thx in advance! (by the way, this lib for the MPU6050 is awesome ) Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted December 24, 2013 Report Share Posted December 24, 2013 I want to use the MPU6050 with the DMP to get the acceleration in world coordinates First of all you need to calibrate the offsets for the DMP, check this other topic: http://www.i2cdevlib.com/forums/topic/91-how-to-decide-gyro-and-accelerometer-offsett/ To use only the DMP there is no need to apply manual offsets. Just use the functions defined in the library "SetOffset..." as described in the topic I just linked. Once you have the DMP working correctly (check it printing values on screen or something), you can try to use the other functions, as acceleration in real world coordinates, etc. If you are looking for some precision I would not use the function in world coordinates. This is because the yaw measure from the MPU is not really good, as it is not using a magnetometer measure. You can try but it didn't work for me. So I suggest you use the real accel function, in local coordinates. In case you want to rotate the measures to another coordinate system, I would use pitch and roll from the DCM and yaw from the DCM fusionated with another reading from a magnetometer, for example. In my experience, if there are many vibrations where your MPU6050 is located, you will need an extra calibration for the accel measures that return the realaccel function. I have found that this function returns a little offset depending on the frecuencies of this "environmental" vibrations. This is a bit complex and maybe far from your intentions.... Let us know if you achieve it! Quote Link to comment Share on other sites More sharing options...
Eqbal Khan Posted July 16, 2016 Report Share Posted July 16, 2016 I have done some work and made a auto calibration of mpu6050's accelerometer and gyroscope. I have discussed some problems and It needs improvement. See my post at:http://www.i2cdevlib.com/forums/topic/91-how-to-decide-gyro-and-accelerometer-offsett/ 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.