DHT11 vs DHT22 | Difference between DHT11 and DHT22

The DHT11 and DH22 are both temperature and humidity sensors, but what’s the difference between the two? Let’s go through the important differences, and how they may affect which one you choose for your next project. These sensors are very basic and slow, but are great for hobbyists who want to do some basic data logging. The DHT sensors are made of two parts, a capacitive humidity sensor and a thermistor. There is also a very basic chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. The digital signal is fairly easy to read using any microcontroller. Now we will discuss about DHT11 vs DHT22.

DHT11 vs DHT22

We have two versions of the DHT sensor, they look a bit similar and have the same pinout, but have different characteristics. Here are the specs:

DHT11

  • Ultra low cost
  • 3 to 5V power and I/O
  • 2.5mA max current use during conversion (while requesting data)
  • Good for 20-80% humidity readings with 5% accuracy
  • Good for 0-50°C temperature readings ±2°C accuracy
  • No more than 1 Hz sampling rate (once every second)
  • Body size 15.5mm x 12mm x 5.5mm
  • 4 pins with 0.1″ spacing

DHT22

  • Low cost
  • 3 to 5V power and I/O
  • 2.5mA max current use during conversion (while requesting data)
  • Good for 0-100% humidity readings with 2-5% accuracy
  • Good for -40 to 80°C temperature readings ±0.5°C accuracy
  • No more than 0.5 Hz sampling rate (once every 2 seconds)
  • Body size 15.1mm x 25mm x 7.7mm
  • 4 pins with 0.1″ spacing

As you can see, the DHT22 is a little more accurate and good over a slightly larger range. Both use a single digital pin and are ‘sluggish’ in that you can’t query them more than once every second or two.

Specifications & DHT11 Vs DHT22:

Parameter DHT11 DHT22
Temperature measurement range 0 to 50 Deg.C -40 to 80 Deg.C
Temperature Accuracy +- 1 to 2 Deg.C +- 0.5 Deg.C
Relative Humidity Range 30% to 90% 0% to 100%
Relative Humidity Accuracy +- 4% to 5% +-2 to 5%
Operating Voltage 3.3V to 5V 3.3V to 5V
Resolution 8 bits 16 bits
Sampling period >=1 sec >=2 sec

 

 

 

DHT22 & DHT11 Pinout:

DHTxx Data Format

When Humidity and Temperature sensor sends data, it sends the MSB first. The 40bits of data is divided into 5 bytes. For DHT11 sensor 2nd and 4th byte is always Zero. The significance of these bytes is as follows:

  • 1st Byte: Relative Humidity Integral Data in % (Integer Part)
  • 2nd Byte: Relative Humidity Decimal Data in % (Fractional Part) – Zero for DHT11
  • 3rd Byte: Temperature Integral in Degree Celsius (Integer Part)
  • 4th Byte: Temperature in Decimal Data in % (Fractional Part) – Zero for DHT11
  • 5th Byte: Checksum (Last 8 bits of {1st Byte + 2nd Byte + 3rd Byte+ 4th Byte})

dht11/22

Conclusion

The DHT11 is less precise, works in a smaller range of temperature/humidity, but also features a lower price point and a smaller form factor. If accuracy is important for you, and you don’t mind the higher price, go for the DHT22. Otherwise, the DHT11 should be good enough!


You may like also:


Buy now : Raspberry PI 3 Model B+ Motherboard

Harshvardhan Mishra

Hi, I'm Harshvardhan Mishra. I am a tech blogger and an IoT Enthusiast. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning!

5 thoughts on “DHT11 vs DHT22 | Difference between DHT11 and DHT22

Leave a Reply

%d bloggers like this: