Humidity Sensor Calibration
I've got 3 sensors that can measure relative humidity of the air: BME280, SHT21, DHT22. They stated ability of measuring with accuracy +/-3% from range 20 to 80%
However, when testing in same condition for 3 sensor, i got 3 different results. Maybe one of them has reading correctly, or none of them is correct. So i decide to test it with some equipement.
I hope my experiment can help some one to make this kind of sensor to be correct.
Part List and Video Instruction
To prepare for experiment, we will need:
1. BME280 https://amzn.to/2VNU6GA
2. DHT22 https://amzn.to/2OuQCWq
3. SHT21 https://amzn.to/2VKj6hE
4. Arduino UNO https://amzn.to/2VKj6hE
5. NodeMCU https://amzn.to/2VKj6hE
6. Humid meter https://amzn.to/2VKj6hE
7. Thermometer probe https://amzn.to/2VKj6hE
8. Salt (Sodium Chloride NaCl)
9. Humid absorber
10. Box
First Point of Checking
Fortunately, we can use salt (in your kitchen!) to make standard humidity environment for testing. As salt (so called "Sodium Chloride" NaCl) characteristic, it's saturation condition can make perfect humid at 75%.
We take some salt in small bowl, then add just a little water. Put it in the box with Humid meter, then put 3 sensors inside. Cable is out from hole, then connected to Arduino for reading result
Make circuit like picture
The code is here https://bit.ly/2KMoryB
As result from monitor screen, 3 sensors give 3 results of humid, temperature seems are same together with 28 degree C
Offset for Sensor
First try, i give 3 sensors with offset value to make humid reading of each sensor to be same with External Humid Meter at 75%, and also offset for temperature reading to make temperature reading to be same with External Thermocouple.
After download the code, its reading now are same with Humid Meter at 75%; and temperature is same with External Thermocouplet at 31 dgC
Test at Second Point
To make sure our offset is correctly, we should check those sensors at second point with Humid absorber.
Keep it again in box, Humid Meter now reading is 40%, but 3 sensors (again) give us 3 result differently!
(Temperature seems OK after offset)
So, they must to be calibrated!
Calibration
To make calibration, we simply delete offset, then record value of sensor at standard humid 40%
We make a table of standard humid vs sensor's reading. Then, we use "map function" to make calibration curve for each sensor.
After all, download the code, 3 sensors give same result at 40% now!
Test Once More Again!
To make sure 3 sensors have calibration correctly, we should test it again with saturated NaCl. Fortunately, reading of 3 sensors have reading around 75%.
Then, i try to remove sensors out of box, then put them again inbox with humid absorber to see reading of 3 sensors: result seems OK -> response of 3 sensors are same together! No more different reading as before
Measuring Your Room Humid and Temperature
Now we can use one of those sensors to reading humid and temperature of our room.
We can use ESP8266 and software Blynk to reading it via internet. I really love trace data from Blynk which we can trace it over year!