minIMU-9 v3 - erroneous readings after restart

For a few days now, we have been struggling with some strange behavior on the compass. We have isolated at least one cause of the problem (hopefully, this is the sole cause).

Normally, when the compass is rotated clockwise the values increase. But after we power down the Arduino (e.g., pull out the USB cable, hit the Arduino reset button, or power the attached robot off), if we don’t wait a few seconds, we get the opposite effect and the values decrease when we rotate the compass clockwise. In addition, the readings seem more erratic and generally less trustworthy. It’s hard to know how long we have to wait to avoid having the problem. We have counted to five before powering up and have still had the problem.

Two questions… 1) we are curious as what causes this and 2) is there a workaround?


I measured the voltage across VDD and noticed that, when I power down, the voltage falls pretty quickly to .5V but then slows down. If I power up the sensor before the voltage falls to about .3V, I experience the brownout condition. As a workaround, I attached a 10k resistor to VDD and the voltage drops much quicker when I turn the power off. I gather the pulldown resistor is the best solution?


We noticed we could get similar behavior to what you are describing when we were testing the accelerometer on the LSM303. I think that resistor you added is a practical solution; we have been recommending adding a 1-10k resistor across VDD to ensure that the voltage drops quick enough to fix the issue.