Magnetometer CAL and 9DOF ArduIMU problems

I've downloaded the latest ARDUimu soruce compiled it and loaded it on the SparkFun 9DOF board.

1)The default baud rate of 57600 has a large error on an 8Mhz AVR.
(http://www.wormfood.net/avrbaudcalc.php) So I set it back to 38400


2)Either my magnetic sensor is bad, or the code is not working well in heading.
Toward that end I modified the code to implement a full compass calibration.
It does not seem to be much better....
The code is attached.

To use it hit an I on the serial port to start an "Iron" cal.
Then sweep the IMU slowly around in all three axis.
While you are doing this the system will show you the max.min and cal values for the three magnetometer axis.

Then hit a X the system will save the cal data in EEPROM and return to normal operation.
On power up it checks to see if it has cal data, if so it says:
 Serial.println("Read Stored Compass Calibration");
or
  Serial.println("Used Default Compass Calibration");

This is still not exactly quite right so I'd appreciate any ideas or help.









PAULS_MOD_SF9DOF_AHRS.zip

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • 3D Robotics
    ArduIMU code is not designed to run on the Sparkfun board, which as you noted is underclocked. You're supposed to use this code instead. If you want to run the ArduIMU code, you should get that board, which is not only twice as fast but can also support a magnetometer.
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…