hideakitai / MPU9250

Arduino library for MPU9250 Nine-Axis (Gyro + Accelerometer + Compass) MEMS MotionTracking™ Device
MIT License
277 stars 91 forks source link

Is this a real MPU9250 chip ? #52

Closed xXaRoXx closed 3 years ago

xXaRoXx commented 3 years ago

I bought MPU9250 modules off eBay and I think they aren't MPU9250s. They have the same i2c address (0x68) but they aren't recognized by this library. Can you help me identify the real chip please? MP92 899LA1 1811 is printed on them and they have a "whoami" value of 112 (whatever "c" from the connection_check example means) 76b6f15b-8cb0-446f-a6c8-5996350eb068

hideakitai commented 3 years ago

Sorry, I don't know what it is. There are many imitations because MPU9250 has been discontinued a few years ago. Please ask the seller! I hope you can get one :)

Hantuch commented 3 years ago

Similiar case here, bought 1 exactly like that off on a renown local online seller for around $2 (50K IDR)

WHO_AM_I value was 78, with AK8963_WHOAMI at 0

Turns out i already got an older MPU9250 (with exact look), tested it, & it runs properly (whoami 71, ak8963 48)

I recommend reporting to the vendor and finding another one

defect-fake

rohit-kumar-j commented 3 years ago

@xXaRoXx You can check this video (from 10:19) for the i2c call outs: https://www.youtube.com/watch?v=mzwovYcozvI Code: https://robojax.com/learn/arduino/?vid=robojax-MPU9250

filipppp commented 3 years ago

Got exactly the same, did you find any way to use it for this lib too?

hideakitai commented 3 years ago

If AK8963 is just not present in that module, it may be usable by adding an additional AK8963 module. Unfortunately, if not, it's not available.

rohit-kumar-j commented 3 years ago

@filipppp you could try micro python to verify if the chip is working alright. However, you'll have to flash the chip with firmware using esptool, so make sure you have a backup of the firmware if it is custom.

Verify with this library:

You can verify if the chip is working or the library is working cross-check with this: MPU9250 in micropython: https://github.com/tuupola/micropython-mpu9250

Micropython:

Example Tutorial: https://www.youtube.com/watch?v=QopRAwUP5ds&ab_channel=ClaytonDarwin

For serial communiacation b/w pc and microcontroller:

pyserial for communication over windows: pyserial-miniterm.exe COM0 115200

picocom for communication over windows: picocom -b 115200 /dev/tty/USB0

paulosincos commented 3 years ago

thanks @hideakitai . I found another code that solved my problem.

I think will be nice if the your library print a more specific message to say the mpu6500 is not supported, or needs a external magnetometer.

paulosincos commented 3 years ago

Another question:

If I remove the entire code of magnetometer (and related code), the other code will work with 6500? is it compatible?

paulosincos commented 3 years ago

Another question:

If I remove the entire code of magnetometer (and related code), the other code will work with 6500? is it compatible?

Answering myself, yes, I did it and it worked hehe

I just need to understand how to calculate Roll, Pitch and Yaw with just the gyroscope.

IanBUK commented 2 years ago

Sorry, I don't know what it is. There are many imitations because MPU9250 has been discontinued a few years ago. Please ask the seller! I hope you can get one :)

What's the recommended current 9dof imu please? A lot of reputable suppliers are still selling the mpu9250.

Thanks.

gree303 commented 1 year ago

Another question: If I remove the entire code of magnetometer (and related code), the other code will work with 6500? is it compatible?

Answering myself, yes, I did it and it worked hehe

I just need to understand how to calculate Roll, Pitch and Yaw with just the gyroscope.

@paulosincos would you mind sharing your thoughts and workflow of swapping the mpu6050 vs the mpu9250 library. I just received my esp32 + mpu9250 and ran into the same issues as you did. Any help is very welcome - thanks.

paulosincos commented 1 year ago

@paulosincos would you mind sharing your thoughts and workflow of swapping the mpu6050 vs the mpu9250 library. I just received my esp32 + mpu9250 and ran into the same issues as you did. Any help is very welcome - thanks.

@gree303 I'm working on a code implementation for fakes mpu9250.

I did this fork: https://github.com/paulosincos/MPU6500_aka-fake9250.

Unfortunately it's a partial solution to solve the problem.