Esp32 --> BME280 unavailable after restart esp32

Hi everyone,

I’ve installed a bme280 sensor. It functioned very well but after a power cycle the sensor refuses to send measurements. It is seen at i2c adres, communication is active, but no readings. Sometimes it starts output at sudden time, but it stays a sleep most of the time.

Any ideas how to get communication available?

Kind regards

  esphome:
  name: schuur
  platform: ESP32
  board: nodemcu-32s

      
wifi:
  ssid: "XXXX"
  password: "XXXX"


captive_portal:

# Enable logging
logger:
 level: VERBOSE

# Enable Home Assistant API
api:
  password: "XXXX"

ota:
  password: "XXXX"

i2c:
  sda: 21
  scl: 22
  scan: True
  id: bus_a
  
sensor:

  - platform: bme280
    temperature:
      id: bme280_temperature
      name: "Temperatuur"
      oversampling: 16x
    pressure:
      name: "Luchtdruk"
    humidity:
      id: bme280_humidity
      name: "luchtvochtigheid"
      oversampling: 16x
    address: 0x76
    update_interval: 60s

Where did you buy the sensor ? looks like defective or a chinese bad copy ! You have well installed the pull-up resistance on I2C bus ?

1 Like

:point_up: this has resolved the same issue on my I2C devices as well. Definitely worth a try.

Sensor is working well, till device reboots. Esp32 enables pull-up resistance as i2c is configured. I have a BH1750 light sensor on the same wire and that works as a Sharm.

As the device can come up again (can’t reproduce why) it works till the next reboot or power failure.

btw the sensor is up on reboot as i2c detects it…

[12:35:11][I][i2c:033]: Scanning i2c bus for active devices...
[12:35:11][I][i2c:040]: Found i2c device at address 0x23
[12:35:11][I][i2c:040]: Found i2c device at address 0x76

This is the exact behavior I experienced as well. Adding the External Pull-Up resistors resolved the poor reboot behavior I experienced with some I2C devices.

Thank you Vinden, that fixed the problem for me aswell. I found a website that explained why the sensors didn’t work if you bind them together on one wire and are powered with 5v.
I installed a 10k PullUp resistor and bam all works as a Sharm. The strange behavior was that the light sensor on the same wire was working and the BME280 wasn’t. But this fixed the problem.