Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Connecting two ISM330DHC IMUs with I2C/Qwiic
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Connecting two ISM330DHC IMUs with I2C/Qwiic

by SteveTK on Thu Aug 27, 2020 12:49 pm

Greetings,

I recently purchased two ISM330DHC IMUs that I was hoping to connect to one microcontroller via Qwiic connectors. I'm using a Sparkfun Pro Micro w/Qwiic. I was able to successfully connect one of the IMUs to the Pro Micro using the Adafruit libraries and it is working well.

In looking to connect the second IMU via Qwiic, I understand that I can use I2C but need to make sure these two IMUs have different addresses. Note, I'm new to I2C, so I apologize if I am misunderstanding anything.

In the documentation here: https://learn.adafruit.com/lsm6dsox-and ... u?view=all under the I2C wiring section it says "By default, theI2C address is 0x6A. If you add a jumper from DO to 3.3V the address will change to 0x6B." This would lead me to believe that if I add the jumper to one of the boards and create a separate library file pointing to that address then I should be able to use both of these IMUs with the same Qwiic bus.

However, in the Adafruit_ISM330DHCX.h file, the line

Code: Select all | TOGGLE FULL SIZE
#define ISM330DHCX_CHIP_ID 0x6B ///< ISM330DHCX default device id from WHOAMI

seems to indicate that the IMU is addressed to 0x6B by default. If that is true, does it mean that adding the jumper described above will change the I2C address to to 0x6A? Or is there some way to figure out what the I2C address would be for the board with the jumper? I just want to confirm this before I start soldering things to the board.

Also, if there is a simpler way of using both of these IMUs over the same Qwiic bus that I am overlooking, please let me know.

Thanks in advance for any help!

Best,
Steven

SteveTK
 
Posts: 3
Joined: Sat Apr 26, 2014 1:28 pm

Re: Connecting two ISM330DHC IMUs with I2C/Qwiic

by mikeysklar on Thu Aug 27, 2020 1:46 pm

In our CircuitPython driver I'm seeing a default address of 0x6A.

https://github.com/adafruit/Adafruit_Ci ... _init__.py

Regardless you have the right idea. Simply follow the below instructions on one of the boards to make it a different i2c address.

D0 (Bottom) - I2C Address pin. Pulling this pin high or bridging the solder jumper on the back will change the I2C address from 0x6A to 0x6B


The Qwiic Mux Breakout - 8 channel device that we sell from Sparkfun might make the i2c bus extension easier.

https://www.adafruit.com/product/4704

mikeysklar
 
Posts: 1958
Joined: Mon Aug 01, 2016 8:10 pm

Re: Connecting two ISM330DHC IMUs with I2C/Qwiic

by SteveTK on Thu Aug 27, 2020 2:36 pm

Thanks for the quick response, and for letting me know I'm on the right track. Looking at the datasheet (in section 5.1.2) it looks like the default SAD is 1101010 (0x6A) as indicated in the Adafruit documentation, and pulling the pin high changes it to 0x6B. So I guess I'm a bit confused why the sensor would work when the header file referenced above lists it as 0x6B. Either way, I now have a much better understanding of how the addresses work, and I know that if I bridge the pins it will be one or the other.

I'll give this approach a shot, but if I can't get it to work it's great to know about the Qwiic Mux Breakout.

Thanks again for your help!

SteveTK
 
Posts: 3
Joined: Sat Apr 26, 2014 1:28 pm

Re: Connecting two ISM330DHC IMUs with I2C/Qwiic

by mikeysklar on Thu Aug 27, 2020 3:18 pm

I'm guessing that the driver has both addresses and is not at all concerned whether it detects a 0x6A or 0x6B. It knows that those addresses represent the same kind of device.

mikeysklar
 
Posts: 1958
Joined: Mon Aug 01, 2016 8:10 pm

Re: Connecting two ISM330DHC IMUs with I2C/Qwiic

by SteveTK on Thu Aug 27, 2020 4:22 pm

Okay, thanks!

SteveTK
 
Posts: 3
Joined: Sat Apr 26, 2014 1:28 pm

Please be positive and constructive with your questions and comments.