esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

BME280 is overheating and then shows inaccurate values #402

Closed Shwamp closed 5 years ago

Shwamp commented 5 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.):

ESPHome 1.13.4 , Hass.io 0.93.2

ESP (ESP32/ESP8266, Board/Sonoff):

Wemos D1 Mini

Affected component:

https://esphome.io/cookbook/bme280_environment.html?highlight=bme280

Description of problem: Im using this sensor for indoor / weather application. Currently setup on a breadboard like shown i the picture below IMG_3354 I noticed that the temperature readings of the BME280 sensor where 1-2 °C higher then another temperature sensor that I'm using (VMA324). And with a fast google search i found out that the sensor is overheating when its used with oversampling, high _updateinterval and the wrong power mode.

According to the datasheet when it is used for weather monitoring the following settings is recommended:

Skärmavbild 2019-06-04 kl  21 00 36

The oversampling should be changed in the ESPHOME example code to "oversampling: 1x".

The datasheet also recommends the use of "forced mode", and what i found here the sensor should be put to sleep and then woken up to measure the temperature. The time used between the sensor should be either configurable or set to 60 seconds according to the datasheet. Maybe with a loop or something? 🤔

Skärmavbild 2019-06-04 kl  21 07 08

Without the ability to set the sensor to the forced power mode it will continue to show wrong values.

I think that a warning about this kind of issue also should be put on the BME280 page to avoid other people making a similar kind of mistake 😅.

References: https://tinkerman.cat/post/low-power-weather-station-bme280-moteino https://github.com/finitespace/BME280/issues/23 https://github.com/rwaldron/johnny-five/issues/1274

Problem-relevant YAML-configuration entries:

sensor:
  - platform: bme280
    temperature:
      name: "Wemos d1 mini 1 BME280 Temperatur"
      oversampling: 1x
      id: "bme280_temperature"
    pressure:
      name: "Wemos d1 mini 1 BME280 Tryck"
      oversampling: 1x
      id: "bme280_pressure"
    humidity:
      name: "Wemos d1 mini 1 BME280 Humidity"
      oversampling: 1x
      id: "bme280_humidity"
    address: 0x76
    update_interval: 60s

Traceback (if applicable):

Additional information and things you've tried:

OttoWinter commented 5 years ago

The oversampling should be changed in the ESPHOME example code to "oversampling: 1x".

You're free to change the docs, just press the "Edit this page on github" button.

The datasheet also recommends the use of "forced mode" Without the ability to set the sensor to the forced power mode it will continue to show wrong values.

That is already used.

The time used between the sensor should be either configurable or set to 60 seconds according to the datasheet.

-> update_interval; even defaults to 60s

Shwamp commented 5 years ago

Great!! 😃 Will edit the docs! What do you think about changing the default oversampling to x1 under the "Oversampling Options"? The current default "x16" will cause issues according to the data sheet.

OttoWinter commented 5 years ago

What do you think about changing the default oversampling to x1 under the "Oversampling Options"?

That would be a breaking change, and I don't really like those unless it's really required.

Also, while the x16 might warm up the sensor, I do think it will be a pretty constant amount it is warmed up with, so a simple offset should account for that pretty easily. And x16 oversampling does give you more accuracy too.

OttoWinter commented 5 years ago

Closing due to inactivity - and the software is correct, the docs could just be updated.