BME280 Humidity readings too high?

For a class, we are using the SparkFun gator:environment - micro:bit Accessory Board (SEN-15269) CCS811/BME280 with micro:bit controllers. Students are monitoring indoor air quality and in one case the relative humidity readings have started displaying between 98 and 100 percent humidity when this is not a reasonable humidity measurement and the board has not been exposed to high humidity conditions. Recent VOC results are significantly lower than they were measuring before, when the humidity seemed to be reading correctly. The temperature readings seem to be consistent with room temperature. Troubleshooting so far includes: reuploading the code to the sensor, plugging the sensor directly into a computer (vs external battery pack).

Any ideas what would cause high humidity readings? What can we check or change to correct the humidity readings?

Are the weird readings popping up randomly or constantly from startup?

The weird readings pop up from start up, but only when the corresponding button for humidity data collection is pressed. It does not constantly scroll across the sensor.

If someone is holding a sensor or had been holding it in the last 30 to 60 minutes moisture from their skin may have gotten into the sensor and it might take a little while for it to ‘dry out.’

Have you tried continuously reading the sensor for an hour and seeing if the readings normalize over time? It may take a little while of the sensor being undisturbed for it to achieve stability.

Another thing you can try is to re-hydrate the sensor in a sealed container (Tupperware or something similar) with a small bit of damp paper towel or a piece of bread for 24 hours. We build these in Colorado where the humidity level is very low and after being soldered at high temperatures and being stored in our warehouse they can ‘dry out’ and don’t give accurate readings.

Keeping them at 75% humidity for 24 hours and then placing them in ambient air for about six hours should allow them to re-calibrate and after that they should be OK.

I will try continuous readings for one hour and, if that does not work, I will begin the process of rehydration. I appreciate your trouble shooting help.

Also make sure every time before reading humidity to read the temperature FIRST. The BME280 library has a number of calculations, which use a global variable (t_fine) that is only set when reading the temperature, either in Celsius or Fahrenheit. As the temperature changes, this impacts the pressure and humidity results.

Well, we tried the 24-hr rehydration thing and it didn’t seem to work, although the readings weren’t collected until a couple days after removing from the Tupperware container. We are reading temperature first and then humidity. Any other suggestions? Another student now seems to be having the same issue with a different sensor so we’d like to get it figured out. Thanks for your help!

Have you tried using another BME280 library on the same chip, just to make sure that the issue doesn’t involve the software?

While working on my library for the BME680 (https://github.com/SV-Zanshin/BME680) I encountered this same error - and it sometimes occurred and I couldn’t figure out why. After experimentation, it would seem that trying to write a value to the “Ctrl_hum” register (which defaults to “off” - which returns 100% humidity) while the Bosch device is performing an active measurement will get ignored. So you have to ensure that there is no conversion and the device is in “sleep” mode before changing that register. Once the register is set to the correct oversampling rate, the results are returned as expected.

Thanks for these ideas - will have to give them a try!