Recently, I've been playing with various sensors. I've been interested in measuring air temperature, humidity and pressure. (Didn't get a CO2 and dust sensor yet.)


I thought I could post just a simple idea how to test a range of a humidity sensor. For measuring humidity, I tried SHT21, SHT31 and HTS221 sensors.


The pictures below contain a reference design with SHT21.


  • Very low relative humidity

What is needed: a small plastic bag with working sealing, silica gel (often supplied with shoes).




(It is possible to get even smaller relative humidity, but I didn't want to wait longer than a few minutes.) I also tried to let the bag opened and the silica gel has almost no effect. This means packaging anything with silica gel inside is useful only if the whole package is airtight.


  • Very high relative humidity

What is needed: a bathroom (the smaller and less ventilated, the better results) and someone having a shower / a bath.




(I didn't want to let the water condensate on the sensor, so I stopped at this value.)


SHT21 and SHT31 typically output +/- 2 % RH difference when placed next to each other, they can get as close as +/- 0,5 % RH in home environment after a while (nothing is moving around and there is almost none air movement), From an engineering point of view, humidity accuracy is typically +/-2 % RH for this sensor, which means the 2 decimal digits are only for reference. (Typical temperature accuracy is +/- 0,3 centigrade, so the same applies here.) However, seeing the data interpreted to the LSB gives a nice overview about the stability of output values and the noise present.




Note 2: I also tried 2 pieces of HTS221 sensor and was surprised by the results. One gave the output of 72 % RH , while SHT21/31 showed 59 % (which is about 22 % error). At higher humidity, the difference was even bigger: HTS221 gave output of 117 % RH, while SHT21/31 showed 91 % (which is about 28 % error). The other sensor gave output of 66 % RH while SHT21/31 showed 60 % (which is about 10 % error). Both sensors should have been calibrated and places on ST's reference designs, so I asked a question on ST community hoping to get an explanation of this difference by an ST engineer. I will post some update if I get any response. (I don't want to start a duplicate discussion here.)