BME280 sensor I2C connection problem

Issue #495 resolved
Hans Braakmann created an issue

When attempting to connect this six pin BME280 sensor on a Pico/W I can't get a working I2C connection. I experimented to pull the SDO pin to LOW and HIGH to force a I2C connection but still get the message…NO BMP280 or BME280 FOUND. I tested it on three identical sensors all with the same results.

Comments (11)

  1. John Maloney repo owner

    The BME280 library checks both of the possible I2C addresses, so it it shouldn't matter if SD0 is LOW or HIGH.

    Which board are you using?

    If you are using a generic Pico or Pico-W board then the I2C pins are:

    Pin 4 - SDA Pin 5 - SCL

    The Pico-ed and Wukong2040 boards use I2C pins.

    Check your wiring. Also, make sure that you are powering the sensor with 3.3v, not 5v.

  2. Hans Braakmann reporter

    Thanks for your reply with the suggestions, as mentioned I used a Pico/W even a I2C scan does not reveal the I2C address for this Bme280 sensor. I did double check the workings (pin 4 and 5 and VCC 3.3 V) to connect a OLED screen e voila…returned 60. Could be that these sensors are all from an inferior batch.

  3. John Maloney repo owner

    They should show up on an i2c scan whichever their address is. Hard to believe that all three of them are bad...

    The product page says:

    If you want to use the module with SPI, you have to connect the CSB pin to GND.

    You might try connecting the CSB pin to HIGH to force the board into I2C mode. One would hope that the board would have a pullup resistor on that pin to make i2c be the default if the pin is not connected but perhaps it doesn't...

  4. John Maloney repo owner

    Did you get this working? I think it is a hardware issue, not a MicroBlocks bug, so I'm marking this issue resolved. However, feel free to add additional comments here to help others who might run into this problem.

  5. Hans Braakmann reporter

    For me I found a working solution with this six pin I2C/SPI GY-BME 280 sensor. To set and keep the sensor in I2C mode also connect the CSB pin to VCC 3.3V.

  6. John Maloney repo owner

    Glad you found a solution! I thought that board had a built-in pull-up resistor on the CSB line but i guess not.

  7. Hans Braakmann reporter

    You are absolutely right, this sensor has a built-in pull-up resistor on the CSB line and the Pico also has pin pull-up resistors. It gives me headaches. This solution worked for an hour until I connected a I2C Oled screen to show the bme sensor data on screen. After 10 minutes and some strange OLED screen behavior the sensor does not work anymore also after reconnecting the bme sensor I cannot get this sensor to again find its I2C address. After running a I2C scan it disconnects from the MicroBlocks IDE. I find this special sensor behavior a challenge to get it to work…could it be a Pico/w I2C power issue on pin 4 and 5? Or is it just a bad sensor? You can close issue #505.

  8. Log in to comment