MiniIMU-9 random gyro spike

In the attached jpg you in the 3rd graph down on the left you can see a large spike + for the z axis and - for the y axis. The value varies from 5000 to 20000. No real pattern for when it happens. My logic analyzer on the i2c buss catches the spike so it would seem to be from inside the L3G4200. Possible an internal converter mis-read. Your thoughts?


Hello,

We have noticed that the readings from the L3G4200D can be somewhat noisy, although the spike in your picture is worse than I would expect, especially since it is happening on multiple axes. About how often does it happen? Can you give some more details about your setup, including what you are using to power and interface with the IMU and what I2C frequency you are using, as well as how you have configured the gyro (sensitivity, output data rate, etc.)?

By the way, that looks like a nice program you are using to display the IMU data. Did you create it yourself?

- Kevin

Sorry for the delayed response, was in Glacier National Park for the last week and internet is almost none existent.

Spike happens at random intervals from 10 sec to 60 sec.

Netduino
5v from netduino board.
I2C 40khz

Gyro set to defaults
CTRL_REG1 = 0x0F ODR=100hz Cut-off=12.5 and all axis enabled
CTRL_REG5 = 0x00 250dps

Rawdata is broadcast via ethernet from the netduino and the graph program listens and graphs.

My logic analyzer does decode the spike so it would seem to eliminate the netduino i2c reader stuff.

Thank you and yes the graphing stuff is home grown and uses C# and M$ System.Windows.Forms.DataVisualization.Charting

if (mag.Series[0].Points.Count >= _maxSamples)
                mag.Series[0].Points.RemoveAt(0);
            mag.Series[0].Points.AddY(Data[0]);

            if (mag.Series[1].Points.Count >= _maxSamples)
                mag.Series[1].Points.RemoveAt(0);
            mag.Series[1].Points.AddY(Data[1]);

            if (mag.Series[2].Points.Count >= _maxSamples)
                mag.Series[2].Points.RemoveAt(0);
            mag.Series[2].Points.AddY(Data[2]);
            tbMagX.Text = Data[0].ToString();
            tbMagY.Text = Data[1].ToString();
            tbMagZ.Text = Data[2].ToString();

Unfortunately, I don’t have any good ideas about what might be going on. You could try some different ODR and filter settings in the gyro to check if it makes any difference in the spikes. Also, are you actually using an I2C frequency of 40 kHz? I ask because 400 kHz is often used as a standard “fast mode” speed; in case that was a typo and you are actually using 400 kHz, you should try using a speed of 100 kHz or lower to see if the higher speed is causing problems.

Otherwise, you might have to just implement some kind of filter in your software to reject the outlying readings.

- Kevin