{"id":1026,"date":"2022-05-02T20:37:30","date_gmt":"2022-05-02T19:37:30","guid":{"rendered":"https:\/\/www.kolkataonweb.com\/code-bank\/?p=1026"},"modified":"2022-05-02T20:53:05","modified_gmt":"2022-05-02T19:53:05","slug":"humidity-sensor","status":"publish","type":"post","link":"https:\/\/www.kolkataonweb.com\/code-bank\/arduino\/humidity-sensor\/","title":{"rendered":"Humidity sensor"},"content":{"rendered":"<p>There are many Humidity sensors available. DHT-11\/DHT-20\/DHT-22 from Aosong are the cheapest and easily available in India.<\/p>\n<p>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.<\/p>\n<p>DHT20 is colored black and DHT22 is white.<\/p>\n<p><a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2022\/05\/DHT20-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1032 size-full\" src=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2022\/05\/DHT20-1.jpg\" alt=\"DHt-20\" width=\"250\" height=\"245\" \/><\/a> <a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2022\/05\/AM2302-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1033 size-thumbnail\" src=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2022\/05\/AM2302-3-150x150.jpg\" alt=\"DHT-22\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p>There are many manufacturers, even nameless ones.\u00a0 But sensor from Aosong is the preferred.<\/p>\n<p>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.<\/p>\n<p>Best library in my opinion is the one from Adafruit, <a href=\"https:\/\/github.com\/adafruit\/DHT-sensor-library\">which is available here<\/a>.<\/p>\n<p>The library can be downloaded from here also <a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2022\/05\/DHT-sensor-library-master.zip\">DHT-sensor-library by Adafruit<\/a><\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.&hellip; <a class=\"more-link\" href=\"https:\/\/www.kolkataonweb.com\/code-bank\/arduino\/humidity-sensor\/\">Continue reading <span class=\"screen-reader-text\">Humidity sensor<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,373,64],"tags":[395,393,394,77,392,391],"class_list":["post-1026","post","type-post","status-publish","format-standard","hentry","category-arduino","category-electronics","category-esp-8266","tag-am2302","tag-aosong","tag-asair","tag-dht-11","tag-dht-22","tag-dht22","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/1026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/comments?post=1026"}],"version-history":[{"count":4,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/1026\/revisions"}],"predecessor-version":[{"id":1035,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/1026\/revisions\/1035"}],"wp:attachment":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/media?parent=1026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/categories?post=1026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/tags?post=1026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}