How to Check and Calibrate a Humidity Sensor

Published by Engr Tech in the blog Engr Tech's blog. Views: 136

Humidity sensors have become quite common and more often than not, we just check the datasheet and proceed on to use them with interfaces. We accept the values they project for as long as they seem reasonable to us. What if the values are wrong? How can we confirm that the values they project are right? How can we calibrate the sensors if the values are wrong? Well, the answers lie right ahead.

How to check humidity sensors
To ascertain the accuracy of humidity sensors, their values are compared to a reference standard. Saturated salt solutions are used to produce the standards. There are some salts which when dissolved in aqueous solution, create an atmosphere of known humidity. These salts are therefore used to produce microenvironments that have known Relative Humidity (RH) percentages. Humidity sensors are then read inside these micro-environments. You could use a solution in a sealed jar to isolate the microenvironment from the atmosphere and then immerse the sensor in the sealed jar. The sensor is then read repeatedly and the values recorded.

This procedure is repeated with different salts with each salt creating a different relative humidity. This makes it possible for one to develop a profile for the humidity sensor under test. Since the RH of the micro-environments is known, the sensors are assessed for deviations in order to determine their accuracy.

Salts used to create microenvironments
The more the RH atmospheres one can create for reference standards, the better the characterization of the humidity sensor being tested. When picking the salt to be used, also consider availability, cost, and safety. Before you pick any salt, it is important you read through its safety data sheet. Also, avoid using salts with additives. Listed below are some salts that can be used in creating micro-environments


% RH at 25°C

Potassium sulphate


Potassium nitrate


Potassium chloride


Ammonium sulphate


Sodium chloride


Sodium nitrite


Ammonium nitrate


Sodium dichromate


Magnesium nitrate


Potassium carbonate


Magnesium chloride


Potassium acetate


Lithium chloride


Potassium hydroxide


Creating a microenvironment
Just like most calibration procedures, there are procedures for creating stable RH from an aqueous solution, the ASTM E104-02 (20212). Follow the specifications as closely as you can. You will need the following equipment;

· Salt

· Zip-lock bag

· Distilled water

· Plastic

· A small jar with a tight seal

For each salt, you pick, create a consistent mixture similar to very wet sand. Mix four or five tablespoons of chemical with one tablespoon of distilled water. Position the sensor approximately 0.5-1.0 inches above the mixture. Ensure that the sensor does not come in direct contact with the solution. Hold the connection in place using while ensuring that the jar is sealed, you can use contact putty to achieve this. Put the set up inside a zip-lock bag and start taking readings. Before taking the last reading, allow enough time for equilibration before taking the final reading, 120 minutes is fair enough.

Required hardware and software
You will require a microcontroller to interface with your sensor. You can use the Quark D200, ATmega 328 or any other microcontroller at your disposal. You will also need to get the sensors you intend to test. If you do not already have some, you can purchase some from your local electronics store or online platforms like enrgtech.

Sensor software
Most of the programs used to gather sensor data are written in C. Most of them are available online and can be easily downloaded. They are also very easy to use. The programs are set to read the sensor every minute and send information to a serial monitor.

Humidity Sensor evaluation
After you have obtained the Rh values from the humidity sensors, you can evaluate them numerically. You need to calculate the root mean square to establish the accuracy of the sensor.

O- Observed sensor value

I-Ideal sensor value

In order to calculate RMSE, you need to square each error and then calculate the arithmetic average of the obtained values and then finally take the square root of the average. The established RMSE value will determine whether or not the to calibrate the sensor. If the RMSE is small, you can decide not to calibrate the sensor, however, if it is large, you will need to calibrate your sensor.

Sensor calibration
In order to calibrate humidity sensors, you first need to determine the function that relates the ideal values to the obtained values. You can use linear regression values to determine the function. Once you have successfully done that, you then modify the sensor values using the polynomial or rather a function so as to calculate the calibrated values. The modifications are implemented in software
  • onap thanh
  • Engr Tech
You need to be logged in to comment