-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bme280 reading high #1051
Comments
I have the same problem. I have mounted the BME280s so that they have no unwanted heat rising onto them, yet a side-by-side test with a DS18B20 consistently shows the BME +4degC. This is consistent over about 6 sensors.
|
I use a BME280 for my roomthermostat and the temperature is correct in Celcius for me. The same is valid when I use the DS18B20. Both stand-alone mode. Hooking up a DHT22 does give me a difference of ~+4C. So I've thrown away all the DHT's since the data is not useful enough for me. I did not compare a BME280 together with a DS18B20 on the same device within the same box. I can do that test also and see if I spot huge differences. I think you need to use the right sensor for the right application though ;) Test: I notice a ~1 degree difference after running it a time and stayed a away for a bit to avoid environment changes. |
I took smadds advice and adjusted the temperature in software with homeassistant. This is good enough for me. |
I've been comparing code between Tasmota's xsns_bmp.ino file and Bosch's example code and there seem to be a number of differences. I can appreciate the bitwise shifting may be more efficient than division, but...
Bosch code bme280.c
Tasmota 5.8.0 xsns_bmp.ino
Can anyone cleverer than me work out whether they are mathematically equivalent? |
I've noticed the same issue. This seems to be the same issues as encountered and fixed by ESPEasy: |
I did some studying of the datasheet and the solution from ESPEasy and I have an easier fix.
I set pressure to x1 to continue to get pressure readings `
} else { This window does not appear to like my code, but the important thing is to set register F5 "config" to 0xA0 to limit the self heating. Reducing the oversampling is probably a good idea too (the two control registers). |
Before I made this change, my two sensors that are on the same breadboard right next to each other and measuring the same air always showed the BMP about 1.5 deg F higher. After making the change, the BMP now reads about 0.5 deg F higher, which is well within the spec limits. |
@smadds you might want to look at section 4.2.3 of the Bosch BME280 manual, that has the integer version of the conversion formulae. You are looking at the floating point implementation which is only recommended for use on a PC. |
5.10.0a * Add (experimental) support for sensor SHT3x * Add support for sensor MH-Z19(B) using serial interface to be enabled with define USE_MHZ19 in user_config.h (#561, #1248) * Add (experimental) support for sensor MH-Z19(B) using SoftwareSerial to be enabled with define USE_MHZ19 in user_config.h (#561, #1248) * Add support for iTead SI7021 temperature and humidity sensor by consolidating DHT22 into AM2301 and using former DHT22 as SI7021 (#735) * Fix BME280 calculation (#1051) * Add support for BME680 using adafruit libraries (#1212) * Change ADS1115 default voltage range from +/-2V to +/-6V (#1289) * Add multipress support and more user configurable options to Sonoff Dual R2 (#1291) * Fix Sonoff Bridge missed learned key if learned data contains 0x55 (End of Transmission) flag (#1095, #1294) * Add support for TSL2561 using adafruit library (#661, #1311) * Add alternative support for SHT3x (#1314)
5.10.0a * Add (experimental) support for sensor SHT3x * Add support for sensor MH-Z19(B) using serial interface to be enabled with define USE_MHZ19_HARD_SERIAL in user_config.h (#561, #1248) * Add (experimental) support for sensor MH-Z19(B) using SoftwareSerial to be enabled with define USE_MHZ19_SOFT_SERIAL_OBSOLETE in user_config.h (#561, #1248) * Add (experimental) support for sensor MH-Z19(B) using stripped SoftwareSerial to be enabled with define USE_MHZ19_SOFT_SERIAL in user_config.h (#561, #1248) * Add support for iTead SI7021 temperature and humidity sensor by consolidating DHT22 into AM2301 and using former DHT22 as SI7021 (#735) * Fix BME280 calculation (#1051) * Add support for BME680 using adafruit libraries (#1212) * Change ADS1115 default voltage range from +/-2V to +/-6V (#1289) * Add multipress support and more user configurable options to Sonoff Dual R2 (#1291) * Fix Sonoff Bridge missed learned key if learned data contains 0x55 (End of Transmission) flag (#1095, #1294) * Add support for TSL2561 using adafruit library (#661, #1311) * Add alternative support for SHT3x (#1314)
As suggested here: arendst/Tasmota#1051 With implementation taken from here: https://github.com/BoschSensortec/BME280_driver
5.11.0 20180107 * Minor webpage HTML optimizations (#1358) * Updated German translation (#1438) * Change Sonoff Pow Energy MQTT data message and consolidate Status 8 into Status 10 * Change ADS1115 default voltage range from +/-2V to +/-6V (#1289) * Change text to Active for 3 minutes (#1364) * Change Wemo SetBinaryState to distinguish from GetBinaryState (#1357) * Change output of HTTP command to valid JSON and Array only (#1363) * Removed all MQTT, JSON and Command language defines from locale files and set fixed to English (#1473) * Renamed commands Color2,3,4 to Color3,4,5 * Fix BME280 calculation (#1051) * Fix Sonoff Bridge missed learned key if learned data contains 0x55 (End of Transmission) flag (#1095, #1294) * Fix PWM initialization in Dimmer/Color mode (#1321) * Fix Wemo Emulation (#1357) * Fix display of build date and time in non-english locale (#1465) * Fix Wemo and Hue emulation by adding M-Search response delay (#1486) * Add libraries Adafruit_BME680-1.0.5, Adafruit_Sensor-1.0.2.02, TasmotaSerial-1.0.0 and TSL2561-Arduino-Library * Add command Color2 to set color while keeping same dimmer value * Add device function pointers * Add support for SenseAir S8 CO2 sensor * Add color led signal to Carbon Dioxide (CO2) sensors using defines CO2_LOW and CO2_HIGH in user_config.h * Add support for Domoticz Air Quality sensor to be used by MH-Z19(B) and SenseAir sensors * Add support for PZEM004T energy sensor * Add support for iTead SI7021 temperature and humidity sensor by consolidating DHT22 into AM2301 and using former DHT22 as SI7021 (#735) * Add support for BME680 using adafruit libraries (#1212) * Add support for MH-Z19(B) CO2 sensor (#561, #1248) * Add multipress support and more user configurable GPIO to Sonoff Dual R2 (#1291) * Add support for TSL2561 using adafruit library (#661, #1311) * Add support for SHT3x (#1314) * Add support for Arilux LC06 (#1414) * Add Italian language file (#1449) * Add 2nd Gen Alexa support to Wemo emulation discovery (#1357, #1450) * Add define for additional number of WS2812 schemes (#1463)
5.11.0 20180107 * Minor webpage HTML optimizations (arendst#1358) * Updated German translation (arendst#1438) * Change Sonoff Pow Energy MQTT data message and consolidate Status 8 into Status 10 * Change ADS1115 default voltage range from +/-2V to +/-6V (arendst#1289) * Change text to Active for 3 minutes (arendst#1364) * Change Wemo SetBinaryState to distinguish from GetBinaryState (arendst#1357) * Change output of HTTP command to valid JSON and Array only (arendst#1363) * Removed all MQTT, JSON and Command language defines from locale files and set fixed to English (arendst#1473) * Renamed commands Color2,3,4 to Color3,4,5 * Fix BME280 calculation (arendst#1051) * Fix Sonoff Bridge missed learned key if learned data contains 0x55 (End of Transmission) flag (arendst#1095, arendst#1294) * Fix PWM initialization in Dimmer/Color mode (arendst#1321) * Fix Wemo Emulation (arendst#1357) * Fix display of build date and time in non-english locale (arendst#1465) * Fix Wemo and Hue emulation by adding M-Search response delay (arendst#1486) * Add libraries Adafruit_BME680-1.0.5, Adafruit_Sensor-1.0.2.02, TasmotaSerial-1.0.0 and TSL2561-Arduino-Library * Add command Color2 to set color while keeping same dimmer value * Add device function pointers * Add support for SenseAir S8 CO2 sensor * Add color led signal to Carbon Dioxide (CO2) sensors using defines CO2_LOW and CO2_HIGH in user_config.h * Add support for Domoticz Air Quality sensor to be used by MH-Z19(B) and SenseAir sensors * Add support for PZEM004T energy sensor * Add support for iTead SI7021 temperature and humidity sensor by consolidating DHT22 into AM2301 and using former DHT22 as SI7021 (arendst#735) * Add support for BME680 using adafruit libraries (arendst#1212) * Add support for MH-Z19(B) CO2 sensor (arendst#561, arendst#1248) * Add multipress support and more user configurable GPIO to Sonoff Dual R2 (arendst#1291) * Add support for TSL2561 using adafruit library (arendst#661, arendst#1311) * Add support for SHT3x (arendst#1314) * Add support for Arilux LC06 (arendst#1414) * Add Italian language file (arendst#1449) * Add 2nd Gen Alexa support to Wemo emulation discovery (arendst#1357, arendst#1450) * Add define for additional number of WS2812 schemes (arendst#1463)
Why changing the register config only for when BME280_CHIPID == bmp_type? |
Hi, I have still problem with my BME280.
I have 2 deg C different between DS and BME. Does anyone still have a similar problem? |
Yes still same problem, also around 2 degrees difference. |
I only had a bme280, but Theo generalized the code when he added it. Unless the sensors are in a temperature controlled medium that is very uniform, they will read different values. It is easy for a difference of a few inches to make the difference you are seeing. Remember the old saying, a person with one clock always knows what time it is. A person with two is never really sure. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem. |
* Fix BME280 calculation (arendst#1051)
5.10.0a * Add (experimental) support for sensor SHT3x * Add support for sensor MH-Z19(B) using serial interface to be enabled with define USE_MHZ19 in user_config.h (arendst#561, arendst#1248) * Add (experimental) support for sensor MH-Z19(B) using SoftwareSerial to be enabled with define USE_MHZ19 in user_config.h (arendst#561, arendst#1248) * Add support for iTead SI7021 temperature and humidity sensor by consolidating DHT22 into AM2301 and using former DHT22 as SI7021 (arendst#735) * Fix BME280 calculation (arendst#1051) * Add support for BME680 using adafruit libraries (arendst#1212) * Change ADS1115 default voltage range from +/-2V to +/-6V (arendst#1289) * Add multipress support and more user configurable options to Sonoff Dual R2 (arendst#1291) * Fix Sonoff Bridge missed learned key if learned data contains 0x55 (End of Transmission) flag (arendst#1095, arendst#1294) * Add support for TSL2561 using adafruit library (arendst#661, arendst#1311) * Add alternative support for SHT3x (arendst#1314)
5.10.0a * Add (experimental) support for sensor SHT3x * Add support for sensor MH-Z19(B) using serial interface to be enabled with define USE_MHZ19_HARD_SERIAL in user_config.h (arendst#561, arendst#1248) * Add (experimental) support for sensor MH-Z19(B) using SoftwareSerial to be enabled with define USE_MHZ19_SOFT_SERIAL_OBSOLETE in user_config.h (arendst#561, arendst#1248) * Add (experimental) support for sensor MH-Z19(B) using stripped SoftwareSerial to be enabled with define USE_MHZ19_SOFT_SERIAL in user_config.h (arendst#561, arendst#1248) * Add support for iTead SI7021 temperature and humidity sensor by consolidating DHT22 into AM2301 and using former DHT22 as SI7021 (arendst#735) * Fix BME280 calculation (arendst#1051) * Add support for BME680 using adafruit libraries (arendst#1212) * Change ADS1115 default voltage range from +/-2V to +/-6V (arendst#1289) * Add multipress support and more user configurable options to Sonoff Dual R2 (arendst#1291) * Fix Sonoff Bridge missed learned key if learned data contains 0x55 (End of Transmission) flag (arendst#1095, arendst#1294) * Add support for TSL2561 using adafruit library (arendst#661, arendst#1311) * Add alternative support for SHT3x (arendst#1314)
What can be done to correct the temperature readings from bme/bmp sensor.I have 6 degree offset versus DS18B20. Seems that arendst give the solution here :curzon01@ca1e5f8 ...but how can the code be uploaded to sonoff? Some copy-paste in the console via web page? Or serial? Please some advice or tutorial... |
This fix is in the Tasmota firmware since long ago. Your sensor may be inaccurate. You will have to account for the discrepancy and adjust your use of the reading accordingly. |
Thanks for the answer.I believe forced mode is mandatory for using bme/bmp sensor as weather station.,reading temperature once/minute.... from some bosch recomendations: Sensor mode: forced mode, 1 sample / minute To measure new values in the forced mode a write to the |
Sampling rate for each kind of sensor is hard coded in the sensor's driver and is set according to "optimal" sampling rate for the sensor based on testing. YOu would have to edit the driver and compile the firmware with your modifications. |
A year ago, I ran into this problem. I read the data sheet and discovered that the sensor was configured in a way that ensured self-healing. I reconfigured the settings to eliminate it, by reducing the sample rate to 1/second. This eliminated the self heating for many. Theo took the change I made and generalized it so everyone could benefit from it. The Bosch recommendation for weather monitoring is not to help with self heating, but to help with power consumption (of course, the two are related). While it is possible that you need to reduce the sample rate even more, it is more likely there is something else wrong. As the old saying goes, "a man with one clock always knows what time it is, a man with two is never really sure." It is possible one or both of your sensors are calibrated incorrectly and/or broken. I know many people have gotten defective DS18B20 sensors. I also know that both of these sensors are very sensitive and that there can be temperature gradients. To eliminate the gradients, put the sensors almost touching and then use a small fan to blow air on them (small computer fans are great for this). This should eliminate and temperature gradients. It would also reduce self heating, so also try it without the fan. If you have a thermal imager use that 6 degrees is really easy to see with one of them. That would tell you is the temperature really is higher/lower or if the sensor(s) are more likely just out of calibration. |
I have many BME280/BMP280 and did some testing with 1/s and 1/min. All of them tend to show the same temperature, but 1-2° higher compared to other sensors I have though. |
Thanks for the answers.The correct temperature is that of DS18B20 sensor. Maybe the BMP280 is defective,I don't have one more bmp to test it.Anyway, 6 degree misreading is outrageous.Would be useful a script /command to adjust sampling rate of the sensor or some parameter to adjust via console,according to the application the sensor is used. |
You aren't going to see a 6 degree rise from self heating. Clearly your sensor is defective. While it might be useful for some scenarios to have more control, that means more things for the average user to get wrong. If you feel strongly enough about the need for control, you can fork the code and make the change. I don't think there is anyone else that feels the need for this, so it probably won't happen soon, or ever, otherwise. |
@bontas69 I recently had this dialog with Theo. As each sensor requires tuning and calibration, providing a command to handle this "generically" will likely lead to more issues for users who have not researched it properly. Fixes are incorporated into the driver as issues are uncovered. But changing the settings via a runtime setting is, at this time, not going to be added. However, that does not disallow anyone from customizing the driver code for the sensor in question and compiling one's own version to suit their requirements... having done the necessary research to understand the sensor properly. |
Thank you for your support.Definitely I will not write a code for calibrating bme sensors because is way above my area of expertise. I"m just an engineer,electronics,with some interest in automation,all I can do is to copy-paste a command in terminal,I will not write any code or made custom firmware.The bme wrong temperature issue is all over internet, especially on alternative firmware esp8266.Here is described the overheating, oversampling, high update_interval and the wrong power mode: esphome/issues#402. |
I ran into the issue where the BME280 sensors read about 5.5 deg C higher than the ambient temperature and found this issue and several other issue reports across projects. I first worked around it in code with adding a temperature offset, but then I noticed that in sleep mode it reads the correct temperature and in forced mode it reads the correct humidity and pressure. I am using the basic BME280 python library and then also have working the pimironi version of BME280 -- its in this library that I modified the usage of the chip to do the following:
So far this has been the most accurate readings I've been able to get that match my ThermPro gauges. It clearly isn't heating up 5+ degrees Celsius within the first seconds of being on because this logic keeps the sensor active and reading it every 10 seconds and getting the same results, but it does seem that having the sensor in forced mode causes it to read a much higher temperature, which is odd since forced mode will "perform one measurement, store results and return to sleep mode"
|
I know that is an old topic... but I hope I can be useful to anyone who has the same problem of sensor overheating... I recently created a humidity detection node using an ESP8266 and a BME280 and I ran into a problem of high temperature read by the sensor. my readings were 6-8 degrees higher than actual. I read many forums that talked about self-heating problems and I resigned myself to using another sensor for temperature readings and using the BME280 only for humidity. almost by chance I noticed that sometimes for a few seconds the readings of its sensors aligned and upon investigation I discovered that this happened when the wifi signal was lost. i modify firmware in order to turn on/off wifi according with a input pin and i connect my laptop with esp8266 throw serial pin in order to read logs. I discovered that with wifi off the readings are close up to 0.1°C, with wifi on the error was 7°C. the problem was the sensor being too close to the esp8266 antenna... I lengthened the wires to keep the sensor at least 15 cm away from the antenna and I no longer had problems with high temperature readings even with reading time of 10s... with much faster readings (1 s) there is still an overtemperature, but limited to around 1.5 °C |
Interesting, is there a way to program esp8266 to turn off the wifi for measurements? I have my bme280 inside a wifiplug so no way to keep it 15cm away from the wifi antenna. |
I recently hooked up a bme280 to my wion wifi plug, but the temperature it is returning is about 10 degrees F too high. The humidity and pressure numbers seem to be correct. Is there a way to adjust the calibration to fix this?
The text was updated successfully, but these errors were encountered: