Now that we can get sensor readings, I wanted to calibrate them so all of them will be aligned with each other.
For our application, we need a base measurement that we know is accurate - DS18B20 + the snow in my garden to the rescue!
We know that the temperature of snow with a bit of water to fill in the air inside will be 0 degrees Celsius, and we know that the DS18B20 probe is waterproof;
You see where I’m getting here?
We have a base measurement!
Now in our code, in the DS18B20 section we should add the calibration offset that we measured, i.e:
Next part includes calibrating both temperature and humidity readings for all the other sensors.
For that we will need:
The reason for the salt is that in a sealed container of moist salts, the air above the salts will reach a known relative humidity.
The relative humidity above the salt does depend slightly on the temperature - so the temperature readings will help us here as well.
See the below table for the known relative humidity at different temperatures.
Salt | 15°C | 20°C | 25°C | 30°C | 35°C |
---|---|---|---|---|---|
Sodium Chloride | 75.61 | 75.47 | 75.29 | 75.09 | 74.87 |
And for the fun part:
Lets calibrate the temperatures first - our sensors are now in a controlled sealed environment, so they should all show the same readings +- minor errors.
Our DS18B20 is already calibrated, so we should align all the other sensors to it, for example - if the DS18B20 shows 23.3 degrees, and the BMP280 shows 23.8, we know that it’s off by -0.5 degrees.
Do it for all the sensors until they are all show the same temperature (+-)
Now that we have the temperature, according to the table above we should also know the humidity, for example - if we have 20 degrees inside the box, the humidity needs to be around 75.47% - take that measurement and calibrate your humidity readings according to it.
Write down your calibrations, as we will use it in the future in our sensor configurations.
Kudos!
We are ready for the next step - moving to the Arduino.
See you on the next post;
~Tal