CMPS11 digital compass

I am having difficulty getting stable compass heading readings with a CMPS11 module. Compass is mounted on front of robot approx 10cm from 2 Tamiya FA-130 motors. Calibration completes OK. Problem occurs when rotating robot. I am trying to make a map of a small room with exit (see maze at Trinity College firefighting contest) and am wondering if the angular acceleration is causing problems. Also noticed that accessing the device at more than 5 times per second exhibits similar results.

Hi George,

Thanks for posting on RobotShop’s forum.
Are you using the I2C or Serial interface with the CMPS11 Module ?
Please take a look at this link. There is two wiring diagrams with the Arduino for both I2C and Serial.
There is also Arduino sample codes that might help you :

]I2C/:m]
]Serial/:m]Regards,

I am using the I2C interface. Results are fairly stable (± 2 degrees) when not in motion. Any vibration or angular motion seems to cause wild variation (± 20 degrees).

Hi,

Did you try the serial interface ? Does it give you the same results ?

Sincerely,