M5Stack IMU (MPU6886+BMM150)


Hi, been toying with the IMU in the M5Stack and modified the IMU library to add basic support to the MPU6886 (just added the whoami, the rest is handled as is by the current MPU60x0 driver), and for the BMM150 (copied the Bosch stuff).
The accelerometer just works. Reads ‘g’ in the proper direction… noise seems to be at 1%g
The magnetometer is a tough one, there are four magnets there so I removed the M5GO Bottom, there is some big offset in ‘x’, around 30
The gyroscope has a permanent offset, in the order of 10, and seems to be very noisy, in the order of 1.
All those numbers read at the IMU demo application console.
I slightly modified that demo to send the proper calibration and reset quaternion commands to the ESP32. The results are quite unstable, the device starts to roll a couple degrees quickly after calibration. Perhaps something more needs to be done at the driver level. Anyone with enough expertise on these chips or this IMU stuff out there ? I’m NIL at this.