Two-Way I2C Signal - On/Off Switch IC

Hi All,

I'm trying to figure out what the best way to turn on / off the data signal for I2C communication is. For my application, I have multiple Arduinos running the same exact code communicating in I2C. Because they have the exact same code running on them - including identical starting I2C addresses; more like broadcast addresses - they require a part of code that figures out a unique address to give each slave. The initialization of each slave, therefore, requires only one "no address" Arduino to be connected to the I2C line at one given time, so that it can truly be given a unique address. The issue is I want this to be done automatically without having to manually wait for each slave to be initialized before connecting the next one.

I have the entire code figured out, and the requirements as I've stated above are fairly set in stone - especially the fact that I can't pre-program them with unique addresses. This is simply because the addresses given will be sequential based on how close in the daisy chain they are to the master. The order now could be different than the next one, as they can be plugged in in any order. So simply put I'm not looking for another work around. The only part I need to figure out is the best way to switch on/off the connection between devices.

Ideally, I'd like power to still go to the next device even if I2C isn't happening, so that's why I'm looking to switch the data line. I was dumb enough to initially think a logic gate on the data line would suffice, but the connection needs to be two-way, so to my knowledge that wouldn't work out. Is a relay my best option? I really don't know much about gate / switch ICs / relays, so any insight or a direction to look in would be greatly appreciated.

Thanks in advance!

Pat

I2C Mux, such as http://www.dsscircuits.com/sale/product/dssc0107

CrossRoads: I2C Mux, such as http://www.dsscircuits.com/sale/product/dssc0107

Awesome!! Thanks for the quick reply. Looks like thats about the right track. I got an understanding of what exactly the multiplexer does and it seems like that's what I need, but since I only need one channel to one output (like an SPST or SPDT), could that be a bit of overkill as far as pin count / wiring is concerned? I looked up some kinds of bidirectional multiplexers and got to the TI site which used "Analog Switch" somewhat synonymously with their multiplexers. Would that be more along the lines of what I need? Seems so from breezing through the datasheet; what do you think? Again I really appreciate the help, switching data signals isn't something I've done before.

Pat

Sure, there’s all kinds of analog switches you could look into.
http://www.digikey.com/product-search/en/integrated-circuits-ics/interface-analog-switches-multiplexers-demultiplexers/2556671?k=analog%20switch
Maybe DG407, with DA, DB connected to the uC and the other sides connected to the various slaves.
Maybe add a pullup on each slave’s SCL so the line isn’t floating when not connected.
http://www.digikey.com/product-detail/en/DG407DJ-E3/DG407DJ-E3-ND/2621716

Or a pair of DG406 if you have more than 8 slaves.
http://www.digikey.com/product-detail/en/DG406DJZ/DG406DJZ-ND/821393

CrossRoads: Maybe DG407, with DA, DB connected to the uC and the other sides connected to the various slaves..... Or a pair of DG406 if you have more than 8 slaves.

I apologize, I guess it's hard to remember to list every detail you need to know. Let me better describe the layout. The slaves are going to have their own in and out connectors, with each connector transferring power/ground and the two I2C lines between Arduinos in a daisy-chained fashion. With each slave there will also be an analog switch, so each slave can turn on the I2C to the "out" connector once it itself has been initialized. This way, I don't need more than four positions for each connector/cable, including the connector on the master, as opposed to needing a hell of a splitter to go from the master to each Arduino.

Again, sorry about that, I know it's frustrating when users leave out details. But you've certainly got me in the right direction, I think just a simple 1:1 analog switch for each slave should do the trick (now I only have to sort through the 800 available one-channel analog switches). Now the only potential problem I see is that each IC has an on-resistance, so if there are 10 ICs in series (I have a max of 10 Arduinos hooked up to each other) this would obviously add up. Would this be an issue?

Thanks again,

Pat

With that many devices on the bus you're going to need to reduce the value of your SDA SCL pullup resistors from 4.7k ohm to 2.2 k or less, possibly approaching 1 k. I would try 2.2 k first and work downward in 200 ohm increments if you have any problem.