Wemos esp32-s2 mini i2c mutiplexer - bme280


I have trouble setting up a wemos esp32-s2 mini with a TCA9548A I²C Multiplexer and BME280 sensor. In fact, when I set the scan option no I2C device is found. I have attached a Lux and Accelerometer to other 2 channels just to see, but I think not even the multiplexer is found.

sda: 33 # D2 # GPIO21 for ESP32
scl: 35 # D1 # GPIO22 For ESP32
id: i2c0
scan: True


  • address: 0x70
    id: multiplex0
    i2c_id: i2c0
    • bus_id: multiplex0channel0
      channel: 0
    • bus_id: multiplex0channel1
      channel: 1
    • bus_id: multiplex0channel2
      channel: 2
    • bus_id: multiplex0channel3
      channel: 3


  • platform: bme280
    i2c_id: multiplex0channel0
    #address: 0x76
    name: “BME280 Temperature”
    id: bme280_temperature
    name: “BME280 Pressure”
    id: bme280_pressure
    name: “BME280 Relative Humidity”
    id: bme280_humidity

and here the output:

[18:11:04][C][i2c.idf:061]: I2C Bus:
[18:11:04][C][i2c.idf:062]: SDA Pin: GPIO33
[18:11:04][C][i2c.idf:063]: SCL Pin: GPIO35
[18:11:04][C][i2c.idf:064]: Frequency: 50000 Hz
[18:11:04][C][i2c.idf:073]: Recovery: failed, SDA is held low on the bus
[18:11:04][I][i2c.idf:077]: Results from i2c bus scan:
[18:11:04][I][i2c.idf:079]: Found no i2c devices!
[18:11:04][C][tca9548a:037]: TCA9548A:
[18:11:04][C][tca9548a:038]: Address: 0x70
[18:11:04][C][gpio.binary_sensor:015]: GPIO Binary Sensor ‘PIR Sensor’
[18:11:04][C][gpio.binary_sensor:015]: Device Class: ‘motion’
[18:11:04][C][gpio.binary_sensor:016]: Pin: GPIO3
[18:11:04][C][bme280.sensor:177]: BME280:
[18:11:04][C][bme280.sensor:178]: Address: 0x77
[18:11:04][E][bme280.sensor:181]: Communication with BME280 failed!

I have tried manuell adreses 0x76 and 0x77, but nothing.

Any ideas?

best greetings

Based on this message, I would say: “check your wiring”.

I have an update:

  1. 1/2 wemos s2 mini were faulty.
  2. 1/3 i2c mutiplexer was faulty

now the mutliplexer is found with i2c scan. I got a lux sensor to work, but only with pullup resistors 4.7K on SDA and SCL of the multiplexer and on the i2c lines of the lux sensor.

bme280 is still not working, BUT:

If I change it’s address tp 0x76 then the board will not boot. When I pull the VCC wire of the bme280 it boots again. VCC plugged, does not boot. But this behavior is only with address 0x76, which should be the correct address.
I tried another BME280 with the same behaviour.

I wired and soldered the board from scratch. I can see the mutiplexer, I can see the bh1750 light sensor, have a PIR connected to GPIO, it works, except for the bme280.

When I set address: 0x76 the board will not boot. So it seems once it somehow talks to the sensor, something bad happens and the board wont boot until I flash another image via USB where address 0x76 for bme280 is not set.

Another experiment: Set bme280 to bmp280 with address 0x76. It boots then, but says:

[E][bmp280.sensor:131]: BMP280 has wrong chip ID! Is it a BME280?

Yes, obviosly, but how the hell do know it’s the wrong chipID, so there must be some communication going on…

I got it! I used the esp-idf framework because I was not able to initially boot the s2 mini with the default settings. Dont know why i boots now with the default. But the bme280 started working once I switched the framework.

board: lolin_s2_mini
variant: ESP32S2
#type: esp-idf