TCA9548A i2c scanner not detecting i2c slave (allsensor DLHR)

After few tries, I am still struggling to detect the i2c All sensor DLHR I have (0x29) using various i2c scanners.

My i2c devices works well using a simple i2c scanner
tca9548a detected as 0x70
MPU6050 as 0x68
DLHR as 0x29.

I have then hooked up the i2c devices on the different tca9548a ports:
using the TCAA4598 i2c multiplex scanner, I can detect the MPU6050 but not the DLHR pressure sensor.

note the MPU6050 is used just there to check if the i2c addresses are detected.

I am using the Allsensors_DLHR library from GitHub - jeremycole/AllSensors_DLHR: Arduino library for the AllSensors DLHR Series Low Voltage Digital Pressure Sensors.

Does anyone would be able to help me with this ?

What if you hook them to the same port?

The idea is to multiplex the DLHR which have a fixed i2c address, so I am not intending to have more than 1 device attached to the same port.

however, when both hooked on the same i2c bus, both i2c address are detected :astonished: I am confused .

So here is a piece of code.

#include <Arduino.h>
#include <Wire.h>
#include <AllSensors_DLHR.h>

#define TCAADDR 0x70

AllSensors_DLHR_F05D_8 gagePressure(&Wire);

void tcaselect(uint8_t i);

void setup() {
    Wire.begin();
    Serial.begin(115200);
    gagePressure.setPressureUnit(AllSensors_DLHR::PressureUnit::PASCAL);
}

void loop() {
     for (uint8_t t=0; t<8; t++){
      tcaselect(t); 
      Serial.print("TCA Port #"); Serial.print(t);
      for (uint8_t addr = 0; addr<=127; addr++) {
        if (addr == TCAADDR) continue;
        Wire.beginTransmission(addr);
        if (!Wire.endTransmission()) {
          Serial.print("Found I2C 0x");  Serial.println(addr,HEX); Serial.print("\t");
        }
      }
      Serial.println("");
    }

  delay(1000);


  Serial.println("\n\nTrying Measurement\n\n");


  tcaselect(1);
    gagePressure.startMeasurement();
    gagePressure.readData(true);

  Serial.print("Pressure: ");
  Serial.print(gagePressure.pressure);
  Serial.print(" Temperature: ");
  Serial.println(gagePressure.temperature);
  Serial.print("\n\n");
  delay(100);
}

void tcaselect(uint8_t i) {
  if (i > 7) return;
  Wire.beginTransmission(TCAADDR);
  Wire.write(1 << i);
  Wire.endTransmission();  
}

When the MPU6050 is plugged on the same port, I am able to communicate and retriev temperature and pressure, when I disconnect the MPU6050, the DLHR is no more detected.

Maybe the MPU-6050 is actually a module with the sensor and pullup resistors. Maybe the DLHR sensor does not have pullup resistors.

Which Arduino board do you use ? The DLHR sensor is a 3.3V sensor, and it is better to not apply SDA and SCL from a 5V Arduino board to it.

Can you give links to all the I2C modules or show of photo with them ?

Did you know that your MPU-6050 could be fake ?

I think that you should use the tcaselect() also in setup(). The sensor functions in setup() might already communicate with the sensor (maybe not for this sensor, but for most others sensors they do).

I am using a Uno and I am powering everything to 3.3V.
I had a try with 10kOhm resistors and did not work.
the DLHR sensor datasheet is here: http://www.allsensors.com/datasheets/DS-0350_Rev_C.pdf
the chips I have are DLHR-F50D-E1BD-I-NAV8 (so package and pinout is given p15). I dont see if they have pull up resistors.

It will be easier to us when you show what you really have, photos, schematics, links to modules and so on. You are looking at something, and we have to guess what you have.

Do you have the SS pin of the DLHR sensor set high ? So it does not accidentally go into SPI mode.

The I2C multiplexer needs pullup resistors between the Arduino and the I2C multiplexer and also on every (sub) I2C bus.
The Arduino Uno has very weak internal pullup resistors, that might not be enough. The I2C multiplexer module has probably 10k pullup resistors on the Arduino side, but they can sometimes be enabled or disabled and they connect to 3.3V. I suggest to disable those and add 10k external pullup to 5V for the Arduino side.
The MPU-6050 module probably has pullup resistors.
If you tried with 10k pullup, then it should work. You need those anyway, so please keep them to pullup the (sub) I2C bus.

Looks like something is wrong with your hardware, most probably missing pullup resistors. Each (used) port of the multiplexer must have pullup resistors on SCL and SDA. The pullups must connect to the supply voltage used by the I2C modules of that port.

I'd try at most 3k3 so that at least 1mA current flows in the active state.

Thank you, the 3.3kOhm resistor allows the detection!