0
\$\begingroup\$

So, currently we are having problems with the I2C Communications on our cabinet Each row on the cabinet has 5 boards which have 2 16bit io expanders each board has 32 devices and there are 4 boards in total on 1 row that use the I2C Bus so the maximum amount of devices used is of course 128

each row is completely independent of each other, at the moment we are currently having an issue where the relay lights will turn on but will not turn off, it will only turn off the ones at the very end

we are using a arduino Giga R1 For the master controller

The very top boards with the relays on them are independent of IC2 And are wired up directly to the giga

Whole Board

Right Side left row The signal when trying to turn the relay lights off The normal signal The whole board after relays lit up

What could we try to fix this issue?

on the right side left row we have a 4.7K Ohms resistor and on the right side right row we have a 10k Ohms resistor as we were experimenting, nothing seems to be working for what we do

\$\endgroup\$
3
  • \$\begingroup\$ My first guess is going to grounding. What you need to do is float the scope and measure the signal integrity locally at the slaves that are malfunctioning. That means hook the scope up near the slave devices, not the master. Floating the scope means the the o-scope ground is referenced to the slave IC. NOT the earth ground. (BTW, I2C is a poor choice of communication. Especially if this is part of an industrial environment). I2C is intended for intra-board communication. \$\endgroup\$ Commented Jun 13, 2024 at 16:05
  • \$\begingroup\$ I2C has 127 possible addresses, but due to capacitance limitations you can't have 127 devices on the same bus. If capacitance is an issue, you need to reduce the pull-up resistor values, not increase them. \$\endgroup\$ Commented Jun 13, 2024 at 16:07
  • \$\begingroup\$ To begin with: I2C is designed to connect multiple chips on a single circuit board. As others said, 128 chips result in too much capacitance (just by themselves), and then by stretching the bus across multiple boards you are making the capacitance and rise time problems even more severe. \$\endgroup\$ Commented Jun 13, 2024 at 16:45

4 Answers 4

3
\$\begingroup\$

You have 4k7 pull-up. You are using 400 kHz frequency. You have a large system with mind-boggling amount of 128 chips and wiring between them which equals a humongous amount of capacitance on bus.

It is a way too optimistic expectation for it to work at all.

You need to do one or multiple of the following to make it work:

  1. Slow down the clock. It can't work with that amount of chips and that pull-up resistor. The rise time is too slow for the high time to be long enough.

  2. Change to a stronger pull-up resistor to make bus edges faster. It may still require slowing down the clock and reducing the capacitance, as technically 3mA is the limit unless you are using chips that allow for more current.

  3. Reduce the bus capacitance. Even if 1 chip equals 5 pF, 128 devices is way beyond the standard operating parameters of 400pF. Also some of the 128 possible addresses are reserved for other purposes like 10-bit addressing, so you really should not use all 128 addresses for 128 slaves, many microcontrollers would even fail to communicate correctly if their I2C peripheral is standard-compliant and adheres to the strict rules of 10-bit addressing. And to be compliant with the specs of Fast Mode, you can't even reach 400 kHz with passive pull-up resistors and the allowed 400pF of capacitance as it will violate the rise time or at least the clock high time requirement. You may need to segment the bus to have less devices per bus segment.

\$\endgroup\$
1
  • \$\begingroup\$ Hi thank you for the suggestions, I forgot to include a few things 1. The 3.3V and 24V Grounds are seperate at the current moment we are not actually powering on the relays only the lights for the relays 2. The 3.3v and 24V grounds are connected on the master controller boards (the 2 big boards at the top) \$\endgroup\$ Commented Jun 14, 2024 at 8:28
2
\$\begingroup\$

In addition to my comment, I'm going to assume your I2C ground is common with your relay (power) ground. I'm making this assumption because you are able to turn the relays on but not off. What's happening is, when the relays are off, there is negligible current in the ground (return). So the I2C bus functions as it should. After you get the relays on, you now have appreciable current flowing in the ground, which is also the I2C bus return; effectively a ground loop. So this relay current causes voltage drop in the ground wire raising the potential. This is bringing the I2C bus voltages out of spec so the marks and spaces can't be resolved by the slave devices while the relays are on. What you should do to fix this, is give the relay coils independent return paths to keep the I2C bus return "clean". Tie the relay coil ground and bus ground at a single point back to the source.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0
\$\begingroup\$

I agree with the capacitance diagnosis. There are two devices you should be familiar with if you want to stick with I2C: active pull-ups and bus extenders. Active pull-ups (also known as accelerators) detect a rising transition and turn on a current source instead of waiting for a resistor to charge the bus capacitance, this can give you acceptable rise times up to several hundred pF or even a few nF.

Bus extenders (also known as redrivers) split the bus up into two separately-driven domains, chopping up the capacitance into more manageable bits. They can be cascaded and some have active current sources built in.

I have used both of these devices in a long-run configuration where I2C was required by the components we were interfacing and can attest to their effectiveness.

\$\endgroup\$
0
\$\begingroup\$

The problem was solved the PCF8575 Boards all had internal 10K pullup resistors, Meaning each time we used a PCF8575 Board it ended up adding more and more resistance, to solve this problem we scratched out a very specific trace

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.