Suggestions on why M5Stack Fire MPU9250 doesn't always work...



  • Hi,
    Just received my first M5 Stack Fire (2018.2A) and the only time it gets accurate MPU9250 data is with the Hello/Demo app's Gyro screen in the UIFlow-1.3.4-beta and UIFlow-1.3.4-beta. In the other UIFlow firmwares available, UIFlow-v1.2.3, UIFlow-v1.3.2, and UIFlow-v1.3.3-beta, the Gyro screen's dot never moves regardless of the M5Stack Fire's orientation.

    Furthermore and more puzzling to me, in Arduino the M5StackFire_MPU9250 example under "File, Example, M5Stack, Fire" does not return accurate data. Regardless of the M5 Stack Fire's orientation it says and never changes... (and I added the dots as spacers so that the numbers line up below)

    MPU9250/AK8963

    x..............y...............z

    -74..........625..........-58......mg
    -9............78............-7........o/s
    0.............0..............0.........mG
    Gyro Temperature 18.1 C

    I also tried some of the other MPU9250 demos that are variations of the basic example code by "Kris Winer" dated April 1 2014 with no luck.
    Additionally, the ambient room temperature is much warmer than 18.1C (64.58 F) so the Gyro Temp should be greater than room temp since the M5 Stack Fire feels warmer than room temperature.

    My Arduino M5Stack framework is version 0.2.8 which is the current update to date version as far as I can tell. And my Arduino settings are:
    Board: "M5Stack-FIRE"
    Upload Speed: "921600"
    Partition Scheme: "Default (2 x 6.5 MB app, 3.6 MB SPIFFS)"
    Core Debug Level: "None"
    PSRAM: "Enabled"
    Port: "/dev/cu.SLAB_USBtoUART"
    Programmer: "USBtinyISP"

    I've google and searched these forums to no avail.
    Any insight or suggestions into how to read the MPU9250 would be greatly appreciated.

    Thanks.



  • @wjm I've learned that when I purchased the M5Stack Fire, the website said it had a MPU9250. The box the M5Stack Fire came in said it had a MPU6050. The pamphlet in the box, in different diagrams points to both a MPU6050 and MPU 9250. Meanwhile scanning the M5Stack Fire's I2C ports shows devices on 0x10, 0x6c, and 0x75. If present, the MPU6050 would have been on 0x68. Additionally, 0x6c is the usual address of the SH200Q accelerometer, which the M5Stack website currently says is now in the M5Stack Fire. So the box is wrong. Unfortunately there are no M5 Stack Fire code examples for the SH200Q online and I've had no success so far modifying the M5Stick's SH200Q classes and examples.



  • @wjm Finally! After fixing some i2c initialization issues, I'm able to read the raw acceleration and gyro data from SH200Q in the M5Stack Fire. Looks like it needs some calibration too.



  • Can show an example?