Temperature / Humidity sensors BMP280 & HTU21D

I am using the 2 sensors above for a environment weather station. Software control via the corresponding Spark Fun libraries. Both sensors have a builtin temperature sensor.

Although both sensors should be calibrated, the temperature reading of the sensors (appr. 2cm distance, normal room airflow) deviates by around 1,2°C. The actual room temperature is somwhere in the middle between the 2 sensor readings.

Did anyone encounter and investigate a similar problem?

As the HTU21D sensor will be replaced by the humidity sensor of a BME280 in the future, i will have to rely on the temperature reading of the BME280 … however … if this reading is not correct, it seems useless to me.

Temperatures of chips soldered to PCBs tend to be influenced by the temperature of other components on that board. I'm quite sure you didn't use the chips directly but by some breakout board but you forgot to provide the links to them. If the board follow the instructions given in the datasheets of the corresponding chips the temperature readings usually is quite exact but remember that the accuracy of the sensors is +/-0.5°C (BMP280) and +/-0.4°C at 25°C so even with perfectly designed boards and not heating by other components a difference in the reading of about 1°C is to be accepted.

pylon:
Temperatures of chips soldered to PCBs tend to be influenced by the temperature of other components on that board. I'm quite sure you didn't use the chips directly but by some breakout board but you forgot to provide the links to them. If the board follow the instructions given in the datasheets of the corresponding chips the temperature readings usually is quite exact but remember that the accuracy of the sensors is +/-0.5°C (BMP280) and +/-0.4°C at 25°C so even with perfectly designed boards and not heating by other components a difference in the reading of about 1°C is to be accepted.

Thank you for your answer. You are right, the chips are on breakout boards.

According to your tips i exchanged the physical position of the HTU and the BMP, what gives me a temperture difference of around 0,5°C. So there seems to be an effective influence by the sensor position.

What makes me suspicious about how accurate some combinations (e.g. Wemos ESP8266 and DHT-Sensors) might work. What's also my problem, to bring the sensors together with the ESP8266 controller in one housing. Especially with the relatively high thermal dissiaption of the ESP.

What accuracy do you expect?

I would try to use a separate housing for the sensors as the thermal dissipation of the ESP8266 will tamper you readings otherwise.

pylon:
What accuracy do you expect?

I would try to use a separate housing for the sensors as the thermal dissipation of the ESP8266 will tamper you readings otherwise.

As we are talking about "factory calibrated" sensors, i would at least expect a maximum deviation between different sensors should be around below 1% (giving +/- 0,25°C at room temperature).

Separate housings are not very handy and give electrical issues (3,3V, I2C). Especially as the Sparkfun library already shuts down the speed to 100kbps for the HTU21. The communication has already intermittent problems ... even though the 160MHz ESP does nothing than maybe receive and buffer a HTTP GET in the meantime.

KingOfLions:
As we are talking about "factory calibrated" sensors, i would at least expect a maximum deviation between different sensors should be around below 1% (giving +/- 0,25°C at room temperature).

Temperature doesn't work like that.

1% of 25°C = 0.25°
1% of 0°C = 0! So that breaks down already.
But 1% of 298K (the absolute temperature) = 2.98K so you could expect a deviation of 2.98°C at a 1% based on that measure.

That's why temperature sensors only give an absolute number for the error, never a percentage.

By the way, what do you use to determine this:

KingOfLions:
The actual room temperature is somwhere in the middle between the 2 sensor readings.

As we are talking about "factory calibrated" sensors, i would at least expect a maximum deviation between different sensors should be around below 1% (giving +/- 0,25°C at room temperature).

You might need to read the datasheet of the sensor before you buy it. Almost any temperature sensor with digital read out provides the error range you get. And if the error range is +/- 0.5°C a deviation of 1°C between the readings of two sensors is still within the acceptable range (although at maximum). If that's to much for you you have to invest more a get higher quality sensors (we talk about sensors below $4!).

wvmarle:
That's why temperature sensors only give an absolute number for the error, never a percentage.

Thats why I said ... at room temperature ;-).

wvmarle:
By the way, what do you use to determine this:

An alcohol thermometer ;-). Accurate and reliable.

pylon:
You might need to read the datasheet of the sensor before you buy it. Almost any temperature sensor with digital read out provides the error range you get. And if the error range is +/- 0.5°C a deviation of 1°C between the readings of two sensors is still within the acceptable range (although at maximum). If that's to much for you you have to invest more a get higher quality sensors (we talk about sensors below $4!).

That's clear an not the question. Of course, 2 different sensors may worst case deviate around 1°C. What might in reality give a deviation of around 0,5-0,6°C between 2 different sensors. That ist acceptable.

What however does not clarify a difference of 1,2°, currently again around 1,3° (changed sensor position). So ist seems that the problem ist not really the sensor, but the mounting/airflow of the sensors. Neither the position dependence nor the tolerance of the sensors ist acceptable.

Current configuration:
ESP => BMP horizontal distance 4cm, no direct airflow from the ISP to the sensor.
BMP => HTU additional distance 4cm
Current reading: BMP 26,1°C, HTU 24,9.

If I move the HTU between the ESP and the BMP, the deviation gets SMALLER (around 0,6°C). What shows that the ESP ist not the thermal source.

Seems that there is no soulution than to try out with a finally soldered board.

KingOfLions:
An alcohol thermometer ;-). Accurate and reliable.

How can you be so sure that this is the most accurate of the three you have? Has it been carefully calibrated somehow recently?

KingOfLions:
Current reading: BMP 26,1°C, HTU 24,9.

If I move the HTU between the ESP and the BMP, the deviation gets SMALLER (around 0,6°C). What shows that the ESP ist not the thermal source.

So the HTU sensor goes up in temperature? Or the BMP goes down in temperature? Or both?
All scenarios are consistent with the ESP chip being an interfering heat source.

Still got no links to the breakout boards or at least pictures of them. The PCB design has influence on the accuracy!

Have you tried moving the ESP 20cm away? With a heat source like the ESP that near I would expect readings that differ more than 2 degrees Celsius. How do you feed the ESP? Do you have an additional heat source there?

pylon:
Still got no links to the breakout boards or at least pictures of them. The PCB design has influence on the accuracy!

Have you tried moving the ESP 20cm away? With a heat source like the ESP that near I would expect readings that differ more than 2 degrees Celsius. How do you feed the ESP? Do you have an additional heat source there?

I currently changed to the BME280 sensor, which has both functions in one package, to avoid the two sensors.

The layout is very simple, either a Wemos ESP8266 board or a NodeMCU board. Sensor is appr. 5cm away from the ESP. In horizontal configuration, thermal circulation always goes from the sensor to the ESP, not in opposite direction.
In vertical operation of the configuration (currently only with Wemos-Board), the ESP is on the opposite board side of the sensor. Ventillation is always upwards between ESP and sensor to build a fresh air stream between sensor and ESP-board.

However, a longer cable ist not useful, as finally both devices shound be in one housing (as all other digital thermometers ...).

By the way ... a htu21 sensor, back to back with appr. 5-6mm distance on a Wemos-board works very accfurate.