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 ICM 20948 de Mikroe
#1
Photo 
Hi
I just tested this model of the Mikroe 9DOF 2 Click,

https://www.mikroe.com/9dof-2-click

It says on the site that it uses ICM 20948 from TDK. Pypilot, Tinypilot and i2c do not detect it. There is no SOD(A) pin, but SDO and SDI I have only tested SDO. What do you think?  

Pierre
Pierre 
Reply
#2
do you mean i2c does not detect it by running:

i2cdetect -y 1

What is the result?

It may be this board only supports SPI? I never tried in spi mode, so it could be the rtimulib2 doesn't work properly in spi mode at this time.
Reply
#3
(2022-02-21, 12:53 AM)seandepagnier Wrote: do you mean i2c does not detect it by running:

i2cdetect -y 1

What is the result?

It may be this board only supports SPI?   I never tried in spi mode, so it could be the rtimulib2 doesn't work properly in spi mode at this time.

All this because I updated my system that I used for 2 years in the boat without problem.

I just reinstalled raspbian buster 32 bit from scratch, Install i2c, Connect my imu 9250 it's good because I removed it from my old system where it worked great.
Result :
root@raspberrypi:/home/pi# i2cdetect -y -l
i2c-1 i2c bcm2835 (i2c@7e804000) I2C adapter

Install RTIMULib and I follow the instructions to the letter, config.txt, modules module,d etc. Same result with i2cdetect.
RTIMULibCal does not detect the IMU9250
I even tried 2 other models of ICM20948

What do you think is going on?
Which IMU will be recognized by tinypilot and also by pypilot?

Translated with www.DeepL.com/Translator (free version)
Pierre 
Reply
#4
(2022-02-21, 12:53 AM)seandepagnier Wrote: do you mean i2c does not detect it by running:

i2cdetect -y 1

What is the result?

It may be this board only supports SPI?   I never tried in spi mode, so it could be the rtimulib2 doesn't work properly in spi mode at this time.

I tried another imu adafruit icm 20948 
''i2c-1 i2c bcm2835 (i2c@7e804000) I2C adapter'' still the same error 

I installed the adafruit icm209xx library and the python code examples and it works

RTIMULIB does not detect it

I am discouraged to find an imu that will work with rasberrypi and pypilot
Pierre 
Reply
#5
it will work with both sensors. However be aware that the icm20948 requires 1.8v levels. If you just connect it up without regulator and translators, you probably damaged it. Some breakouts have these builtin others do not.


If you do not see it from i2cdetect then there is no way it is going to work.
Reply
#6
(2022-02-22, 02:35 AM)seandepagnier Wrote: it will work with both sensors.  However be aware that the icm20948 requires 1.8v levels.  If you just connect it up without regulator and translators, you probably damaged it.   Some breakouts have these builtin others do not.


If you do not see it from i2cdetect then there is no way it is going to work.

I know about the 1.8 volt and the 2 boards have a VIN and can receive from 3 to 5volt and they have a chip that controls the voltage (1.8). The 2 boards work fine led is up. The imu adafruit icm 20948 with adafruit library work fine with the python code provided to test it. But RTIMULib and i2cdetect does not detect them. 

I can't help you more because this level of programming is too advanced for me, I never looked at the pypilot code. I am a basic amateur programmer. 

Here are the libraries I used https://github.com/adafruit/Adafruit_Cir...hon_ICM20X

Translated with www.DeepL.com/Translator (free version)
Pierre 
Reply
#7
From your product page: https://www.mikroe.com/9dof-2-click

"ICM-20948 supports both SPI and I2C communication interfaces but only SPI interface is used on the 9DOF 2 Click. The voltage level conversion between ICM-20948 and 3.3V MCU is done by the TXB0108 bidirectional voltage level translator.

This Click Board™ uses only SPI communication interface. It is designed to be operated only with 3.3V logic levels. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V."

So it will not work with i2c !

I don't know what is the level of support for SPI on RTIMULIB.
Reply
#8
Yes, I think the issue is, RTIMULib2 does not support this sensor in spi mode. Also, only my fork of RTIMULib2 supports this sensor.

In theory it will work in spi mode actually... the code is all in place but due to the fact it has never been attempted there is probably something somewhere in the code preventing it from actually working.
Reply
#9
Well, maybe it works after all:

You said: "There is no SOD(A) pin, but SDO and SDI I have only tested SDO. What do you think? "

This makes me think that you did not wire the ICM correctly. SPI requires more wires than i2c. You need at least 4 wires: VCC, GND, MOSI = SDO, SCK, probably the CS as well. MISO = SDI is probably not required.

You need to wire this to the proper SPI connections on the Raspberry PI (same as the JLX screen), and you need a GPIO to control the CS.

And maybe you will need to customize RTIMULib.ini for SPI.

All these are wild guesses since I never used a IMU sensor over SPI.
Reply
#10
If the sensor is working with a different code, then it is most likely just not debugged on RTIMULib2. I don't see any pressing reason to support the sensor in spi mode: there are no real advantages and it takes more wires as well as pins usually used for the lcd and mcu which receives RF remote control signals.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)