Closed sumerland closed 4 years ago
OK, I felt brave today, got visual studio code and the beta as zip file from this morning. In the bmx280 section I repeated what's done for the temperature correction and added a humidity correction. The GUI now has an additional humidity correction field.
Looking at the previous weeks the delta to the (trustworthy) SHT35 is -20% on humid days and about -10% in dry air. So I went ahead with +15% correction. It's too early to see the effect but you get the idea of the difference of the original data:
And for the sake of completeness, here is the effect of the 2.5degC correction:
It's a hack - and a trivial one, as even I managed to do it. I have no idea how to upload such a change and whether it is welcome at all. Please let me know if you need more info.
Hi, this "Hack" is very appriciated! I asked already for such correction fields. Can you please let me know what you changed? Thx!
In airrohr-firmware.ino around line 2400 the temperature correction is applied
last_value_BMX280_T = t + readCorrectionOffset(cfg::temp_correction);
A few lines later the humidity is read for the BME280. There I modified the existing line to
last_value_BME280_H = h + readCorrectionOffset(cfg::humid_correction);
From there on you can check where temp_correction
is defined/used and add equivalent lines for the new humid_correction
. You also have to check the following files for TEMP_CORRECTION
and temp_correction
and duplicate/modify those lines for the humidity correction:
@sumerland Thx a lot!
it is likely that the 15% humidity offset is just a result of the 2.5 °C temperature offset, as the humidity reading of the sensor is compensated with a complex calculation based on the temperature reading of the sensor. so one way to fix that would be to adjust temperature reading earlier so that humidity calculation is influenced by this.
According to the datasheet the absolute accuracy is +/- 1.0 °C, so 2.5 is well beyond the specified tolerance. you're saying that all batch-of-5 sensors did have the same issue?
I have checked that many times, albeit using an online calculator using a simplified approach (https://rechneronline.de/barometer/luftfeuchtigkeit.php)
An example from yesterday 20:00:
SHT: 15,16degC, 82% rel. humidity BME: 17,44decC, 64% rel. humidity
Feeding the SHT's values into the calculator yields an absolute humidity of 10.61g/m^3. Using the BME's temperature this is translated into a relative humidity of 71,4% - still about 7% off the SHT's reading. I don't know if a more accurate numerical approach is able to close that gap.
Yes, I got a set of five BMEs and they were all very similar. Here is a comparison after some more hours. You can clearly see when I applied the temperature and the humidity correction.
P.S.: fixed a typo above. The BME's pressure data is fine, but the other two I hardly trust.
According to datasheets, SHT35 has +/- 2% RelH tolerance (with readings < 90%) and BME280 ~ +/-3%
so this is pretty close. I would however trust the values of a SHT35 any time over a BME280 given its much much higher price and better certification. also long term stability seems to be a lot better with a SHT sensor than the BMEs, they tend to age relatively quickly.
I just wonder if we have a defect in the sensor data reading code that would explain this huge difference. I only have two BME280 and they're within < 0.2°C of each other and I'd think < 0.5 compared to other sensors (sht 32, various commercial weather/temperature stations. However, there is a lot of sensor-specific code based on calibration data that could mean that some batches expose issues that others do not.
can I give you a test firmware with some extra debugging code for testing?
I noticed ~3 years ago that DHT22 humitdity values was drifting after 6 month operation against 100% (when cold, high RH), and a regenaration (drying) was not helpful. So I installed BME280's at DHT22 in parallel. I have about 20 BME280 / DHT22 in operation, see eg. https://api-rrd.madavi.de/grafana/d/q87EBfWGk/temperature-humidity-pressure?orgId=1&var-chipID=esp8266-1492670 My experiance:
@dirkmueller I am happy to run the test firmware. I have also ordered three additional BME280 on different breakout boards from different sources. Two should arrive today and I will give them a go.
On the map I can see a sensor just a few km away which runs a BME280 and has sensible humidity readings.
I have just installed a different BME280 (pimorino.com, replaces the previous from AZDelivery). Temperature is now within 0.5K. Humidity is probably too early, as the sensor should undergo the conditioning procedure but straight out of the box it's now "just" 5% below the SHT35 but the delta is growing slowly.
@summerland Now I operate a SHT31D (shall be water fluid resistant). If you like you can compare values of several measurements arround my house:
values 08.09.2020 04:00
@Franz4596 Not sure about your DHT22 - this was the first sensor I replaced on my board and I don't longer use it.
Here is the temperature and humidity data of the "new" BME280 vs SHT35.
I have no more complaints and went back to the current beta software. Humidity and temperature corrections are no longer required. Of course I still don't know if the previously used BME280 was dodgy or if the firmware does not handle it properly. I am happy to send the sensor to anybody willing to debug it.
Perfect, it looks that your five BMEs are a bad production. I "use" DHT22 (even bad humidity) because its recomanded by luftdaten only. Always I add a BME280 because aditional pressure and a little better humidity behavior. A few BME280 hang up sometims and some got damaged. Even temperature of BME and DHT are close together, I recomand to use SHT31/35. Think this issue could be closed.
I have compared the outputs of BME280 and SHT35 with data from the nearby weather station throughout the past weeks. The SHT35 is typically within 1-2% rel. humidity (taking temperature differences into account), whereas the BME280 is usually 20% lower and 2.5degC higher. The temperature error can be corrected using the temperature compensation in the configuration (luckily it does not affect the SHT output!). Could you please add a humidity correction, too?
P.S.: Yes, I did condition the BME280 as recommended in the manual and the error is similar across the batch of 5 sensors I purchased.