I have interfaced the Bosch BNO055 IMU with the ATmega32U4 to get the orientation data in 3D. I transfer this data wirelessly via the Nordic Semiconductor's nRF24L01+ module. I am relying on the onboard sensor fusion algorithm (NDOF mode).
Before we start reading the data, we must ensure that the individual sensors (Accelerometer, Gyroscope and Magnetometer) are calibrated.
Accelerometer - Hold the imu in each axis for 1-2 seconds.
Gyroscope - Keep the IMU still for a few seconds.
Magnetometer - Draw a figure-8 in 3D.
The calibration status can be read from the CALIB_STAT register of the BNO055. A score of 'zero' means no-calibration and a score of '3' means full calibration.
I followed the above steps for the following two setups:
1) Breadboard prototype:
In the above setup, after the calibration process, the accelerometer and the gyroscope reach a full calibration and stay stable. The magnetometer never reaches its full calibration.
Yet, I am able to get stable Roll, Pitch and Heading data from the onboard sensor fusion.
2) Custom PCB:
The above PCB was designed based on the breadboard prototype. After calibration, only the accelerometer is fully calibrated. The gyroscope and the magnetometer remain at zero'.
I am only able to get stable readings for Roll and Pitch. The magnetometer readings run haywire. It's constantly incrementing/decrementing.
1) In the prototype setup, why am able to measure good heading values even though the magnetometer is not calibrated.
2) Why I am not able to calibrate the gyro in the PCB setup?
3) What do you think about the interference of the nRF24L01+ module with the magnetometer?
4) What is up with the magnetometer readings in the PCB setup? Why is it running haywire?
Any help or pointers appreciated :)