I2C devices interfering
Posted: Mon Nov 06, 2023 10:56 am
Hi all,
I am having some issues trying to get several devices to share the I2C bus.
Two of them don't play nicely together, and I am at a loss as to why.
Devices:
MCP23017 on address 0x20
ADS1115 on address 0x48
GP8302 on address 0x58
(I have verified these addresses with I2C scanner)
The ADS1115 ADC and the MCP23017 MUX work fine together, and the GP8302 will work great with the only the ADS1115.
But the The GP8302 will not function when the MCP23017 is init - it appears to start, but will not produce an output. The MCP23017 works fine.
Note that all devices remain connected, the only difference is which ones I initialise. To test I simply comment out the appropriate begin(), and any areas where the code would try to use that device.
The ADC and MUX are built in to my custom PCB, but the GP8302 is a DFRobot DFR0972 4-20mA DAC breakout.
My PCB has 10k pullups to 3V3 on the SDA and SCL. The DAC has 4.7k pullups according to its schematic.
I am using the Adafruit libraries for the MCP23017 and ADS1115, and the DFRobot library for the DAC.
I have also tried a different library for the MUX, same issue.
I am happy to post my code, if you let me know which region of it you would like to see as it is fairly extensive.
I do not have any other pins of the ESP32 exposed on my PCB, otherwise I would try to put the DAC onto the other I2C bus. I tried to use TX and RX (pins 1 and 3) as they have pins to connect to for programming of course - but couldn't get that to work either.
Does anyone have any ideas why the GP8302 doesn't work on the same I2C bus as the MCP23017?
Any tips on where to start looking would be appreciated.
Thank you very much for any help!
I am having some issues trying to get several devices to share the I2C bus.
Two of them don't play nicely together, and I am at a loss as to why.
Devices:
MCP23017 on address 0x20
ADS1115 on address 0x48
GP8302 on address 0x58
(I have verified these addresses with I2C scanner)
The ADS1115 ADC and the MCP23017 MUX work fine together, and the GP8302 will work great with the only the ADS1115.
But the The GP8302 will not function when the MCP23017 is init - it appears to start, but will not produce an output. The MCP23017 works fine.
Note that all devices remain connected, the only difference is which ones I initialise. To test I simply comment out the appropriate begin(), and any areas where the code would try to use that device.
The ADC and MUX are built in to my custom PCB, but the GP8302 is a DFRobot DFR0972 4-20mA DAC breakout.
My PCB has 10k pullups to 3V3 on the SDA and SCL. The DAC has 4.7k pullups according to its schematic.
I am using the Adafruit libraries for the MCP23017 and ADS1115, and the DFRobot library for the DAC.
I have also tried a different library for the MUX, same issue.
I am happy to post my code, if you let me know which region of it you would like to see as it is fairly extensive.
I do not have any other pins of the ESP32 exposed on my PCB, otherwise I would try to put the DAC onto the other I2C bus. I tried to use TX and RX (pins 1 and 3) as they have pins to connect to for programming of course - but couldn't get that to work either.
Does anyone have any ideas why the GP8302 doesn't work on the same I2C bus as the MCP23017?
Any tips on where to start looking would be appreciated.
Thank you very much for any help!