What's wrong with BME280

I have assembled a device which has a weather sensor, BME280 and is powered by a Lipo battery.
It is not protected by a case or something.

While inside, it works perfect.

When I take it outside, the humidity drops to 0%, although the temperature and pressure are still functional.

I've noticed that it happens when outside is below 10C and high humidity.
The humidity climbs to ~75% (usually is 80-100% humidity here), then it drops to 0% and stays there.

My first thoughts are that:

  • the battery is not performing well in cold. I took it from a mobile phone, so is very unlikely to perform bad with other devices.
  • the circuits are not insulated, so the high humidity from outside could cause the malfunction.

Either way, why the pressure and temperature are still working and the humidity is not?

What code are you using?

It would probably help people find a problem if you posted the code.

Are you using a regulator? I see from the datasheet the max voltage is 3.6V. A freshly charged LiPo can be more than 4.2V.

Same code that I use when inside. Is nothing special about it. A line of code which imports the library and a line of code which reads the value.

The board outputs 3.3V.

Show us your sketch and give a link the the library that you use.
Give a link to the module that you have. Tell us how everything is powered.

There should be some 'law' for this.
Let's make one up. Koepel's law: Fifty percent chance that the problem is in the section that was ignored from the beginning, because you thought that the problem could not be caused by that section.

DuaneDegn:
What code are you using?

george_i:
Same code that I use when inside. Is nothing special about it. A line of code which imports the library and a line of code which reads the value.

That is not a good answer.

Low temp and high humidity might result in condensation inside the sensor. I do not know how to solve this.

The datasheet states that the operating ranges are only for non-condensing environments.

That said, I tested a BME280 in an enclosed box that included an open container of very hot water (just boiled). There was condensation on all of the electronics causing some of the components to temporarily malfunction. But the BME280 continued to work and provide what appeared to be correct or at least reasonable values. Under those conditions the reported relative humidity quickly rose to 100%.

One remote possibility is that sunlight is causing your problem. I know that it can screw up the pressure reading. The hole has to line up just right or the light has to be very bright. I had to put a piece of loose black tape over a BMP180 in one project or else the pressure would go nuts in sunlight. Maybe light is making its way through the port hole to the humidity sensor and affecting it. Or maybe not. But you could easily test that by shielding it with something opaque.

From the datasheet:

During operation the sensor chip is sensitive to light, which can influence the accuracy of
the measurement (photo-current of silicon). The position of the vent hole minimizes the light exposure of the sensor chip. Nevertheless, Bosch Sensortec recommends avoiding the exposure of BME280 to strong light sources.

.

Just for fun, here are a couple of photos of a BME280 that I accidentally damaged:

This is the code used.

I thought that if proper insulated will function normal. But it doesn't.

I've just tested it. Actual weather is 3C and 100% humidity, but the sensor goes down to 0 when is reaching 75-80% humidity.

This is so frustrating, because the humidity is very important in my project.

The code doesn't seem to have something special, allthough I did not check all the shifting of the bits. It could be the sensor itself.
You can do what I do in such situation: buy many other brand and type sensors and see for yourself which one is the best in that situation. Use at least two different sensors in the final project, so you don't rely on just a single sensor.

For future reading:

I found the cause of humidity malfunctioning: condensation inside of the sensor.
The temperature inside was 25C and I took it out, where the temperature was 5C.

But I don't know how to solve this problem, if it can be solved. I have to keep the device inside and take it with me, no matter the temperature variations.

george_i:
For future reading:

I found the cause of humidity malfunctioning: condensation inside of the sensor.
The temperature inside was 25C and I took it out, where the temperature was 5C.

But I don't know how to solve this problem, if it can be solved. I have to keep the device inside and take it with me, no matter the temperature variations.

If you project allows it, maybe a forcing the air to be sensed to circulate around your device?

Arduino due and BME280
Hey Due's lover I know that programming on due is little bit harder than UNO. If anyone fell troubleshoot to getting data on BME280 with Arduino due or any Arduino compatible board. Feel free and write your problem in the message box with your email id at my webpage amitpatel144.webs.com. I wasted five month to do it. Thanks