ISM330DHCX I2C Issue

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
JakubK
 
Posts: 4
Joined: Thu Aug 04, 2022 6:12 pm

ISM330DHCX I2C Issue

Post by JakubK »

Hi everyone,

I have an issue with the ISM330DHCX breakout when I try to use the device with I2C with the Adafruit Arduino library I get “Adafruit ISM330DHCX test! Failed to find ISM330DHCX chip”. In terms of troubleshooting that I’ve done I made sure the device is connected right, the sensor is fine because it works perfectly on SPI. When I checked with the i2c_adress_detect sketch from the BusIO library the device shows up as 0x6A and 0x6B with DO pulled high which should be correct I also put Serial.println(chipID ()); in Adafruit_ISM330DHCX.cpp and it shows up as 105 which is 0x69 no matter the state of DO. However, when I change the #define ISM330DHCX_CHIP_ID in Adafruit_ISM330DHCX.h to 0x69 the program initializes and the readings from the gyro seem correct however the acceleration readings are wrong, and the data seems to lag sometimes. I use the Arduino Nano 33 IOT. Any help would be greatly appreciated.

User avatar
JakubK
 
Posts: 4
Joined: Thu Aug 04, 2022 6:12 pm

Re: ISM330DHCX I2C Issue

Post by JakubK »

Through some more testing I've determined that the issue is probably related to the built in LSM6DS3 IMU on the Nano 33 IOT. I tested the code on an Arduino Nano 33 BLE which has a LSM9DS1 IMU and it works fine. So now my question is there a way to change which LSM6DS series IMU is used on the same I2C bus?

User avatar
adafruit_support_carter
 
Posts: 29156
Joined: Tue Nov 29, 2016 2:45 pm

Re: ISM330DHCX I2C Issue

Post by adafruit_support_carter »

The ISM330DHCX supports setting an alternate I2C address, which would help if this is an address conflict. Try this:

First, remove the Adafruit ISM330DHCX breakout, and any other attached I2C devices, so it's just the bare Nano board.

Then run an I2C scan:
https://learn.adafruit.com/scanning-i2c-addresses
to determine the I2C addresses for the Nano's on board sensors.

Check the reported values against the ISM330DHCX's address, which is 0x6A by default, but can be changed to 0x6B by bridging the solder jumper on the back of the breakout:
https://learn.adafruit.com/lsm6dsox-and ... ns-3048487

Every device on the I2C bus needs a unique address.

User avatar
JakubK
 
Posts: 4
Joined: Thu Aug 04, 2022 6:12 pm

Re: ISM330DHCX I2C Issue

Post by JakubK »

I checked with the I2C scanner, and the nano alone shows two devices at 0x60 and 0x6A with the ISM330DHCX it shows the same.
With DO pulled high it does show 3 devices with one at 0x6B, however the adafruit_ism330dhcx_test example still displays "Failed to find ISM330DHCX chip".

User avatar
adafruit_support_carter
 
Posts: 29156
Joined: Tue Nov 29, 2016 2:45 pm

Re: ISM330DHCX I2C Issue

Post by adafruit_support_carter »

OK, sounds like there was an address conflict at 0x6A. Now that you've set the ISM330DHCX address to 0x6B, that fixes the address conflict. However, the code will also need to be updated to specify the non-default address. It's a simple one line change here:
https://github.com/adafruit/Adafruit_LS ... st.ino#L20

Pass in the non-default address when calling begin_I2C():

Code: Select all

  if (!ism330dhcx.begin_I2C(0x6B)) {

User avatar
JakubK
 
Posts: 4
Joined: Thu Aug 04, 2022 6:12 pm

Re: ISM330DHCX I2C Issue

Post by JakubK »

Changing the adress fixed the problem. Thanks for your help.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”