I2C failure on "substitute" BMP280

My questions are;

  1. whether there are adjustments to be made to the I2C address scanner to make it find with this chip?
  2. whether I need or can control the address setting via the CSB and SD0 lines. ie. can I assume they are actually the AD0 and AD1 lines?

I ordered BMP280 temperature sensors and got similar looking boards labeled GY-B11-280 instead of BMP-280. The P is marked so it is not an E version with pressure - only temperature and humidity.

The chip is a Texas Instruments tmp461-KP. Datasheet at https://www.ti.com/lit/gpn/tmp461

I ran the following code and it usually says no I2C devices found but occasionally says 0x47; about 10-20 passes between reports. I note that 0x47 is not one of the addresses the chip is supposed to offer. The data sheet says 48-50.

The address is set via AD0 and AD1 on the chip. I tried pulling each and both of CSB and SD0 high but no change. (then tried a different sensor board in case I fried something)

The scan code used is interfacing-16x2-lcd-module-with-esp32-with-and-without-i2c/#Code_to_get_the_I2C_address

I bought a dozen of them.

Any help is appreciated.

How have you wired up this board? Do you have a link to the actual board(s) you bought?

Sounds like the seller cheated you. I would send them back and/or demand a refund.

I wired it up per https://startingelectronics.org/tutorials/arduino/modules/pressure-sensor/

It's the same as for the actual BMP280 for the sensor.
But from a Vroom esp32 using pins D21-SDA and D22-SCL.

Scanner code

```
// https://www.circuitschools.com/interfacing-16x2-lcd-module-with-esp32-with-and-without-i2c/
#include <Wire.h> //include Wire.h library
 
void setup()
{
  Wire.begin(); // Wire communication begin
  Serial.begin(9600); // The baudrate of Serial monitor is set in 9600
  while (!Serial); // Waiting for Serial Monitor
  Serial.println("\nI2C address Scanner CircuitSchools.com");
}
 
void loop()
{
  byte error, address; //variable for error and I2C address
  int devicecount;
 
  Serial.println("Scanning...");
 
  devicecount = 0;
  for (address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
 
    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.print(address, HEX);
      Serial.println("  !");
      devicecount++;
    }
    else if (error == 4)
    {
      Serial.print("Unknown error at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.println(address, HEX);
    }
  }
  if (devicecount == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");
 
  delay(5000); // wait 5 seconds for the next I2C scan
}
```

If I looked at the right board, then the Vroom esp32 is a 3V3 device so we can probably discount applying 5V to the BMP280.

Do you know if there are pullup resistors on your I2C SCL & SDA lines? I think that the pullups
are around 1K5 for a 3V3 system.

Can you post a photo of your board? And maybe a quick sketch of the wiring. Are you using a 3.3V Arduino or a 5V board?

Something doesn't jive. Also I believe there is an I2C scanner in the library manager. you should try that.

Perhaps just a bad board or device.

https://i1.wp.com/www.esp32learning.com/wp-content/uploads/2018/01/esp32-and-bmp280_bb.png?w=678

That board is a BMP280 with a 5 to 3.3 Volt regulator and 5 <--> 3.3 volt level shifters. I'm not sure it works with a 3.3volt board.

This is the I2C scanner I have used and know it works. You might give it a try:

#include <Wire.h>

void setup() {
  Wire.begin();

  Serial.begin(9600);
  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}

void loop() {
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for (address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.print(address, HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error == 4)
    {
      Serial.print("Unknown error at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}


Looking at other BMP280 boards, I came to realize that this clone board has a bad print job.
Instead of GY B11 P 280 it should read GY BM P 280. I guess the GY influenced my vision.
It still is a clone board I think as it uses a Texas Instrument instead of a Bosch sensor and that probably explains the bad print job.

@JohnRob. Thanks, I'll try your scanner and if no luck on the three boards tested then I'll shift to the SPI interface and see if that works.

Thanks all.