AltIMU-10 V5 - Tilt compensated Compass

Hi,

I bought a AltIMU-10 V5 board this past week. This is my first time working with an IMU device. I managed to get it hooked up to my Arduino UNO and I’m reading data from it. I’ve used the Calibrate sketch and entered the values in the MinIMU9AHRS sketch.

When I read the value from the Serial Monitor, I see the values changing when I move the board.

I modified the output.ino to display the MAG_Heading and this is where the problem comes in. The values doesn’t correspond with the actual headings I’m point the device in. Not even close. The values seem to vary from 26 to around 175. I even get some negative values.

I would like to use this as a tilt compensated compass to drive a Homebrew Satellite Tracking Antenna.

I’ve searched high and low on the internet, to find someone that has used this board in a similar compass project, but I had no luck.

Regards

JJ Siebert
ZR6JS
South Africa

Hi, JJ.

I am sorry you are having trouble getting the magnetometer data you expect from your AltIMU. Can you show me specifically how you modified the code to display MAG_HEADING? Can you also post a sample of the MAG_HEADING values you are getting? If you prefer, you can upload a text file instead of copying and pasting into your reply.

-Jon

Hi Jon,

It seems my AltIMU-10 V5 was just missing you guys from Pololu (or maybe my understanding of the program was wrong).

I was using MAG_Heading as is, but I never converted it to degrees. I also didn’t correct the heading if it was less than 0.

I’ve now added the following into the Compass.ino sketch and it works !!

MAG_Heading = ToDeg(MAG_Heading);

if (MAG_Heading < 0)
MAG_Heading = MAG_Heading + 360;

All I need to do now is to include the correct deviation and variation for my location and I’ll have true north.

Thanks for your reply.