Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

DHT22 returning zeros
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DHT22 returning zeros

by nrdufour on Tue Sep 18, 2012 10:32 pm

Hello,

I recently integrated a DHT22 on an Arduino Fio board (along with the excellent BMP085 pressure sensor).

I'm using a code merging both the DHT tester and the BMP085 tester.
So far I'm getting the pressure and its associated temperature right.
But the humidity and associated temperature is returning zeros constantly:

Code: Select all | TOGGLE FULL SIZE
Temperature = 23.30 *C
Pressure = 98794 Pa
Humidity: 0.00 %   Temperature: 0.00 *C


Any idea what would cause that?

Thank you,

Nicolas
nrdufour
 
Posts: 15
Joined: Mon Apr 23, 2012 11:36 am

Re: DHT22 returning zeros

by adafruit_support_bill on Wed Sep 19, 2012 6:10 am

Does the DHT22 example code work by itself?

adafruit_support_bill
 
Posts: 82459
Joined: Sat Feb 07, 2009 10:11 am

Re: DHT22 returning zeros

by nrdufour on Wed Sep 19, 2012 6:32 am

The example code is returning zeros too in the exact same fashion.

I really don't quite understand why. Unless the component is simply dead ...
nrdufour
 
Posts: 15
Joined: Mon Apr 23, 2012 11:36 am

Re: DHT22 returning zeros

by adafruit_support_bill on Wed Sep 19, 2012 7:48 am

Post a photo showing your connections between the sensor & the Arduino.

adafruit_support_bill
 
Posts: 82459
Joined: Sat Feb 07, 2009 10:11 am

Re: DHT22 returning zeros

by nrdufour on Wed Sep 19, 2012 10:32 am

Sure. I have taken 2 close pictures of the breadboard and also included a schema made with fritzing (the only difference is the fio board is upside down).

Breadboard photo #1:
Image

Breadboard photo #2:
Image

Fritzing schema:
Image

Perhaps I made a simple mistake on the pull-up resistor.

Thanks,

Nicolas
nrdufour
 
Posts: 15
Joined: Mon Apr 23, 2012 11:36 am

Re: DHT22 returning zeros

by adafruit_support_bill on Wed Sep 19, 2012 12:35 pm

The photo is a little dark & the colors a bit muddy. It is not clear what resistor value you have there. It should be 10K (Brown Black Orange)

adafruit_support_bill
 
Posts: 82459
Joined: Sat Feb 07, 2009 10:11 am

Re: DHT22 returning zeros

by nrdufour on Wed Sep 19, 2012 12:59 pm

Yes it's a 10K resistor. I tried with the one provided with the sensor and another one from my own. Same results.
nrdufour
 
Posts: 15
Joined: Mon Apr 23, 2012 11:36 am

Re: DHT22 returning zeros

by adafruit_support_bill on Wed Sep 19, 2012 1:13 pm

One last thing: The library handles several different variations of this sensor. Make sure you have the right sensor type defined in your code:
Code: Select all | TOGGLE FULL SIZE
// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

adafruit_support_bill
 
Posts: 82459
Joined: Sat Feb 07, 2009 10:11 am

Re: DHT22 returning zeros

by nrdufour on Wed Sep 19, 2012 1:45 pm

Yes I'm using the DHT22. The sensor has "AM2302" written on it.

Should I try with a new sensor?
nrdufour
 
Posts: 15
Joined: Mon Apr 23, 2012 11:36 am

Re: DHT22 returning zeros

by adafruit_support_bill on Wed Sep 19, 2012 2:04 pm

OK then, everything looks correct there. If this sensor was purchased from Adafruit, contact support@adafruit.com with a link to this thread and ask for a replacement.

adafruit_support_bill
 
Posts: 82459
Joined: Sat Feb 07, 2009 10:11 am

Re: DHT22 returning zeros

by nrdufour on Wed Sep 19, 2012 4:50 pm

Thank you for the support.

I will see that when the dht is back in stock.

Nicolas
nrdufour
 
Posts: 15
Joined: Mon Apr 23, 2012 11:36 am

Re: DHT22 returning zeros

by dere1 on Mon Nov 05, 2012 4:17 pm

i am having this same problem and i know that the dht22 works because it responds when i use it with an uno board, when plugged into 3.3 V
is there something with the fio that causes an issue?

dere1
 
Posts: 12
Joined: Thu Sep 15, 2011 1:01 am

Re: DHT22 returning zeros

by adafruit_support_bill on Tue Nov 06, 2012 6:47 am

is there something with the fio that causes an issue?

I don't know. We don't sell or support the fio.

adafruit_support_bill
 
Posts: 82459
Joined: Sat Feb 07, 2009 10:11 am

Re: DHT22 returning zeros

by xose on Thu Jan 31, 2013 7:00 pm

I was having the exact same problem with a DHT22 and a FIO using Adafruit library.
But eventually I made it work using this other library: https://github.com/ringerc/Arduino-DHT22.git and a warm up delay of 2000ms.

xose
 
Posts: 1
Joined: Tue Dec 27, 2011 8:58 am

Re: DHT22 returning zeros

by ZoT59 on Sun Sep 01, 2013 12:52 am

I had exactly the same problem and I switched to the same library at github.com/ringerc/Arduino-DHT22 and it works.

However, before it starts to work I get an error ERROR CODE DHT_ERROR_ACK_TOO_LONG. This error persists for a few minutes and then the error goes away. The main loop delays for 2000 ms.

I suspect that the file has to be "tuned" a bit for the FIO.
ZoT59
 
Posts: 1
Joined: Sun Sep 01, 2013 12:18 am

Please be positive and constructive with your questions and comments.