BME280 sensor problem

I have an similar issue. I just bought two new Anpro BME280 sensors. Inside my house no problems: temperature, pressure, humidity ok. But when I place the sensor outside the house by minus degrees like -1° Celsius (through an ventilation opening) the temperature went down to -140 degrees Celesius (like shown at the screenshot from by Node-Red dashboard). The same problem with the second sensor. Actually I’m thinking about a downgrade to DHT22 because I have no further idea.


Unfortunately this is not an ESP forum but for Particle devices which are based on STM32F or nRF52840 controlers.

However, the sensor issue addressed here may still apply on ESP and the remedy to depower/repower the sensor in such cases should work there just the same. But how to get Tasmota do that is not for us to tell.
You may find some answers by browsing the Tasmota GitHub issues (maybe filing your own if it’s not yet addressed) and/or on a dedicated forum.

Thanks for your friendly advice - all hints to ESP or Tasmota are deleted now. To your information: I have reviewed implementations of the source code of the BME drivers allready. I think that it’s a special hardware problem.

1 Like

I would also check for a mechanical problem based on moving from inside to outside - Check soldering as the board will flex in the temp change and also check the vent is not obstructed by condensation caused by the arm to cold transition.

Thank you for your suggestions. I have finally placed the sensor inside my home (it has revitalised) and use a DHT22 instead for outside measurement.

Hi Sir
Did you find any solution for this because I am getting similar issue, Sensor is giving me -133, 180 degree temperature value at any time.

Hello sugandha :slight_smile:

Unfortunately the only way I found was to power the sensor over a GPIO pin (f.e D7) and when the sensor gives strange values, you have to drive the pin LOW and then HIGH again. I use the following code which works (never got an error since I use it)

  if (((tempc < -40) or (tempc > 80) or (pressurehpa == 0))) {
    digitalWrite(D7, LOW);    // turn the sensor off
    digitalWrite(D7, HIGH); // turn the sensor on

I am using Raspberry Pi 3 Model B and Android things OS.
How can I change the logic in the library?
Which Pin will I have to drive Low and High for power?
Will the GPIO provide enough power to the sensor?

First, this is not a Raspberry Pi nor an Android Things OS forum but a Particle forum.
If you don’t use any of their devices or their (discontinued) RPi add-on you are probably better helped at a forum dedicated to the parts you are using.

Having said that, in order to power cycle the sensor - as @electronweather suggested - you first need to have the sensor supply pin connected to a GPIO pin of your choosing.
And that will be the pin you need to power cycle.

Since you are not using a Particle device you should be consulting the datasheets for the things you are using - RPi and BME280 sensor.

1 Like