I recently bought an MPU9250 sensor, but I’m facing an issue where the magnetometer is not working. The accelerometer and gyroscope are working fine, but I’m unable to get any data from the magnetometer. Has anyone faced this issue or can suggest possible reasons? Currently im using Raspberry pi 4. using at 400khz ,tried through by pass mode as well, the i2c bus just doesnt detect the magnetometer.
Hey there, @eeksha321170, and welcome to the forum. Glad to have you here.
Would you be able to share a photo or link to the exact MPU9250 board you’re using, plus how it’s wired to the Pi 4? In addition, would you be able to tell us:
- what shows in
i2cdetect -y 1 - which library/script you’re using to enable bypass mode
The magnetometer should normally appear separately at 0x0C once bypass/pass-through is enabled, so if it never appears the exact breakout board and wiring will matter a lot.
hello, i did try with the i2cdetect -y 1 and i2cset,i2cget . im writing the code in C . it detects only 0x68,never detects 0x0C
Well, that can change with the board. It is good to know it is detecting something, however. Could you share a link to the exact MPU9250 sensor that you’re using?
i ordered it from amazon, but i really need the magnetometer to work
ive connected using vcc,gnd,sda and sclk pins only
Hey there, @eeksha321770,
That’s fine. It doesn’t need to be a Core Electronics board for you to use our forums. The link would just give me access to a little more information so I can check if there’s anything strange that could be occuring.
In addition, could you please let me know what code your using?
Here are some tips. No data from the magnetometer [MPU9250][AK8963] - Sensors - Arduino Forum If the problem persists even after you enable I2C bypass mode and troubleshoot your connections, I think you got a faulty sensor.
Hi All
Looking at the original post above. On 28th May this was posted
Remarkably similar. Jane responded to this but got no reply. None that appeared on the fourm anyway.
Same person ???
Cheers Bob