Problem to connect to my MPU9250

Dear all,
I am working on a project, where I want to use a MPU9250 motion sensor and have problems to connect it.
In my project I want to analyze the data with a neuronal network to detect a specific gesture.

My hardware:

Used Library:

I uploaded the sketch "Connection Check" out of the Library. You can see the result of the serial monitor in the attached jpg. My arduino finds the sensor at 0x68. So I think I didn't make a mistake during soldering.
Could somebody help me to fix the problem? Thanks for your support.

Jens

PS: This is my first request in this forum. If I forgot to mention some details of my problem or project / hardware, software, please tell me.

The Uno is a 5V board and the sensor is a 3.3V sensor. Depending on the pullup resistors of the MPU-9250 modules it might work, but I prefer to use a I2C level shifter.

The sensor is at 0x68. You can run a I2C Scanner sketch for a few hours. If it never fails then it is okay.

Are you using this example ? MPU9250/connection_check.ino at master · hideakitai/MPU9250 · GitHub.
It checks for a identifier byte in the sensor. It is called the “WHO_AM_I” byte.
That example is confusing, it should print a message about the “WHO_AM_I” register.

The definition in the library for that byte is here: MPU9250/MPU9250RegisterMap.h at master · hideakitai/MPU9250 · GitHub.
Some say it should be 0x68, or 0x71 or 0x73 or 0x75 :o

Solution: Ignore it :wink:

I think the MPU-9250 should return 0x75 according to the datasheet, so the library is according to the datasheet.
It seems that some have a MPU_9255 chip which has 0x73.
Can you print that WHO_AM_I byte ? to see what value your sensor returns.

    byte c = readByte(addrs[i], WHO_AM_I_MPU9250);

    Serial.print( "The WHO_AM_I byte is: 0x");   // <- added
    Serial.println( (int) c, HEX);         // <- added


    if (c == MPU9250_WHOAMI_DEFAULT_VALUE) {

Dear Koepel,

thanks for the fast reply. I already checked it with the 3.3 V, but same result. How can I use a level shifter?
The I2C Scanner runs without failing (adress 0x68).

Yes I use the connection check example from your link.
Find attached the result from the modified connection check. The who am I byte is 0x70.
Why is the I2C address 0x68 and the who am I byte 0x70? I am confussed.

The problem is: I would like to ignore that the connection check sketch answers that I am not using an MPU, but all the other sketches (measuring, calibration,...) answer that they have problems with the connection and I should use the "connection check" example.

Thanks for your help.

The Arduino Uno has a 5V I2C bus and the MPU-6050 has a 3.3V I2C. If you connect those together, then there is a voltage mismatch of the signal. A I2C level shifter can connect those busses (SDA and SCL) with different voltage levels.

If you power the sensor module with 3.3V, then you still have a 5V I2C bus connected to a 3.3V I2C bus.

The temperature, gyro and accelerometer are registers inside the sensor.
The WHO_AM_I is also a register inside the sensor. It has a fixed value.

Now, take a deep breath and stay calm, then read this: Is a WHO_AM_I response of "0x70" a sure sign of a MPU6500? · Issue #24 · kriswiner/ESP32 · GitHub.
Kris Winer knows what he is talking about, so I assume that his reply is valid.

Try to get your money back, or toss it away, or use it as a MPU-6500, or whatever.
Good sellers are Adafruit, Sparkfun, Pololu. They only sell real chips.

Oh ok. thanks for the answer and the research.

Damn I will send it back. I already have a MPU6500.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.