Connecting to a DHTxx Sensor

Luckily it is trivial to connect to these sensors, they have fairly long 0.1"-pitch pins so you can plug them into any breadboard, perfboard or similar.

AM2302 (wired DHT22) temperature-humidity sensor

The AM2302 is a wired version of the DHT22, in a large plastic body. It is a basic, low-cost digital temperature and humidity sensor....

Likewise, it is fairly easy to connect up to the DHT sensors. They have four pins

  1. VCC - red wire Connect to 3.3 - 5V power. Sometime 3.3V power isn't enough in which case try 5V power.
  2. Data out - white or yellow wire
  3. Not connected
  4. Ground - black wire

Simply ignore pin 3, its not used. You will want to place a 10 Kohm resistor between VCC and the data pin, to act as a medium-strength pull up on the data line. The Arduino has built in pullups you can turn on but they're very weak, about 20-50K

DHT22 and AM2302 often have a pullup already inside, but it doesn't hurt to add another one!

This diagram shows how we will connect for the testing sketch. Connect data to pin 2, you can change it later to any pin.

If you have an AM2302

Last updated on Oct 30, 2017 Published on Jul 29, 2012