Inhaltsverzeichnis
< All topics
Drucken

Sensor Calibration

For the prototypes we produced, all sensors used in the preliminary usability study (except the VOC sensor) were calibrated using a reference device (Ahlborn ALMEMO® system).

The model and technical specifications of the reference device we used are listed in Table 1. The average performance of the calibrated Ressourcenwächter is listed in Table 2. The specific calibration method is described below.

SensorMeasured variableAccuracy
Digital sensor for humidity, temperature, air pressure
FHAD46C41A
Air Temperature [°C]typ. ± 0.2 K | max. ± 0.4 K
(5…60 °C)
Relative Humidity [%]± 3.0 % RH
(10…90 % RH)
Air Pressure [hPa]± 2.5 mbar at 23 °C ± 5 K
(700…1100 mbar)
Globe thermometer
FPA805GTS
Radiation temperature (wet-bulb-globe temperature) [°C]± (0.3 + 0.005 · |t|) K
(−40…200 °C)
Lux sensor
FLA613-VL
Illuminance [lx]± 5 %
(0…260001 lx)
Digital carbon dioxide sensor
FYAD00CO2M3B05
CO2 concentration [ppm]± (50 ppm + 3 %)
(0…5000 ppm)
Sound level meter
MA86193 (TES-1350A)
Sound level [dB(A)]± 2.0 dB at 1000 Hz 94 dB
(35…130 dB & 31.5…8k Hz)
Thermoanemometer
omnidirectional
FVAD05TOK300
Wind speed [m/s]± (3 % of measured value + 1 % of end value + 2 digits)
(0.050…1.000 m/s)
Table 1: Technical specifications of the reference device (Ahlborn ALMEMO® system).
SensorMeasured variableAccuracy
(according to the manufacturer)
Accuracy2
(cf. reference device)
Bosch BME280Air Temperature [°C]± 1.0 K
(0…65 °C)
± 0,25 K
(19…25 °C)
Relative Humidity [%]± 3.0 % RH
(20…80 % RH)
± 0.6 % RH
(39…60 % RH)
Air Pressure [hPa]± 1.0 hPa
(300…1100 hPa & 0…65 °C)
N/A (no reference device)
Dallas DS18B203Radiation temperature (wet-bulb-globe temperature) [°C]± 0.5 K
(−10…85 °C)
N/A (not used in field study)
Vishay VEML7700Illuminance [lx]± 10 %
(0…140k lx)
± 14 lx
(0…1220 lx)
Sensirion SGP40VOC index4± 5 %
(0…1000 ppm5)
N/A (calibration not possible)
Sensirion SCD30CO2 concentration [ppm]± (30 ppm + 3 %)
(400…10000 ppm)
± 72 ppm
(449…1753 ppm)
DFRobot SEN0232Sound level [dB(A)]± 1.5 dB
(30…130 dB(A) & 31.5…8.5k Hz)
± 4.2 dB(A)
(26…73 dB(A))
Modern Device Wind Sensor Rev. CWind speed [m/s]N/A
(0…26.8 m/s)
N/A
Reed switch (window sensor)Binary state of the window
YHDC SCT-013Power [W]± 3 %
(non-linearity)
N/A (not used in field study)
Table 2: The sensors supported by the Ressourcenwächter and their performance.
  1. Two measuring channels: sensitive channel for interior lighting 0 – 26,000 lx, insensitive channel for ambient light 0 – 260,000 lx. ↩︎
  2. MAE: Mean Absolute Error. ↩︎
  3. In a black bulb (globe thermometer). ↩︎
  4. Index between 0 and 500. The index is based on relative ratings from the past 24 hours, see About the basis of IEQ. ↩︎
  5. Ethanol in pure air. ↩︎

Calibration method

Depending on the characteristics of the sensor, we use different calibration methods for different sensors.

Due to the good linearity of the sensor itself, only a simple offset calibration was performed for the following sensors:

  1. Bosch BME280 (air temperature & humidity)
  2. DFRobot SEN0232

The following sensors were calibrated using linear regression:

  1. Vishay VEML7700

The following sensors were not calibrated:

  1. Air pressure of Bosch BME280
    • Due to the lack of a reference device
  2. Dallas DS18B20
    • Because it was not used in the field study.
  3. Sensirion SGP40
    • Because the VOC index is not an absolute value.
  4. Sensirion SCD30
    • Because the sensor itself has a good factory calibration, and an automatic self-calibration (ASC) mode (optional) can also be activated.
  5. Modern Device Wind Sensor Rev. C
    • Because it was not used in the field study.
  6. YHDC SCT-013
    • Because it was not used in the field study.

Offset calibration

You can find a good tutorial on how to perform offset calibration from Adafruit: So, How Do We Calibrate?

Note: We use the average of multiple measurements to calculate the offset rather than a single point.

Once you have the offset, you can modify the variable in the ESP32 firmware – variables.h, as shown in the figure below:

Linear regression

For linear regression, here are some tutorials on how to do it in different software:

Using MS-Excel: Using Excel for a Linear Regression

Using Python: Linear Least-Squares Regression for two sets of measurements using SciPy

You can choose whichever method you are familiar with to do the linear regression calculation (even using a calculator by hand). After getting the regression equation (y = ax + b, a is slope and b is intercept), you can modify the variable in the ESP32 firmware – variables.h, as shown in the figure below: