This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMU not detected - GY-91 sensor module (BMP-280 & MPU9250)
#1
I have set up Open Plotter 3 on a RPi4 with a PiCAN M hat with a GY-91 module (combined BMP-280 and MPU9250) connected to the I2C port of the PiCAN-M.

The system is completely up to date.

I have been following the instructions in this blog / video: https://jeremyclark.ca/wp/nav/openplotter-sensors_a/

I am able to connect the BMP-280 and get temperature and pressure data into Signal K, although the connections tab in I2C is missing (has it recently been removed?)

However PyPilot does not detect the MPU9250 IMU even though its address of 0068 is showing up.

Any advice on how I get the IMU to be detected.
Reply
#2
(2023-06-01, 02:11 PM)apshamilton Wrote: I have set up Open Plotter 3 on a RPi4 with a PiCAN M hat with a GY-91 module (combined BMP-280 and MPU9250) connected to the I2C port of the PiCAN-M.

The system is completely up to date.

I have been following the instructions in this blog / video: https://jeremyclark.ca/wp/nav/openplotter-sensors_a/

I am able to connect the BMP-280 and get temperature and pressure data into Signal K, although the connections tab in I2C is missing (has it recently been removed?)

However PyPilot does not detect the MPU9250 IMU even though its address of 0068 is showing up.

Any advice on how I get the IMU to be detected.

I am also just starting to install OpenPlotter on a RPi 4 and have reached the stage of wanting to configure the GY-91 module. 

The Configuration Tab shown in I2C 2.2.1 in the instructions does not appear in PyPilot 3.2.11-stable or I2C 3.3.12-stable.

As a complete novice I'm not sure how to resolve this issue?
Reply
#3
I have just started on a project using Open Plotter on a RPi 4 and have a similar issue with the GY-91 module.

The version of I2C and PyPilot in the instructions show a 'Connections' tab. However the latest version of both don't have this tab and I therefore don't know how to install the module.

I'm a complete novice so I'm rather stuck. Any advice would be appreciated.
Reply
#4
I've got the BMP-280 temperature and pressure outputs working without needing the now missing connections tab.
I think it connects to Signal K automatically once you add the BMP-280 under the sensors tab - See instructions in jeremy clark video and blog above.

But the IMU (MPU9250) which seems to run as an I2C slave off the BMP-280 is not recognised by PyPilot.
Reply
#5
I see what you mean. The BME280 has appeared in the I2C window and displays three lines (pressure, temperature and humidity). I approved it in SignalK. In I2C I highlighted one of the sensor lines and clicked the Edit button which allowed me to select the applicable sensor name from the list. This then allocated the names for all three sensors.

The SignalK Dashboard shows four lines of connection activity. (defaults, two ws.xxxxxxxx and sk-simple-token-security-config

I opened PyPilot and click the Reconnect button and then approved it in SignalK. Back in the PyPilot window I selected sensors and selected Enable IMU only as I don't have an autopilot.

Back in the SignalK Dashboard one of the connection activity lines was underlined in yellow.

In PyPilot I could click the Calibration button which opened a calibration window along with the Scope and Client options. However the Services window has a line which states Detected IMU: None

If I move the module around simulating boat movement nothing happens.

The fig13 in the Jeremy Clark instructions is too small for me to read but it looks like the Dashboard has names for the activities (can't read them) and each is underlined in yellow which I assume means activity has been detected. I've now lost my sole yellow underline which suggests no activity is being detected.
Reply
#6
Jeremy's instructions in this blog post <https://jeremyclark.ca/wp/telecom/openplotter3-sensors_a/> were useful but the IMU still shows it hasn't been detected in the PyPilot window under services.
Reply
#7
Hi Tom, we both seem to have the same problem PyPilot won't detect the IMU even though the BMP/BME280 on the same board is recognised and the I2C connection seems to work and show both the BME/BMP 280's 0076 address and the IMUs 0068 address.

I'm stumped.

Can anyone else help us stumped newbies?
Reply
#8
apshamilton I'm trying to work out where the issue is. In the SignalK Dashboard under Connection Activity I have two activitie lines which appear to be some type of hyperlink that start with ws.

One of them is the BMP280 and the line is underlined in yellow which signifies activity. The temperature and pressure appear in the OpenCPN Dashboard. The other line must be the IMU part of the sensor and it briefly underlines in yellow when I click the Refresh button in the PyPilot window.

If I click on either of the activity lines (hyperlinks) I get taken to the SignaK Data Connections window. This window only shows my USB devices (AIS and gps) neither of which is working (another couple of problems to solve).

I'm lost and will give up for the moment and turn my attention to other aspects of the project.
Reply
#9
Back to trying to discover why the IMU part of the GY-91 module isn't detected. The BMP820 part is working and I2C has the address 0x76
In PyPilot 3.2.11 under Services, Enable IMU Only is selected. This displays pypilot version 0.36 Detected IMU: None

Trying to establish why the IMU isn't detected I discovered some information in the following link
https://github.com/pypilot/pypilot/issues/30

I unsuccessfully attempted to copy the command in the first post (python pypilot/boatimu.py) and then realised I probably needed to confirm the file 'boatium.py and its location. I discovered it was in the following path
/usr.local/lib/python3.9/dist-packages/pypilot

I went to this directory and ran the command
laptop@openplotter:/usr/local/lib/python3.9/dist-packages/pypilot $ python boatimu.py

imu process 4881
pypilotServer process 4883
pypilot_server: bind failed; already running a server?
made imu process realtime
Using settings file RTIMULib.ini
Settings file not found. Using defaults and creating settings file
Failed to open settings file for saveFailed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
ERROR: No IMU Detected 6093.144779401
pypilot_server: bind failed; already running a server?
calibration loaded, starting 4879
pypilot_server: bind failed; already running a server?
pypilot_server: bind failed; already running a server?
pypilot_server: bind failed; already running a server?
pypilot_server: bind failed; already running a server?
pypilot_server: bind failed; already running a server?
pypilot_server: bind failed; already running a server?

I STOPPED THIS WITH CTRL-C

^CProcess Process-2:
Process Process-3:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/pypilot/boatimu.py", line 570, in <module>
Traceback (most recent call last):
Process Process-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/pypilot/server.py", line 435, in init
self.server_socket.bind(('0.0.0.0', self.port))
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/dist-packages/pypilot/server.py", line 402, in run
self.init()
File "/usr/local/lib/python3.9/dist-packages/pypilot/server.py", line 439, in init
time.sleep(3)
KeyboardInterrupt
main()
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()

Of course being a total newbie I don't understand any of the above but I did notice the comment

Using settings file RTIMULib.ini
Settings file not found. Using defaults and creating settings file
Failed to open settings file for saveFailed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
ERROR: No IMU Detected 6093.144779401

Could the file RTIMULib.ini be missing? After searching for the file I found two copies
The first was in directory /home/laptop/.pypilot (14.7Kib last modified 6/6/23 last permissions change 6/6/23 last access 3/6/23)
Second was in directory /home/laptop (14.7Kib last modified 4/6/23 last permissions change 4/6/23 last access 4/6/23)

Today is 7/6/2023 which suggests to me nothing I've done today affected these files.

The content of the file suggests to me it is used to identify and then configure the IMU.

Going back to the directory /usr.local/lib/python3.9/dist-packages/pypilot I entered the command

watch -n.1 python gyro.py This resulted in the Terminal showing
Every 0.1s: python gyro.py openplotter: Wed Jun 7 16:18:21 2023
python: can't open file '/usr/local/lib/python3.9/dist-packages/pypilot/gyro.py'
: [Errno 2] No such file or directory
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿ

I then searched the entire RPi for the file gyro.py and couldn't find it. My assumption is it is only created after the IMU has been identified and configured?
I then tried running the command RTIMULibDrive and received the response Bash: RTIMULibDrive: command not found

I feel a little like Thomas Edison trying everything in the hope something will work. :-)
Reply
#10
Well this is probably of no use to you but let me try. I have a gy-91 and it works fine.

Pi4 4GB, OPv3 64bit, all latest updates.

I connect the gy-91 (powering the 3.3V pin from 3.3V on the pi)

I run some tests to check that the pi can see both BMP280 and the IMU and that works fine

i2cdetect -y 1 shows the correct addresses - 68 (MPU), 76 (BMP280)

Start Pypilot (v3.2.13), and it shows Detected IMU-925x

I select IMU only

Approve the access request and give read/write permissions

In Pypilot I seem to need to click IMU only again but after that the data appears in Signal K

I can calibrate the device in Pypilot without issue.

I know there have been issues with some gy-91s but my experience is different.

I'd be happy to send one of you my gy-91 to try if you like.

Note I am connecting directly to the pi, not via a PICAN hat.


Attached Files Image(s)
               
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)