0

I got this DHT22 sensor (COM-FOUR DHT22 AM2302) but I'm not able to extract any data from it...

Current setup is Rpi2 -> Breadboard -> DHT22 Pi is based on standard configuration where I've only activated i2c interface to read from another sensor (this part work) in case it matter.

I've downloaded the Adafruit python library and installed following the instruction but all I can get is:

$ ./AdafruitDHT.py 22 6
Failed to get reading. Try again!

For sake of testing I've tried also 2303... but no luck.

Following this question How to know if DHT11/DHT22 is working? I've also tested the following:

#define DHT_GOOD         0
#define DHT_BAD_CHECKSUM 1
#define DHT_BAD_DATA     2
#define DHT_TIMEOUT      3

$ sudo pigpiod
$ ./DHTXXD -g6
3 0.0 0.0

The sensor have a little break out that have (+),(out),(-) that I've connected to 3.3V, GPIO6 and Ground. I've also tried with and without a 10k resistor.

Any idea what I could check?

  • The listings I can find for that part show a required voltage input of 3.5V - 6V. Have you tried hooking it up to the 5V pin, rather than the 3.3V pin, and using a logic level converter (to make sure you don't exceed the Pi's 3.3V input limit) for the return signal? – goobering Feb 14 '17 at 12:00
  • @goobering AH... cannot believe I did not realized that was saying 3.5 V :( however I do not have a logic level converter at hand so guess I need to wait (unless there's another safe way to do it, I'm a newbie) – Derek Wildstar Feb 14 '17 at 12:09
  • If you've a couple of resistors knocking about you could try your hand at making a voltage divider? – goobering Feb 14 '17 at 12:10
  • 1
    You used DHTXXD with -g6 which is Broadcom GPIO 6 which is connected to expansion header pin 31. Are you sure the data line is connected to the GPIO you think it is? See abyz.co.uk/rpi/pigpio/index.html#Type_3 for the mapping between GPIO and pins. – joan Feb 14 '17 at 12:23
  • @joan the reference was fine... I'm using a cable cobbler where there's GPIO number :) – Derek Wildstar Feb 17 '17 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.