Author Topic: Arduino and DHT-11 Problems  (Read 1869 times)

0 Members and 1 Guest are viewing this topic.

Offline skillz21Topic starter

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: au
Arduino and DHT-11 Problems
« on: October 16, 2016, 01:06:35 am »
Hi guys,
I recently got a DHT-11. So far, i have been having a lot of trouble getting it to work... I have not been able to find a working code on google :-//. do you guys know any codes that work? or is the problem with my dht-11?
thanks
 

Offline Len

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: ca
Re: Arduino and DHT-11 Problems
« Reply #1 on: October 16, 2016, 01:35:56 am »
Adafruit has published an Arduino library & sample code on their web site:
https://learn.adafruit.com/dht?view=all
I haven’t tried it myself, but since they sell the DHT-11 I would expect their code to work.
It does say the code to read the sensor is "a little tricky" so it’s not surprising you had trouble.
DIY Eurorack Synth: https://lenp.net/synth/
 

Offline SnipTheCat

  • Supporter
  • ****
  • Posts: 25
  • Country: th
Re: Arduino and DHT-11 Problems
« Reply #2 on: October 16, 2016, 08:32:25 pm »
Hi guys,
I recently got a DHT-11. So far, i have been having a lot of trouble getting it to work... I have not been able to find a working code on google :-//. do you guys know any codes that work? or is the problem with my dht-11?
thanks

 I have been using the adafruit library with both DHT11 and DHT22 without any problem, however they are not that great sensors (especially de DHT11)

 If you have trouble installing the library, you need to create a folder DHT in your arduino /libraries/ subfolder and put the files there (mainly DHT.h/cpp and example subdir), you should then have a DHT test available form the arduino menu when you restart the IDE.

 Since I have discovered the HTU21D modules, I haven't touched the DHT11/22 anymore, much better accuracy, only drawback is that you need a logic level converter if your arduino is 5V

 
The following users thanked this post: paf

Offline frenky

  • Supporter
  • ****
  • Posts: 1003
  • Country: si
    • Frenki.net
Re: Arduino and DHT-11 Problems
« Reply #3 on: October 17, 2016, 09:16:22 am »
Another nice temp and humidity module is Si7021 (3.3V): https://goo.gl/d0fbQs
 
The following users thanked this post: paf

Offline JacquesBBB

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Arduino and DHT-11 Problems
« Reply #4 on: October 17, 2016, 09:35:23 am »
Avoid the DHT11,

their indications are close to none.

I have recently bought 10 DHT12 which are supposed to be an improved version, but which in fact differ from the DHT11 only by the interface.

After some preliminary testings, I have set up a more complete experiment with 9 sensors at the same time.
They give answers that are extremely different for the humidity. Not at all within the advertised specs of the  maker (AOSONG) which says 5% for the DHT11 (did not find the DHT12 datasheet)

The temp seems OK, but

I got   48%, 52%,  56%,  59%,  61%,  68%, 69%, 72%, 72%    for the Humidity output

so  a max difference of 24%  which is  huge.


A same experiment with 5 DHT22 gave much better results

DHT22 

Hum: 63.20 % 60.50 % 63.30 % 65.30 % 66.20 %     Temp: 24.60 C 23.70 C 23.40 C 22.90 C 23.10 C
Hum: 63.20 % 60.50 % 63.30 % 65.30 % 66.30 %     Temp: 24.60 C 23.70 C 23.40 C 22.90 C 23.10 C
Hum: 63.30 % 60.50 % 63.30 % 65.30 % 66.30 %     Temp: 24.70 C 23.70 C 23.40 C 22.90 C 23.10 C
 
The following users thanked this post: Blastcap


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf