OpenMarine
Stuck IMU not detected - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: Stuck IMU not detected (/showthread.php?tid=3395)



Stuck IMU not detected - Finbar J - 2021-04-17

Hi - I am a bit stuck here - any help appreciated
I have a berry V3 with an IMU.  I am trying to use Pypilot to feed my signalK server.

I can see the magnetic compass fine when I use the Berry tutorials - the IMU is a LSM9DS1 it is not being detected in pypilot.  Any suggestions?

Regards
Fin


RE: Stuck IMU not detected - guyh2 - 2021-04-17

Are the chips on teh Berry identical in operation to the MPU-9250 ?
You need to check (as a minimum) the I2C address and the protocol for initialising, setting ranges and polling the data

RTIMULib (which pypilot uses to 'talk' to the hardware) supports the Berry
BUT there's a bit of work that you would have to do with the setup in boatimu.py to set it up to use the LSM6DSL on the Berry board rather than the MPU925x chip

Rather than change the existing, you should be able to write a set of settings after the MPU ones so that if it fails to setup an MPU then it would try and setup an LSM6DSL
It's at 0x6a rather than 0x68 and there will be the other setup that needs to be done

Normally I'd say go Google RTIMULib and LSM6DSL for ideas .... don't bother there isn't any
Have a poke around the RTIMULib files and you will be able to see where the differences are in the 2
https://github.com/blauret/RTIMU/tree/master/RTIMULib


RE: Stuck IMU not detected - seandepagnier - 2021-04-17

only 9250/9255 and icm20948 have fifo implemented to get the best performance.


RE: Stuck IMU not detected - Finbar J - 2021-04-18

Hi all

Thanks so much for the responses!

Sorry, but I didnt really understand - just a newbie here.  The I2C stuff with the was my first attempt at making anything!

according to what I could see, the LIS3MDL(on the berry site here: https://ozzmaker.com/berryimu-quick-start-guide/#i2c , the magnenometer should have worked on 0x1C,,,,

The berry has 3 sensors - all 3 (imu/magnemometer/barometic & temperature) had addresses reported back to the I2C program - but I could only seem to get temperature reporting into Signal K - and just the autodiscover prompt on Pypilot (when I tried to configure).... When I ran through the example code for the compass, it worked - or at least seemed to (the sample came out with 3 rows of figures when changed with orientation).



Is that chip supported directly in Pypilot - for magnetic compass or is there a preferred one I could get my hands on instead?


RE: Stuck IMU not detected - seandepagnier - 2021-04-20

again, icm20948 or mpu9255 are currently preferred, however this lis3mdl is certainly supported depending on the accel/gyro:

# 0 = Auto discover
# 1 = Null (used when data is provided from a remote IMU
# 2 = InvenSense MPU-9150
# 3 = STM L3GD20H + LSM303D
# 4 = STM L3GD20 + LSM303DLHC
# 5 = STM LSM9DS0
# 6 = STM LSM9DS1
# 7 = InvenSense MPU-9250/MPU-9255
# 8 = STM L3GD20H + LSM303DLHC
# 9 = Bosch BMX055
# 10 = Bosch BNX055
# 11 = Old MPU-9255 (don't use)
# 12 = STM LSM6DS33 (or ISM330dhcx) + LIS3MDL
# 13 = HMC5883L + ADXL345 + L3G4200D
# 14 = InvenSense ICM-20948


RE: Stuck IMU not detected - Finbar J - 2021-04-22

(2021-04-20, 01:25 AM)seandepagnier Wrote: again, icm20948 or mpu9255 are currently preferred, however this lis3mdl is certainly supported depending on the accel/gyro:

#   0 = Auto discover
#   1 = Null (used when data is provided from a remote IMU
#   2 = InvenSense MPU-9150
#   3 = STM L3GD20H + LSM303D
#   4 = STM L3GD20 + LSM303DLHC
#   5 = STM LSM9DS0
#   6 = STM LSM9DS1
#   7 = InvenSense MPU-9250/MPU-9255
#   8 = STM L3GD20H + LSM303DLHC
#   9 = Bosch BMX055
#   10 = Bosch BNX055
#   11 = Old MPU-9255 (don't use)
#   12 = STM LSM6DS33 (or ISM330dhcx)  + LIS3MDL
#   13 = HMC5883L + ADXL345 + L3G4200D
#   14 = InvenSense ICM-20948

Hi
For the sake of sanity and an easy life, I ordered an mpu9255, and ripped out the other one.  Took it home from the boat, so I can explore it there.  Thanks very much for the help.