1
\$\begingroup\$

I know that similar questions have been asked before. I just want to get a better understanding of some details. Please bear with me.

I learnt that I could use an analog CMOS switch or some other dedicated bus switches such as a multiplexer to 'switch off' a segment of a bus. Now I wonder: when a switch is in the 'off' state, will the switch itself contribute to the bus capacitance? If it does, how significant is the influence? is there any way to switch off a part of the bus and completely remove its influence(including the switch) on bus capacitance ? schematic of a part of the system

My application requires a large amount (could be over 400) of I2C devices connected to the bus. However, only 2 or 3 need to be online at any moment. I think the 400pF (or 3000pF when using a buffer?) capacitance limit is the main concern here. I believe a cascade structure of bus switches could solve the problem, but I need the system to be modular which means that each device are equipped with a switch and no cascade structure.

Pardon me if I'm not making this clear. This is my first time asking questions here. Thanks!

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Instead of 400 switches, you might consider 50 1-to-8 muxes. Or even better, use a tree-like configuration. You'll require very strong pull up though. \$\endgroup\$
    – next-hack
    Oct 9 '17 at 13:47
  • 2
    \$\begingroup\$ Imagine that the (CMOS) switch has a small capacitor to ground on each side. So yes, each switch adds capacitance. Implemented like that will severly limit the speed of the bus! You should not connect all clock on one bus but make a tree like structure (with buffers) to limit the number of inputs driven from one output. Instead of switching the SCL, consider using a chip select input of enable. Switching the clock itself can cause issues. That's why we have chip select inputs. \$\endgroup\$ Oct 9 '17 at 13:51
  • 1
    \$\begingroup\$ Is there a reason for you to not choose CAN bus? \$\endgroup\$ Oct 9 '17 at 13:54
  • 1
    \$\begingroup\$ In addition to what @Harry wrote: Memoirs of an overgrown I2C bus \$\endgroup\$ Oct 9 '17 at 15:42
  • \$\begingroup\$ @next-hack, thanks! i thought about the tree like structure which I mentioned as 'cascade' structures. I wanted to avoid the tree like structure so that every part of the system can be made identical (so I can make the system modular). I'm still not good enough with my English. please excuse me :) \$\endgroup\$
    – Gordon
    Oct 9 '17 at 16:26
5
\$\begingroup\$
when a switch is in the 'off' state, will the switch itself contribute to the bus capacitance?

Obviously yes. The switch isn't going to have 0 capacitance. How much capacitance it has is, of course, is something you look up in the datasheet.

Keep in mind that some IIC slaves can drive the clock line low to perform clock stretching. This won't work if the switches aren't bi-directional. If you know for sure that your slaves won't try to drive the clock line, then you can use uni-directional switches (buffers).

Putting 400 anything on a IIC bus line is a bad idea. Whether these connections go to the inputs of analog switches or the end devices themselves, there will be considerable capacitance. That could be overcome by running the IIC bus slowly. However, you need to check how much the leakage currents add up. There is a hard limit there.

All around, you should step back and think how to solve this problem differently at a higher level. This just isn't the right way.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks! maybe I really need to consider using methods other than I2C for this application. Could you give me some advice or links of related docs? Hope this wouldn't trouble you. I would really appreciate it! \$\endgroup\$
    – Gordon
    Oct 9 '17 at 16:40
  • \$\begingroup\$ I second that, also 400 of anything smells like lots of cables and wires will be involved, and I2C tends to have a strong dislike for long (ie, capacitive) cables. This would probably be better served by smart sensors, like a micro with a few I2C sensors like 10-20, all physically close and with short wiring. The micros can be networked using WiFi (ESP8266), CAN bus or even Ethernet, all of which handle longer distances a lot better than I2C. \$\endgroup\$
    – bobflux
    Oct 9 '17 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.