[FIXED] DHT22 Temperature Sensor not working (checksum error)

Hello,

I have a DHT22 temperature sensor and I've spent a lot of time on it but I cannot get it to work, always get checksum error and widely varying values that don't look anywhere near real results (still a newbie, possibly made a very basic mistake).

I'm using the unmodified example code from the following library:
http://playground.arduino.cc/Main/DHTLib

Pictures of the wiring and the results:

Left PIN to 5V
Second pin to 4K7 resistor + 5V and to Arduino PIN 5 (also tried with 10k resistor)
Third pin not used
Right pin to ground

I also have a DHT11 with which I got similar results when I tried the DHT11 test script, at first I thought it was broken, but now that I get the same problem with DHT22 I suppose I'm doing something wrong. I tried other libraries in the past as well but also had similar problems :frowning:

Thanks in advance!

I've only used the Adafruit library for the DHT22 and it works (just tried it) with or without a pullup on the data line.

Pete

el_supremo:
I've only used the Adafruit library for the DHT22 and it works (just tried it) with or without a pullup on the data line.

Pete

Thank you for the reply.

I just tried that one and get the following result :frowning: (both with & without resistor)

DHTxx test!
Read failFailed to read from DHT
Humidity: 0.00 %	Temperature: 0.00 *C
Humidity: 0.00 %	Temperature: 0.00 *C
Humidity: 0.00 %	Temperature: 0.00 *C
Read failFailed to read from DHT
Humidity: 0.00 %	Temperature: 0.00 *C
Humidity: 0.00 %	Temperature: 0.00 *C
Humidity: 0.00 %	Temperature: 0.00 *C

The sensor in your photos looks like a DHT11. Are you choosing the correct sensor type when using the Adafruit library and their example sketch (DHTtester)?

Pete

el_supremo:
The sensor in your photos looks like a DHT11. Are you choosing the correct sensor type when using the Adafruit library and their example sketch (DHTtester)?

Pete

The sensor in the pictures is a DHT22 (says AM2302 on the sensor, which , according to the Adafruit library comments is a DHT22). Just to be sure I just tried it as DHT11/DHT21/DHT22 with both DHtester and DHTLib libraries and always the same error :frowning:

I also have a DHT11 which gives the same problems :~

The only thing I can think of right now is a real shot in the dark. The power and ground rails on some breadboards are not connected all the way from the left side of the board to the right side. In the photo, you have the Arduino power and ground going to the left side of the board but the DHT22 is over on the right side. Try moving all the connections for the DHT22 over to the left side of the board close to the Arduino.

Pete

el_supremo:
The only thing I can think of right now is a real shot in the dark. The power and ground rails on some breadboards are not connected all the way from the left side of the board to the right side. In the photo, you have the Arduino power and ground going to the left side of the board but the DHT22 is over on the right side. Try moving all the connections for the DHT22 over to the left side of the board close to the Arduino.

Pete

:blush: :blush:

That was it!! Cannot believe it was something so basic. :blush:
On the bright side, that explains why it seemed like almost nothing I tried with arduino was working.

Thank you very much!! :slight_smile: