New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glitches on Gyro data #105
Comments
The glitches appear on different sensors at random intervals. I had tried filtering algorithms on the data but the glitches are large magnitude. |
The green spikes are the plot of the boolean imu.new_mag_data(), which looks correct - and is not the issue I'm describing. The issue in the plotter output above is on the imu.mag_y_ut() output. |
Can you post the full code that you are running and confirm that you are running the newest version of this library (i.e. v5.6.0)? We burst read the IMU, but we have had issues in the past with the ESP32 not working with the I2C repeated start. I don't have an ESP32 board to test, but will try to see if I can replicate the issues on the Teensy boards that I have. Is there any potential to try reading the sensor with SPI? That might help us determine if it's an issue with the I2C communication or something else. |
I'm running your MPU9250 i2c.ino example with only the print statements modified to add sensor labels and use sensor offsets to separate the traces for Arduino Serial Plotter: `/*
*/ #include "mpu9250.h" /* Mpu9250 object */ void setup() { void loop() {
*/
} I will look into connecting to the MPU9250 with SPI instead of i2c and retrying with the SPI example. |
I confirm I'm running Blolder Flight Systems MPU9250 v 5.6.0 Arduino library. |
I ran your i2c example, but I added Serial print statements for Arduino Serial Plotter labels, adding offsets so the traces don't overlap.
if (imu.Read()) {
when I run this example with my ESP32 Dev Board and MPU9250 board, I use Arduino Serial Plotter and get the following plot:
Searching the web - I found this post about gyro glitches:
https://forums.adafruit.com/viewtopic.php?f=19&p=531590
I wonder if the issue is similar - the code is getting interrupted between individual MPU register reads, and should read whole blocks of MPU i2c registers to prevent this kind of issue.
The text was updated successfully, but these errors were encountered: