I2C Address Conflict of Grand Central Only...?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
xanatos
 
Posts: 110
Joined: Thu Jun 18, 2009 3:09 pm

I2C Address Conflict of Grand Central Only...?

Post by xanatos »

I prototyped a project on the Itsy Bitsy M4 Express (IBM4E) (CircuitPython 7.x) with several chained I2C devices, including:
  • The 2.8" Capacitive Touch Screen (product ID 2090) using the library for the touch screen "adafruit_focaltouch". The device has an I2C address of 0x38
  • The DF Robot Oxygen Sensor, with it's own library. The device has an I2C address of 0x73 (selectable from 0x70 to 0x73)
On the ItsyBitsy M4 Express, everything worked. I ported everything over to the Grand Central (GC) and the touch screen seemed to stop working. After checking connections, etc., I ran the I2C Address Scanner and saw that 0x38 (the touch screen) was missing.

Fast forward - if I have the Oxygen Sensor (0x73 or *any* of it's three other alternate addresses) plugged into the I2C chain, it makes 0x38 disappear. Just poof. I watched it as the scanner ran.

It gets weirder. If I have fewer devices on the chain and the Oxygen Sensor is the only one on WITH 0x38, they are both there. If I add in my RTC, all still there. Add in my BME680, all still there. But if there are more than 5 devices on the I2C chain, and 0x73 is one of them, 0x38 goes away.

I tried using a handful of other I2C devices I have and plugged them in to see if somehow one of my active devices was mediating some sort of conflict condition, but it didn't matter what other devices were on the chain. I tried them in different orders, I tried a parallel run - all with the same results.

I can have more than 6 devices (I had seven at one point) and they all report on the I2C scanner just fine, but as soon as one of them is 0x73, then 0x38 disappears.

Is this familiar to anyone? Why does it do it only on my GC, and not the IBM4E? The GC is running CircuitPython 8.0.5, and the IBM4E is running CP 7.something - would that have any effect?

I'm thinking of trying to use the secondary I2C bus on the GC for the O2 sensor tomorrow - am I likely to have success with that, or - if this is a known thing I'm running into - will that make any difference?

Thanks for any advice!

User avatar
barshatriplee
 
Posts: 200
Joined: Wed Mar 22, 2023 10:11 am

Re: I2C Address Conflict of Grand Central Only...?

Post by barshatriplee »

You can use the secondary I2C bus on the Grand Central for the Oxygen Sensor. It can potentially isolate the Oxygen Sensor from the other devices on the primary I2C bus and eliminate any conflicts that might be occurring.

User avatar
xanatos
 
Posts: 110
Joined: Thu Jun 18, 2009 3:09 pm

Re: I2C Address Conflict of Grand Central Only...?

Post by xanatos »

Thanks barshatriplee, I appreciate that confirmation. I'll post my results tomorrow!

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C Address Conflict of Grand Central Only...?

Post by adafruit_support_bill »

It gets weirder. If I have fewer devices on the chain and the Oxygen Sensor is the only one on WITH 0x38, they are both there. If I add in my RTC, all still there. Add in my BME680, all still there. But if there are more than 5 devices on the I2C chain, and 0x73 is one of them, 0x38 goes away.
With more devices on the bus, you will probably have more total bus length. That will increase the overall bus capacitance. And if all the devices are equipped with pullup resistors, the combined pullup strength will be stronger as well. Not all devices are created equal, and some may have more difficulty driving signals on the bus under those conditions.

Keep your wiring as short as possible. And it may be necessary to remove pullups from one or more boards.

User avatar
xanatos
 
Posts: 110
Joined: Thu Jun 18, 2009 3:09 pm

Re: I2C Address Conflict of Grand Central Only...?

Post by xanatos »

Thanks Bill. I hadn't considered capacitance, and it makes sense certainly. But since I'm being lazy on this project and using all stemma/qt connectors (where I can) and already using the shortest of the cables Adafruit makes for them, I'm thinking using the second I2C port on the GC and splitting up my devices onto two separate chains is probably the only option. I'll post a follow-up when I have done so, so that - if (hopefully) it works, anybody else who encounters similar behavior might benefit from this post.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C Address Conflict of Grand Central Only...?

Post by adafruit_support_bill »

6 of the 50mm cables would be around 30 cm which is generally not a problem. Although combined with the 6 sets of pullups it might be marginal for some devices. Since you have a second i2c bus available, splitting things up should be a good solution.

User avatar
xanatos
 
Posts: 110
Joined: Thu Jun 18, 2009 3:09 pm

Re: I2C Address Conflict of Grand Central Only...?

Post by xanatos »

Thanks. I've adjusted the code for the second I2C bus, getting into the hardware next :)
ProjectBackwithI2CchainSmall.jpg
ProjectBackwithI2CchainSmall.jpg (259.88 KiB) Viewed 200 times

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C Address Conflict of Grand Central Only...?

Post by adafruit_support_bill »

Nice looking build!

User avatar
xanatos
 
Posts: 110
Joined: Thu Jun 18, 2009 3:09 pm

Re: I2C Address Conflict of Grand Central Only...?

Post by xanatos »

Thanks! Couldn't have done it without the cool Adafruit offerings! :) And my 3D printer... and FreeCAD... lol
Project Front.jpg
Project Front.jpg (305.27 KiB) Viewed 198 times

User avatar
xanatos
 
Posts: 110
Joined: Thu Jun 18, 2009 3:09 pm

Re: I2C Address Conflict of Grand Central Only...?

Post by xanatos »

All adjustments successful. Second I2C (SCL1, SDA1) running and O2 sensor reports on it, allowing my touch screen to function happily.

Thanks all for the help & suggestions!

The base chains:
Front_new.jpg
Front_new.jpg (198.25 KiB) Viewed 187 times
DIY Stemma/QT cable upgrade to the GC lol:
Back_new.jpg
Back_new.jpg (138.93 KiB) Viewed 187 times
I'm also going to use a separate 3.3V buck converter to power my I2C chains. Ordered 4 x MPM3610 3.3V Buck Converter Breakouts today, so as not to put any real load on the little regulators in the GC -I'm expecting to have a total of eight sensors on the I2C chains, some of which use a bit of current.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C Address Conflict of Grand Central Only...?

Post by adafruit_support_bill »

Good to hear that is all working. Thanks for posting your results.

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

Return to “Metro, Metro Express, and Grand Central Boards”