Monthly Archives: May 2022

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.