-->
Page 1 of 4

Arduino IDE DHT11 versus DHT22 for RH

PostPosted: Tue Nov 17, 2015 11:38 am
by picstart
We are at 3.3v for both types of sensors the DHT11 has a pcb with a builtin 10kpullup and the DHT22 has an external 10K pullup.
Interval is 2 seconds.
The DHT11 in the same location as the DHT22 shows a relative humidity reading of 20% less than the DHT22.
DHT11 34% DHT22 56%. I tried several DHt11's and two DHT22's and they were consistent with each other but between types it was always about 20% less RH for the DHT11.
I am using the Adafruit DHT library with the sqrt call commented out ( it generates errors if left in). I get the same values for the DHT11 when I use my own DHT11 driver so I don't think it is a commercial vendor issue. I suspect this is a DHT11 versus DHT22 issue even though both specs say the RH is within (+or - ) 5%.
Has anyone had a similar experience?

Re: Arduino IDE DHT11 versus DHT22 for RH

PostPosted: Tue Nov 17, 2015 6:40 pm
by DrG
picstart wrote:We are at 3.3v for both types of sensors the DHT11 has a pcb with a builtin 10kpullup and the DHT22 has an external 10K pullup.
Interval is 2 seconds.
The DHT11 in the same location as the DHT22 shows a relative humidity reading of 20% less than the DHT22.
DHT11 34% DHT22 56%. I tried several DHt11's and two DHT22's and they were consistent with each other but between types it was always about 20% less RH for the DHT11.
I am using the Adafruit DHT library with the sqrt call commented out ( it generates errors if left in). I get the same values for the DHT11 when I use my own DHT11 driver so I don't think it is a commercial vendor issue. I suspect this is a DHT11 versus DHT22 issue even though both specs say the RH is within (+or - ) 5%.
Has anyone had a similar experience?



I have some experience with the 11 and 22 (https://communities.intel.com/message/245385#245385) and interfaced them to a cheap PIC chip making them accessible through a serial port. I have also used an HIH-5030 (https://communities.intel.com/message/249237#249237) and an HTU21D. This by no means makes me a humidity sensor expert, but in my experience the 11 performed lower than the others (admittedly an unscientific and very small sample). As I recall, the 22 is an enhanced model of the 11. The basic software to read them is similar and the 22 sends a fractional part of the value (again as I recall since it has been a while). If you are accurately calculating the checksum and it is good, you are probably not reading them incorrectly. That is, the sensors are probably working, although you could be messing up the conversion.

But, you can get a definitive answer to address the differences by using salts that, when in a slurry, will put out a known RH at a given temperature. Ideally, you should use several different solutions to cover a range of RH values, but the most common is sodium chloride (some of the other salts can be toxic so you do need to know the chemicals you are working with). Also, even though you enclose the atmosphere using a plastic bag or something , the atmosphere of interest is only at the value for a couple of inches immediately above the slurry. I did this once and was pleasantly surprised that 4 of the 5 sensors that I tested were very close to the standard.

If you search for "humidity sensor calibration salt" you will see lots of examples and tutorials.

Hope this helps,

DrG

Re: Arduino IDE DHT11 versus DHT22 for RH

PostPosted: Wed Nov 18, 2015 2:34 am
by schufti
also beware of the fact that some humidity sensors require a minimum air movement.
They (marginaly) heat up their surroundings leading to false results in stale air.

Re: Arduino IDE DHT11 versus DHT22 for RH

PostPosted: Sat Nov 21, 2015 8:55 pm
by willfly
The Adafruit library worked very well for me. If checksum is correct, then reading error is ruled out. DHT11 does perform poorly compared to DHT22 which is a better sensor. In real life scenario (homes) humidity would not reach 30% range, so I suspect defective part. I have 10 DHT22 and all but one perform ok. The defective one reads 20% RH.