SparkFun Forums 

Where electronics enthusiasts find answers.

What are we doing right with Artemis? What are we doing wrong? Let us know here!
User avatar
By FilipVukovic
#235880
Hi,

First of all, please let me know on what forum topic I should post this question if it does not belong here :D

I have an OpenLog Artemis with IMU (DEV-16832). I want to calculate absolute coordinates using that 9 DoF IMU. Now, I tried doing so using trigonometry and Euler angles but that exposes me to gimbal lock and who knows what other problems. So I research this topic further and found that people use Quaternions for such solutions (using Madgwick's Quaternion Update algorithm).

This approach does not work as I want it to since I got pretty much the same problem as before (with Euler angles).

Next, I found out that the DMP can calculate quaternions for me so I tried that out but weird things kept happening. For example, when the IMU is placed stationary on the table, quaternion (Q1, Q2, Q3) values kept increasing or decreasing and then after 15 seconds they would stop, then again when I would move it (for 90%) I would, again, have to wait for about 15s until those values "calmed down".

Also, the 9DoF values (aX, aY, aZ, gX, gY, gZ, mX, mY, mX) are not really stable when the IMU is stationary, but that's something I can solve using average values of n readings since that is just sensor noise I suppose.

Do I have to calibrate the IMU and if so, how? (I have not found any detailed description on how to calibrate it).

And I know its a long shot, but does anyone have any working solutions that calculate absolute coordinates using ICM-20948?

Thank You for Your help and time!
Best Regards
Filip V
User avatar
By PaulZC
#235882
Hi Filip,

You do need to calibrate the DMP, so the readings become stable. You need to rotate the IMU around all three axes. This allows the DMP to measure the 'scale' and 'offset' for each sensor channel.

Best wishes,
Paul
User avatar
By FilipVukovic
#235883
Hi Paul,

What does that mean exactly? Something like calibrating phone GPS?

Best Regards,
Filip
User avatar
By FilipVukovic
#235885
Hi Paul,

Thank You very much for the explanation! Now it's much better, but only after some time. It takes some time after powering on to get to starting point I guess

One last question. Di I have to do it every time I power it up?

Best Regards!
Filip
User avatar
By FilipVukovic
#235888
Hi Paul,

Thank You for Your help and time!

Best Regards!
Filip
By jremington
#235894
Do I have to calibrate the IMU and if so, how? (I have not found any detailed description on how to calibrate it).
Yes, if you are not using the DMP. The gyro and the magnetometer MUST be calibrated for the Mahony or Madgwick filters to work at all. There are plenty of tutorials posted on line, but to summarize:

1. Calibrate the gyro by collecting a few hundred readings with the sensor held still, average those and store them as offsets. Subtract the offsets from subsequent raw measurements.

2. Calibrate the magnetometer by following the procedure outlined in this forum post (and read the references linked in that post): https://forum.pololu.com/t/correcting-t ... eter/14315
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum