Tag Archives: DHT-11

Humidity sensor

There are many Humidity sensors available. DHT-11/DHT-20/DHT-22 from Aosong are the cheapest and easily available in India.

DHT-11 is the cheapest. DHT-22 or AM2302 is a good choice for hobby purposes or college projects. DHT20 has replaced DHT22 but still DHT22 is still the most available one.

DHT20 is colored black and DHT22 is white.

DHt-20 DHT-22

There are many manufacturers, even nameless ones.  But sensor from Aosong is the preferred.

The module needs a pullup resistor. 10K will do. They can be put at a distance from the controller. The length of the cable depends on the voltage. With 5v it can be upto 3mts and for 3.3v the max is 1 meter.

Best library in my opinion is the one from Adafruit, which is available here.

The library can be downloaded from here also DHT-sensor-library by Adafruit

Some other Humidity sensors are SHT20D, HTU21D-F, BME280. The HTU21D-F has protective cover or membrane on the sensor. SHT2x or SHT3x also has protective caps available.

DHT 11 – Temperature and Humidity sensor

Mostly made by Aosong. Here is the datasheet. Libraries are little rare and seems to be bit old. But this one on GIT is working fine.  The library has been attached here also in case the GIT one is not available for any reason.

There are example codes in the library. Wiring the module is pretty simple.

DH-11

The module works on 3.3v – 5v and uses I2C for communication.

As per the datasheets the module will malfunction under harsh conditions and contamination. But it may recover if left for sometime.