MPU9250 Readings Erratic When Device is Not Moving
Posted: Wed Apr 01, 2020 8:58 pm
I have done everything I could think to do to try to troubleshoot/diagnose this issue on my own, and I am humbly asking for some help from the MicroPython community.
(I've attached an image below with line charts consisting of 60 seconds of data from the MPU9250 below - sampled twice per second)
Data in a CSV file - https://drive.google.com/file/d/1U2Q6j8 ... sp=sharing
Intro: I am running a 30 pin ESP32 DEVKIT with MicroPython Firmware (build 20191130-v1.11-611), and having issues with seemingly erratic sensor readings from a MPU9250/GY9250 using the MPU9250 library from -https://github.com/micropython-IMU/micropython-mpu9x50. Both components are plugged into a breadboard, and remain stationary/not moving on my desk. I am currently powering the ESP32 via micro USB from my computer, and powering the MPU9250 from one of the 3.3V outputs from the ESP32 (measuring 3.279-3.283V at the MPU9250 with my multimeter).
Things I've tried
1.) I have tried to power the MPU9250 directly from a 5V LiPo battery (keeping the ESP32 powered from micro usb), and the readings were just as irregular.
2.) I am using hardware I2C, and have tried the default SCL and SDA pins (22 and 21 respectively), and other GPIO pins, however no dice.
3.) I have also tried another MPU9250 with another ESP32, same problem
4.) I have tried the MicroPython MPU9250 library from- https://github.com/tuupola/micropython-mpu9250 MPU9250, slightly different readings, still erratic
I have not calibrated the magnetometer yet, since I wanted to figure out why the readings are not stable/static. I just wonder if I am missing something (i.e. ESP32 or MPU9250's are known to have this problem, etc.)? On a somewhat related note, I have tried using a BMP180 with several different MicroPython libraries for the ESP32, and even on (gasp) an Arduino, and it seemed to have fairly inconsistent readings as well (even though the sensor was stationary).
Some other variables possibly worth mentioning;
I have a ceiling fan running in my office, I have wifi running on ESP32 (STA_IF), I have cats, and I like Cocoa Pebbles?!?
(I've attached an image below with line charts consisting of 60 seconds of data from the MPU9250 below - sampled twice per second)
Data in a CSV file - https://drive.google.com/file/d/1U2Q6j8 ... sp=sharing
Intro: I am running a 30 pin ESP32 DEVKIT with MicroPython Firmware (build 20191130-v1.11-611), and having issues with seemingly erratic sensor readings from a MPU9250/GY9250 using the MPU9250 library from -https://github.com/micropython-IMU/micropython-mpu9x50. Both components are plugged into a breadboard, and remain stationary/not moving on my desk. I am currently powering the ESP32 via micro USB from my computer, and powering the MPU9250 from one of the 3.3V outputs from the ESP32 (measuring 3.279-3.283V at the MPU9250 with my multimeter).
Things I've tried
1.) I have tried to power the MPU9250 directly from a 5V LiPo battery (keeping the ESP32 powered from micro usb), and the readings were just as irregular.
2.) I am using hardware I2C, and have tried the default SCL and SDA pins (22 and 21 respectively), and other GPIO pins, however no dice.
3.) I have also tried another MPU9250 with another ESP32, same problem
4.) I have tried the MicroPython MPU9250 library from- https://github.com/tuupola/micropython-mpu9250 MPU9250, slightly different readings, still erratic
I have not calibrated the magnetometer yet, since I wanted to figure out why the readings are not stable/static. I just wonder if I am missing something (i.e. ESP32 or MPU9250's are known to have this problem, etc.)? On a somewhat related note, I have tried using a BMP180 with several different MicroPython libraries for the ESP32, and even on (gasp) an Arduino, and it seemed to have fairly inconsistent readings as well (even though the sensor was stationary).
Some other variables possibly worth mentioning;
I have a ceiling fan running in my office, I have wifi running on ESP32 (STA_IF), I have cats, and I like Cocoa Pebbles?!?