Calibrating sensors
Antwort
02.05.15 14:14
Hello,
while comparing the XDK sensor values with other instruments I found major differences:

MySensors vs. XDK
humidity 44% vs. 28%
Temperature 22.8°C vs. 29.8°C
pressure 1003 hPa vs. 981 hPa

Looks like the XDK needs a calbration. But how do I do this?

Stefan
0 (0 Stimmen)
Calibrating sensors
Antwort
05.05.15 22:07 als Antwort auf Stefan Ferber.
Hello Stefan,

all three readings are taken from the same sensor on the XDK, the Bosch Sensortec BME280. As any electronic component, the sensor is subject to self heating, which can be from the sensor itself, as well as from other components used at the time of measurement. Unfortunately, this self heating strongly depends on the usage, and as the XDK can be freely programmed, the self heating depends on so many factors that we cannot provide a simple answer to that.
The sensor can be influenced to some extend by the sampling rate and by how fast a reading is taken after switching it on (see sensor datasheet for details http://ae-bst.resource.bosch.com/media/products/dokumente/bme280/BST-BME280_DS001-09.pdf ). As for a user defined program: I suggest monitoring the outside temperature with a reference thermometer and once a stable offset value is observed, use this to compensate the measurements. As an indication, we observed a self heating of 3-4K under a normal load profile using sensors and Bluetooth.

The inaccuracy of the humidity is strongly related the temperature, as relative humidity is calculated using the temperature reading. Hence, a higher temperature leads to a lower relative humidity. Once the temperature compensation is done, the relative humidity can be calculated using the temperature gap.
See also:
http://go.vaisala.com/humiditycalculator/vaisala_humidity_calculator.html
http://www.vaisala.com/Vaisala%20Documents/Application%20notes/Humidity_Conversion_Formulas_B210973EN-F.pdf

As for the pressure: The values you observed are relatively close, so without knowing the error of your reference, it's hard to say if this is a real error, or within the standard deviations of the sensor/ reference instrument.

Best regards
Mathias
 
0 (0 Stimmen)
Calibrating sensors
Antwort
08.05.15 12:47 als Antwort auf Mathias Bruendel.
Dear Mathias,

thx for your detailed answer.

Which deviations do you expect for the pressure sensor?

Stefan
0 (0 Stimmen)
Calibrating sensors
Antwort
11.05.15 08:15 als Antwort auf Stefan Ferber.
Dear Stefan,
we specified the pressure sensor wit an absolute accuracy of +-10hPa at room temperature. Given your reference device has a similar accuracy, the deviation sounds plausible.

(I case you are wondering why the specification of the sensor itself has a typical accuracy of only +- 1.5hPa: Due to assembly process and mechanical stress of the board,  the sensor accuracy needs to be about one order of magnitude higher than the accuracy of the target application.)

Best regards,
Mathias
0 (0 Stimmen)
RE: Calibrating sensors
Antwort
14.02.18 15:52 als Antwort auf Mathias Bruendel.

Dear Mathias

could you please give me more details about the following phrase you wrote: "the relative humidity can be calculated using the temperature gap" ?

I also need to apply a manual temperature calibration on my device (I'm experiencing a 6°C gap with wi-fi + mqtt + all sensors enabked with a 3secs delay on reads), but it is not clear for me how to tune the relative humidity according to the re-calibrated temperature.

Thank you in advance

 

Davide

0 (0 Stimmen)
RE: Calibrating sensors
Antwort
15.02.18 17:25 als Antwort auf Davide Pozza.
Hello Davide,

First of all, let me welcome you to the XDK-Community.

Since the humidity is strongly related to the ambient temperature, a change in the ambient temperature will have a significant effect on the humidity measurement.

That means that a compensation of the measured temperature and humidity would be required.

This would require an own implementation of the appropriate compensation algorithm and that is what Mathias' answer two years ago implied.

But, this was two years ago. Now, the simple solution for that would be to use the compensation functions of the interface BCDS_Enviromental.h , for example the Environmental_readCompensatedData() function.

This function reads and compensates temperature and relative humidity values. For appropriate usage of this function, you need to set an temperature offset with the function Environmental_setTemperatureOffset() . This function registers a temperature offset that will be used by the temperature compensation API.

You could use the 6°C gap you experienced for this offset. Please note that this offset is in milli-Degree, that means that the value 6000 represents an offset of 6°C and it needs to be negatively applied (i.e. -6000) to have the proper effect.

Please note that this is only one of many solutions for compensating the temperature and humidity measurements. You could, of course, still implement a more complex solution, if necessary.

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)