Troubleshooting and FAQ’s:
  1. What is the meaning of all the numbers in SPI data transfer mode?

    Answer: The first 3 integers are the roll, pitch, and yaw angles in degrees x 100, the next three integers are the time-derivatives of the first three in degrees/second x 10, and the last three integers are the acceleration of the IMU, not including gravity, in g’s x 10,000. The acceleration is projected to a frame that has its x-y axis horizontal, with the horizontal x axis aligned with the body-fixed x axis. For example, if the acceleration of the IMU is 1g horizontally in the x direction, a reading of 10,000 will be the first integer that is output even if the IMU is pitched upwards or downwards. Note that all the numbers returned from the IMU are 16 bit signed integers.

  2. The IMU does not seem to be operating. How can I test it?

    Answer: The fastest way to test the IMU is to place it in ASCII serial data transfer mode. Connect the IMU Tx line to the Arduino Tx pin 1 and run the Arduino serial monitor at 115200 baud. If the IMU 3.3 V power, ground, and Tx wires are all connected, and the SDO line is grounded, then a serial data stream should appear on the monitor that shows the roll, pitch, and yaw angles at an update rate of 50Hz.

  3. When the yaw angle reads 0.0 degrees, the IMU is not heading true north. Why?

    Answer: The magnetometers are sensitive to all magnetic fields and to ferrous objects. They are also not very accurate. The IMU uses a self calibration algorithm to attempt to correct for errors, but it can not do so in the presence of extraneous fields. Try moving the IMU to different locations in order to minimize these effects.

  4. My IMU is measuring noisy roll angles. How can I stop this?

    Answer: For slow or static operation, the angles are normally within 0.2 degrees of their true values. However high frequency mechanical vibration of the IMU can create errors. Usually this can be corrected by ensuring that the IMU itself is not vibrating by mounting it on a soft support like foam double stick tape. One simple test for this source of error is to place your finger on the IMU while it is in operation. If the errors stop, the problem is mechanical vibration.

  5. My IMU is alternating between sending good data and sending 0’s. How can I stop this?

    Answer: We have noticed this behavior when so-called “ground loops” are present in the wiring. If the IMU works properly when it is isolated with only short wires connected to the Arduino, and not properly otherwise, suspect a ground loop. To correct this, make sure that each electrical component in your machine has its own dedicated ground wire, with all the wires terminating at the negative battery terminal.

  6. Which side of the IMU should be facing up (i.e. away from the center of the Earth)?

    Answer: The side with the components on it should be facing up, NOT the side with the connection labels and orientation diagram, unless you compensate in software for the pitch and yaw measurements.

  7. The test code for the SPI interface does not work correctly with the Arduino Due or the Teensy. How can I fix this?

    Answer: The test code was written for the Uno and other Arduinos that use 16 bit integers. The Due uses 32 bit integers. Change "int" types in the following lines of code to "short" types:
    int roll, pitch, yaw, rolldot, pitchdot, yawdot;
    int accel_x, accel_y, accel_z;