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.

Screenshot%20BME280-3

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
    delay(900);  
    digitalWrite(D7, HIGH); // turn the sensor on
    delay(100);
    bme.begin(BME_ADDR);
  }

Sir!
I am using Raspberry Pi 3 Model B and Android things OS.
How can I change the logic in the library?
And
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.

3 Likes

I have the same problem. I have two “weather stations” both with two BME280s, one for inside readings and the other for outside. Both use the Arduino Uno. I tried all sorts of software solutions but finally installed a transistor controlling +3 to each sensor. At startup, the software brings the two UNO pins high so +3 is fed thru a transistor to its respective BME280. A low cutoff temp is set in the software below which I don’t expect any sensor to ever actually read. When that cutoff is exceeded, the software drops +3 thru the transistors and after a few seconds reboots the Uno.

In the last sentence you are saying that the Uno reboots. Why the Uno and not the sensor?

I tried dropping the power to the sensors and the just restarting them but couldn’t find a way to make it work without going thru the Uno sketch start-up code again. Doing that, everything gets reinitialized. But, who knows, there may be a better way.

I hope that helps. All the best,
glen

I had the same problem with BME280. Problem was that I had loose contact at my sensor when connecting it to the other pins at my amica node MCU. Hopefully after soldering up it should be fixed.
If I move/touch my BME280 a little bit, temperature in Tasmota falls down to -148°C, touching it again and move the sensor to a right position, temperature jumps up to 22°C.