User avatar
Onira
Posts: 233
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland

[SOLVED] DHT11/DHT22 showing incorrect humidity

Sat Jan 04, 2014 6:22 pm

Code: Select all

$ sudo ./Adafruit_DHT 11 25
Using pin #25
Data (40): 0x27 0x0 0x16 0x0 0x3d
Temp = 22 *C, Hum = 50 %
do I need to calibrate it?
Last edited by Onira on Mon Jan 06, 2014 10:05 pm, edited 1 time in total.
Cogito ergo sum

User avatar
DougieLawson
Posts: 35602
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: DHT11 is showing incorrect humidity

Sat Jan 04, 2014 6:41 pm

Where's the code you're using?

Is the temp consistent with the reading from your BMP085?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Onira
Posts: 233
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland

Re: DHT11 is showing incorrect humidity

Sat Jan 04, 2014 6:59 pm

I have:

Code: Select all

~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver $ sudo ./Adafruit_DHT 11 25
Using pin #25
Data (40): 0x29 0x0 0x17 0x0 0x40
Temp = 23 *C, Hum = 41 %
 ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver $ cd ..
[email protected] ~/Adafruit-Raspberry-Pi-Python-Code $ cd Adafruit_BMP085/
[email protected] ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085 $ python Adafruit_BMP085_example.py
Temperature: 24.20 C
Pressure:    998.52 hPa
Altitude:    96.58
the altitude changed but I didn't change the MSL :|
Cogito ergo sum

User avatar
DougieLawson
Posts: 35602
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: DHT11 is showing incorrect humidity

Sat Jan 04, 2014 7:14 pm

Onira wrote:I have:

Code: Select all

~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver $ sudo ./Adafruit_DHT 11 25
Using pin #25
Data (40): 0x29 0x0 0x17 0x0 0x40
Temp = 23 *C, Hum = 41 %
 ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver $ cd ..
[email protected] ~/Adafruit-Raspberry-Pi-Python-Code $ cd Adafruit_BMP085/
[email protected] ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085 $ python Adafruit_BMP085_example.py
Temperature: 24.20 C
Pressure:    998.52 hPa
Altitude:    96.58
the altitude changed but I didn't change the MSL :|
So your DHT11 is off by 1.2 degrees C, but the humidity has dropped from 50% to 41%.

The pressure is dropping so your probably getting the tail end of that low pressure storm that caused the flooding here in the UK yesterday.

I think it's safe to assume the DHT 11 is accurate within the tolerance of the device and that your BMP085 has a better thermal accuracy.

We've covered the altitude struggle in your other thread.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Onira
Posts: 233
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland

Re: DHT11 is showing incorrect humidity

Sun Jan 05, 2014 11:40 am

Code: Select all

$ sudo ./Adafruit_DHT 11 25
Using pin #25
Data (40): 0x28 0x0 0x16 0x0 0x3e
Temp = 22 *C, Hum = 40 %
Cogito ergo sum

gstreeter
Posts: 106
Joined: Sun Sep 02, 2012 11:11 am
Location: UK

Re: DHT11 is showing incorrect humidity

Sun Jan 05, 2014 4:58 pm

I have a breadboard with a DHT-22, BMP085 and a DS18B20 temperature sensor all being read via an Ardunio Nano. There are small differences between the temp readings on the three devices but this is to be expected as they each have accuracy limits as listed in the specs.

The DHT-11 is the lower accuracy model with up to 2C and 5% humidity difference from the true values. The BMP also has a 2C limit so at the opposite extremes there could be a 4C difference in readings between them. Note the primary function is humidity and pressure respectively. The DS18B20 will give you a better temp reading with 0.5C accuracy.

The DHT detects local changes in humidity - even breathing near it will cause a significant rise due to the water vapour in your breath. When I open the bathroom door after a shower the DHT reading spikes for a few minutes as the moisture laiden air disperses around the house. It even picks up the boiling kettle!
Last edited by gstreeter on Mon Jan 06, 2014 10:08 pm, edited 1 time in total.

User avatar
Onira
Posts: 233
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland

Re: DHT11 is showing incorrect humidity

Sun Jan 05, 2014 5:33 pm

which one is better then, DHT11 or DHT22 ?
Cogito ergo sum

gstreeter
Posts: 106
Joined: Sun Sep 02, 2012 11:11 am
Location: UK

Re: DHT11 is showing incorrect humidity

Sun Jan 05, 2014 8:57 pm

Onira wrote:which one is better then, DHT11 or DHT22 ?
The DHT-22 is more accurate but costs more. I found the results from the 22 more stable than the 11 under test.

gstreeter
Posts: 106
Joined: Sun Sep 02, 2012 11:11 am
Location: UK

Re: DHT11 is showing incorrect humidity

Sun Jan 05, 2014 9:09 pm

gstreeter wrote:
Onira wrote:which one is better then, DHT11 or DHT22 ?
The DHT-22 is more accurate but costs more. I found the results from the 22 more stable than the 11 under test.
Specs listed here: http://learn.adafruit.com/dht

User avatar
Onira
Posts: 233
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland

Re: DHT11 is showing incorrect humidity

Mon Jan 06, 2014 9:59 pm

Code: Select all

$ sudo ./Adafruit_DHT 22 25
Using pin #25
Data (40): 0x1 0xa1 0x0 0xf8 0x9a
Temp =  24.8 *C, Hum = 41.7 %

Code: Select all

$ sudo digitemp_DS9097 /dev/ttyUSB0 -a
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU General Public License v2.0 - http://www.digitemp.com
Jan 06 23:02:31 Sensor 0 C: 24.00 F: 75.20
Jan 06 23:02:32 Sensor 1 C: 24.00 F: 75.20

Code: Select all

$ cd /sys/bus/w1/devices/28-000004efec5d
[email protected] /sys/bus/w1/devices/28-000004efec5d $ cat w1_slave
85 01 4b 46 7f ff 0b 10 5f : crc=5f YES
85 01 4b 46 7f ff 0b 10 5f t=24312
Cogito ergo sum

mistofeles
Posts: 57
Joined: Thu Sep 27, 2012 7:31 am

Re: [SOLVED] DHT11/DHT22 showing incorrect humidity

Wed Feb 04, 2015 7:57 pm

I'm running a series of preliminary tests with DHT11 in rather standardized environment .
The next stage will be in more controlled system through the whole humidity scale.
Temperature has been OK, but there is some deviance in RH%
The worst was 26 RH%, while others were (36 +/- 2) RH%
This was expected, it is not so easy to measure humidity.
I think it is worth building some kind of compensation table.

delinend
Posts: 20
Joined: Thu Dec 27, 2012 12:43 pm

Re: [SOLVED] DHT11/DHT22 showing incorrect humidity

Mon May 04, 2015 2:22 pm

Sorry.. Old thread.

If the DHT22 power is a little lower then 3.3 volt, then the Humidity is getting wrong. I have just testet one..
3.3volt - > 5volt = 38.9% humidity
2.9volt = 62.3% humidity. :(

The data says for the DHT22: 3.3 -> 6volt power.

Please.. Check the power on your DHT22 !

Thanks and best regards.

mistofeles
Posts: 57
Joined: Thu Sep 27, 2012 7:31 am

Re: [SOLVED] DHT11/DHT22 showing incorrect humidity

Mon May 04, 2015 6:55 pm

delinend wrote:Sorry.. Old thread.
Thanks and best regards.
I'm still following this thread

I think, that the problem is not in the voltage. First of all, I'm using Arduino nano between Raspberry and DHT11.
In my system I have five DHT11 connected to five ports of Arduino and the DHT11's were in a small can.

Live long and prosper

MightyMidget
Posts: 1
Joined: Sun Dec 31, 2017 8:23 pm

Re: [SOLVED] DHT11/DHT22 showing incorrect humidity

Sun Dec 31, 2017 8:30 pm

Just wanted to add that I tried powering the DHT22 with a quality power supply at 5.5v and it made no difference

The readings I get with the DHT22 are VERY low.

If I remove the DHT22 and install a DHT11 (same everything else), the DHT11 is VERY close to accurate humidity and temp.

Return to “Troubleshooting”