OpenMarine

Full Version: MPU-9250 not detected
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hope everyone is safe.  Trying to get some fresh eyes on my struggles to get my MPU-9250 working on my RPI4 with V2 of OP (fully updated).

Here's my MPU-9250:

[attachment=910]

I actually bought 2 of these (since Sean warned that a small percentage will be defective out of box) and results below are same with both.

From my reading, I understand that everything should be auto-detected in pypilot?  I believe the IMU is wired up correctly and it is detected at 0x68.

[attachment=906]

However, it does not show in "Sensors" in the I2C interface:

[attachment=907]

Pypilot interface shows "Detected IMU:  Auto Discover":

[attachment=908]

Output from "pypilot_boatimu" shows "No IMU detected":

[attachment=909]


I found this post where a forum member had a similar problem and maybe ran some code from a tutorial.  Do I have to do something to get my IMU set up?

Any pointers appreciated?
Hello

did you set the sk connection in pypilot?


holger


Another Option to try would be changing the Hardwareaddress to 0x69
https://cdn.sparkfun.com/datasheets/Sens...eakout.pdf
Hi, w7thmark,

Unfortunately I do not have the solution to your problem, but working with the same accessories as you, I confirm that the imu does not appear in I2c devices, even when they work!
On the other hand, pypilot detects the IMU itself and gives you its name (IMU9250-9255 or IMU 9150, depending on the model used). when it says "Detected IMU: Auto Discover", it means it can't find it.
On the 3 models in my possession, I have nothing set up or adjusted, pypilot taking care of it alone: You just have to connect it correctly, what you did since you find its address (0X68).
Good luck hoping someone will give you the solution

cordially
Capt. Ranur did solve this allready !

http://forum.openmarine.net/showthread.php?tid=2456

so change your address to 0x69 and it will work.

Good Luck & Stay Well

H
FYI
I2C app will never show the IMUs. Pypilot app is in charge of detecting and managing them.
Thanks for all the comments.

Quote:I2C app will never show the IMUs. Pypilot app is in charge of detecting and managing them.

OK, thanks.  Good to know, so I can stop worrying about what I see or don't see there.

Regarding the suggestions about configuring for 0x69, I'm not as technical as most, so go easy on me.  My ebay IMU appears to be a Hiletgo and does not have a solder jumper?  Documentation here says default address is 0x68, but 0x69 when AD0 is pulled high.  Do I just tie AD0 on my IMU to 3.3V?
Hi w7thmark,

The way to know the real address of your imu is as follows:
Connect your imu on your raspberry and open a terminal in which you type:
i2cdetect -y 1
by pressing 'enter' you will see a table which will give you the address of your device.
I think you will find the value 0x68.
The manipulation with ADO must be used to change this address in case you use 2 imus (one in 0x68 by default, the other in 0x69 after connecting its ADO pin to the 3.3V).
But in Openplotter, you have to take the value that was detected above.
Hope to be useful to you
cordially
OK, so I tied AD0 to to 3.3V and now "i2cdetect -y 1" shows address 0x69. However, no change to anything in my first post #1. Pypilot interface shows "Detected IMU: Auto Discover". Output from "pypilot_boatimu" shows "No IMU detected", etc.

Any other ideas? Do I have to edit RTIMULib.ini? Do I have two bad IMUs? Should I just buy a different type?
The only reason to change to address 0x69 is if you had two imus (which is not utilized by pypilot yet), or another i2c device on 0x68 (I don't know of any)

So I suggest you put it back on 0x68 and run pypilot_boatimu but be completely sure pypilot isn't already running somehow first.

pypilot manages the imu directly because it is critical that the autopilot can react to gyro inputs as quickly as possible.
(2020-04-22, 01:38 AM)seandepagnier Wrote: [ -> ]The only reason to change to address 0x69 is if you had two imus (which is not utilized by pypilot yet), or another i2c device on 0x68 (I don't know of any)

So I suggest you put it back on 0x68 and run pypilot_boatimu but be completely sure pypilot isn't already running somehow first.

pypilot manages the imu directly because it is critical that the autopilot can react to gyro inputs as quickly as possible.

Thanks Sean.  So I removed the SD0 line to 3.3V and I'm back to 0x68. Then I renamed /usr/local/bin/pypilot to /usr/local/bin/pypilot_NORUN and same for pypilot_web and pypilot_webapp and rebooted:

[attachment=913]
Pages: 1 2