Author Topic: I2C I/O expander PCAL6524 malfuntion  (Read 737 times)

0 Members and 1 Guest are viewing this topic.

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
I2C I/O expander PCAL6524 malfuntion
« on: September 02, 2024, 12:43:45 pm »
I have two PCAL6524, I2C I/O expanders. One of them always works fine, but the other eventually starts failing updating its outputs.
I can write/read correctly via I2C but somehow it fails updating the outputs. The only difference between the one that works an the one that fails its that the one that fails has its ADDR pin connected to VDD instead of GND as the other.

If i reset the IC it starts working again but eventually fails again.

I am out of ideas, any help will be wellcome, thanks  :-//
 

Offline brumbarchris

  • Regular Contributor
  • *
  • Posts: 220
  • Country: ro
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #1 on: September 02, 2024, 12:57:18 pm »
If you swap the two ICs in their circuits, does the problem follow the IC or the circuit?

Cristian
 
The following users thanked this post: abelCortex

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #2 on: September 02, 2024, 01:04:04 pm »
Hi Cristian,

The ICs are Okey, there are like 5 PCBs mounted like this and its always the same IC, another test i made its if i communicate with just one works fine, the problem its when i try to communicate with both and its always the same.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6576
  • Country: nl
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #3 on: September 02, 2024, 01:25:45 pm »
The speed with which you write the outputs is it high? Can you lower the i2c frequency?
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #4 on: September 02, 2024, 01:30:42 pm »
I have try to lower the speed yes, I have try with all API's available speeds 100kHz, 400kHz and 1MHz.

Thank you for your time.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6576
  • Country: nl
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #5 on: September 02, 2024, 01:46:28 pm »
If the one IC fails can you still read write correctly the other IC, in other words the I2C bus is still working and the erroneous chip does not pull down any of the i2c lines ?
Did you check with a scope preferably with i2c protocol analyzer if some errors occur on the bus prior to the ic malfunctioning ?
 
The following users thanked this post: abelCortex

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #6 on: September 02, 2024, 01:58:29 pm »
Hi Kjelt,
the I2C bus its okey, even when it fails i can still read/write registers even in the IC that fails, the problem its with the outputs of the IC. Imagine I write in the IC that the output 'x' is on 1, then i read the corresponding register and it has write it correctly, but somehow the output its a 0 or oscillates.

I havenĀ“t checked it with a scope, but the Renesas API doesn't generates any error message with the communication.

TY. :-+
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6576
  • Country: nl
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #7 on: September 02, 2024, 02:18:49 pm »
the I2C bus its okey, even when it fails i can still read/write registers even in the IC that fails, the problem its with the outputs of the IC. Imagine I write in the IC that the output 'x' is on 1, then i read the corresponding register and it has write it correctly, but somehow the output its a 0 or oscillates.
That I never ever saw, if you did not state that this occurred on 5 pcb's I would have said ESD damage of the chip.
Really weird. Only thing I can think of is power supply glitch at that ic, is it properly decoupled and have you checked the power supply directly on the chip with a scope ?
I am out of idea's, never used this particular chip but perhaps someone else has.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6576
  • Country: nl
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #8 on: September 02, 2024, 02:23:10 pm »
The only difference between the one that works an the one that fails its that the one that fails has its ADDR pin connected to VDD instead of GND as the other.
Did you use Vdd I2C-bus and not Vdd-p according to the datasheet?
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #9 on: September 02, 2024, 02:26:14 pm »
I'm gonna try it, it makes sense. Thank you for the ideas.
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #10 on: September 02, 2024, 02:38:10 pm »
I have the Vdd(I2C-bus) and Vdd-p connected to the same voltage, 3.3V
As I understand it one it the IC suply and the other the reference voltage of the bus.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: us
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #11 on: September 02, 2024, 05:08:50 pm »
You could try connecting ADDR to SCL or SDA for a different address and changing your code appropriately.

Also, is there a specific sequence of I2C operations which reliably trigger the problem?
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 434
  • Country: ie
    • LinkedIn
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #12 on: September 02, 2024, 06:14:28 pm »
May be load of second I2C chip is not 'pure' load, but sometimes override PCAL6524 output?
 
The following users thanked this post: etik61

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #13 on: September 03, 2024, 06:08:49 am »
Hi thank you for asking,
There is no a particular sequence that triggers the problem, just the normal program sequence, I'm gonna try to scope the ADDR pin and see if there is a glich.
With the not 'pure' load you mean if there is a V_ref like gnd or a 3.3V maybe overriding the output. That should t be possible because the first IC is connected the same way and gives no problems.
 

Offline Irilia

  • Regular Contributor
  • *
  • Posts: 78
  • Country: de
    • My YouTube channel
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #14 on: September 03, 2024, 07:01:02 am »
I have two PCAL6524, I2C I/O expanders. One of them always works fine, but the other eventually starts failing updating its outputs.
I can write/read correctly via I2C but somehow it fails updating the outputs. The only difference between the one that works an the one that fails its that the one that fails has its ADDR pin connected to VDD instead of GND as the other.

If i reset the IC it starts working again but eventually fails again.

I am out of ideas, any help will be wellcome, thanks  :-//

I know you have try changing the ic from one place to another, but do you have try replacing the 2 ic by two new ones ?
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #15 on: September 03, 2024, 07:20:18 am »
Okey, I have detected a glitch on the Positive ADDR pin, now i'm trying to solve it with a bigger capacitor, any idea?

 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6576
  • Country: nl
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #16 on: September 03, 2024, 07:56:20 am »
Okey, I have detected a glitch on the Positive ADDR pin, now i'm trying to solve it with a bigger capacitor, any idea?
First you have to find out what causes the glitch.
How much mA's are your outputs delivering or are they only sinking ?
Your IC should have at least 100nF but if you use MLCC please derate and I would add some more.
Perhaps an RC for the ADDR line so that is safe. But it sounds like the switching on the outputs of your ic where they deliver current causes the drop in voltage but you have the hardware and schematic you have to find the root cause out. Just pasting another capacitor on it till the Vcc is stable is in my dictionary "quick and dirty"  ;)
If it is hobby go ahead, if it is a product for a company....... 
 
The following users thanked this post: abelCortex

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #17 on: September 03, 2024, 08:42:01 am »
Thank you Kjelt,
At least now I know that probably that is what causes the problem, a drop on ADDR may cause a logic 0, you think that using the 5VDC instead of 3.3VDC would help to avoid that.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6576
  • Country: nl
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #18 on: September 03, 2024, 10:53:08 am »
It should not matter AFAIK.
For testing you could use the tip from  ledtester above and connect ADDR to SCL
Still the VCC should be stable during switching the outputs.
 

Offline Irilia

  • Regular Contributor
  • *
  • Posts: 78
  • Country: de
    • My YouTube channel
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #19 on: September 03, 2024, 11:05:03 am »
It should not matter AFAIK.
For testing you could use the tip from  ledtester above and connect ADDR to SCL
Still the VCC should be stable during switching the outputs.
They will get a different address addr can be connected to Gnd, VCC, SCL, SDA
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 18
  • Country: es
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #20 on: September 03, 2024, 11:20:35 am »
I have seen that in some schemes but i really don't know how can this works connecting the ADDR at the clock signal.
And Irilia responding to you last post, its not problem of the IC itself you can swap them and the problem will happen in the same IC, the one connected to ADDR to Vdd.

 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: us
Re: I2C I/O expander PCAL6524 malfuntion
« Reply #21 on: September 04, 2024, 03:15:34 am »
I have seen that in some schemes but i really don't know how can this works connecting the ADDR at the clock signal.

It's a scheme used by a lot of I2C devices. Just trust that it works. Of course, it will change the I2C address of the chip so you'll have to change your code. Maybe write some simple test code to verify the address has changed.

And it will be helpful to isolate a particular sequence of I2C interactions which reliably trigger the problem.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf