Author Topic: Several devices on same I2C bus  (Read 318 times)

0 Members and 1 Guest are viewing this topic.

Offline Yaroooo

  • Contributor
  • Posts: 42
  • Country: it
Several devices on same I2C bus
« on: October 22, 2019, 04:07:50 pm »
I've a question about level-shifting using mos. In my case I've several my devices that works at 3v3 and communicate between them using I2C bus. I must modify my board to communicate between them, but allowing to connect external boards (not from me) that use 5v as voltage level.

Schematic will result like this:



I'm sure I'll not have problem to interface 3v3 and 5v.

With two 3v3 I'll have something like this:



It should work with same principle. Can someone just check and (in case) confirm?
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: pl
Re: Several devices on same I2C bus
« Reply #1 on: October 22, 2019, 05:00:41 pm »
I think it would work, even without 5V pullup on the middle segment, as drawn. Maybe try in in SPICE or on breadboard to be 100% sure.
But it's more complex than it needs to be. You can use one 3.3V bus segment for all the on-board devices and add just one level shifter to bridge with the 5V system.
 

Offline Yaroooo

  • Contributor
  • Posts: 42
  • Country: it
Re: Several devices on same I2C bus
« Reply #2 on: October 23, 2019, 07:59:50 am »
Thanks for your answer. This 5V devices are already commercial boards with a connector on them, I can't modify them. On other side, create a special adapter will add additional logistic complexity and cost.
 

Offline aries1470

  • Contributor
  • Posts: 47
  • Country: au
Re: Several devices on same I2C bus
« Reply #3 on: October 24, 2019, 01:59:46 am »
Hi,
Have you looked at the i2c level shifters?
They are small and cheap. You can have all the 3p3V ones on one side and the 5V on the other?
You can use as many of either one before and after the shifter.
I have attached a rather rudimentary drawing on how to do this and a couple of links to ebay for these devices, of which are fairly cheap too.

Search for items on eBay - Australia:
https://www.ebay.com.au/sch/i.html?_from=R40&_nkw=i2c+5v&_sacat=0&LH_TitleDesc=0&_sop=15
https://www.ebay.com.au/itm/Two-Channel-5V-to-3-3V-TTL-I2C-IIC-Logic-Level-Converter-Bi-Directional-Module/262664199077?hash=item3d28019ba5:g:51sAAOSwZJBX-Ju8
https://www.ebay.com.au/itm/2Pcs-4-Channel-IIC-I2C-Logic-Level-Converter-Bi-Directional-Module-5V-3-3V/301924606812?epid=778328238&hash=item464c1be35c:g:NvIAAOSw5VFWJwmj

All the best.
 

Offline JustMeHere

  • Regular Contributor
  • *
  • Posts: 185
  • Country: us
Re: Several devices on same I2C bus
« Reply #4 on: October 24, 2019, 04:02:03 am »
Look for something just like this:

http://www.ti.com/product/PCA9306
Level shifter IC for I2C.

http://www.ti.com/product/TXS0102
Bidirectional level shifter that's faster.
« Last Edit: October 24, 2019, 04:05:40 am by JustMeHere »
 
The following users thanked this post: aries1470

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Several devices on same I2C bus
« Reply #5 on: October 24, 2019, 08:23:48 am »
Look for something just like this:

http://www.ti.com/product/TXS0102
Bidirectional level shifter that's faster.

Note that the TSX0102 level shifters take some liberties with the Vol levels that degrades noise immunity.  The TI LSF0102 parts appear to be better in this respect.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf