arduino and pca9548 i2c intermittent issues

Hi,

I’m building a project where I need to connect arduino to 12 MCP23016 via I2C.
Without a multiplexer, I can connect 8 of them (then I have a shortage of addresses) and they work very well without any issue. I2C scanner always see all of them and I can use them as I want (open/close ports).

I attach the schematics of a board I built, It contains a power stage (12V IN, 12v-5V-3.3V OUT) and the PCA9548AD I2C multiplexer, along with a INA209 power monitoring system.

The problem I face is that, both on my board that in a breadboard minimal configuration, the PCA9548 stops answering the I2C calls after a few minutes, sometimes it works for less than 1 minute.
After this time, I have to unplug everything and wait 5 minutes before it gets working another time.
It also happens that, without touching anything, in the evening doesn’t work, the following morning it does.

On the breaboard I follow these connections for the PCA:
PIN1 to +5V
PIN2 to +5V (putting both at GND make the chip dead… clueless)
PIN12 to GND
PIN21 to GND
PIN22 to arduino A5 and a pull-up resistor of 3.9K
PIN23 to arduino A4 and a pull-up resistor of 3.9K
PIN24 to +5V

To replicate the problem is sufficient to fire up the i2c scanner and wait some minutes. After this time the scanner hangs. I also tried to write my code instead of the scanner but I get the same problem.

Also, as you can see on the schematics below, I also tried to attach a lead acid battery as PWRIN and arduino on the 12VOUT, then I modified the I2C scanner to blink on success. this to disconnect the circuit from the PC (to avoid interferences). Again, the same ON/OFF behavior

Help please,
Regards
robse

You need pull up resistors on the input I2C lines, that is pins 22, & 23.

There are. Take a look at R4 and R5 on the schematics

--
Roberto

robse:
There are. Take a look at R4 and R5 on the schematics

--
Roberto

No not them. What is U$1, there is no pull up on that I2C line.
Also you have left the reset line floating, the data sheet says:

Active-low reset input. Connect to VCC through a pullup resistor, if not used.

Anyway you do not need the multiplexer just to get more MCP23016 on the I2C bus. You wire them in batches of 8, with the most significant address line being common to all 8. You then take that line and wire it to an arduino output. Repeat for the next batch of 8 using a different arduino output.
Normally these outputs are zero but you use the address as if it were one. To address a batch simply take that output to one, use that batch and then switch back to zero.

U$1 is a INA209 current monitoring IC (sorry for the missing label). It's connected to the third i2c line of the PCA9548, and that line (SD2 SC2) if you look is pulled by R10 and R11 (correct me if i'm wrong of course)

From what I understand you mean to group the MCP by A2 (MSb), to connect this group of pins to an arduino output and set that HIGH to use them:

x - A2 A1 A0
1 - 1 ? ?
2 - 1 ? ?
3 - 1 ? ?
4 - 1 ? ?
5 - 1 ? ?
6 - 1 ? ?
7 - 1 ? ?
8 - 1 ? ?

But I'm wrong since in this way if the A2 is always HIGH, the total addresses for that batch would be 4 (100, 101, 110, 111). I'm missing something. Maybe you meant batches of 4 ?

reset line must be pulled, you're right. On my board I added a resistor but with no luck

I'm getting some pca9544 from texas instrument (these are 9548 from nxp).. i'm quite sure they are faulty, today I attached one of the PCA above to a raspberry, and I get the same weird behavior. I have some boards that are not meant to be address-multiplexed (already printed) so I have to stick with a multiplexer.

--
Robse

Yes sorry I meant banks of 4.
First bank
A0 A1 A2
0 0 Output pin a
0 1 Output pin a
1 0 Output pin a
1 1 Output pin a

So set Output pin a low

Second bank
A0 A1 A2
0 0 Output pin b
0 1 Output pin b
1 0 Output pin b
1 1 Output pin b

So set Output pin b low
Then when you want to talk to the first bank
Set Output pin a high and talk to those four addresses, then put output pin a low.
Then when you want to talk to the second bank
Set Output pin b high and talk to those four addresses (same addresses as before), then put output pin b low.

today I attached one of the PCA above to a raspberry, and I get the same weird behavior.

Suggests it is something still missing from your circuit.
Decoupled OK?

As far as I know, bypass capacitors are there.

Tomorrow I should have two PCA9544 to do some tests

--
Robse