5
\$\begingroup\$

I have several slave devices communicating with a microcontroller master on an I2C bus. My PCB is only about 1" x 1" and the devices are only communicating at 400 kHz. What is the best way to connect all the I2C peripherals to the microcontroller? In a star configuration or in a daisy-chain configuration?

\$\endgroup\$
12
\$\begingroup\$

Propagation delay is not a problem with a 400kHz I2C bus on a 1" by 1" PCB. Lay the traces out in whatever way gives the cleanest routing.

A rule of thumb in EMC design is that you need to consider transmission line effects if your traces are 1/10 the wavelength of your highest significant frequency.

Your highest significant frequency in I2C, which uses pullup resistors, is the fall time. That's usually on the order of 100ns when controlled by a microcontroller with fairly fast I/O. The primary frequency of the 100ns fall time is 5 MHz (which, you'll note, is much greater than 400kHz).

At 5MHz the wavelength is on the order of 100 meters. The rule of thumb says don't worry about it until you get close to 10 meters.

\$\endgroup\$
  • 2
    \$\begingroup\$ +1 for identifying the factors in play, but how does 100ns equate to 2.5 MHz? I'd expect significant content at 5 MHz and 15 MHz. \$\endgroup\$ – Ben Voigt Aug 31 '11 at 20:23
  • \$\begingroup\$ @Ben - Whoops, I was messing with estimated fall times and got something confused. Thanks for checking my math. \$\endgroup\$ – Kevin Vermeer Aug 31 '11 at 22:25
5
\$\begingroup\$

In your case (1x1 inch, 400 kHz) it doesn't matter. The pullup resistors can be anywhere on each net, and your main issue can be routing simplicity.

The only thing to watch out for is capacitive coupling if you've got other nets with high dV/dt. Just keep somewhat away from those, or for extreme cases, put a deliberate ground trace between the IIC lines and the very noisy lines (probably between the noisy lines and anything else in your circuit if it's so bad to need this).

\$\endgroup\$
  • \$\begingroup\$ Thanks for the coupling reminder. I might dedicate a whole layer (sandwiched between planes if I can) to these in my PCB just to make sure it's not a problem. \$\endgroup\$ – Joel B Sep 1 '11 at 23:44
  • \$\begingroup\$ @Joel: Again, this is not likely a problem unless you have unusually high dV/dt, like what a inductor can produce when it is turned off abruptly as happens regularly in a switching power supply. \$\endgroup\$ – Olin Lathrop Sep 2 '11 at 11:21
4
\$\begingroup\$

At that size of PCB, and bit rate, just connect them up in whatever way that makes PCB routing easier. Star vs. Daisy Chain won't really matter.

Even if your PCB was 10" x 10", the topology still wouldn't matter much.

\$\endgroup\$

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.