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})
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:
- ESP32 BLE with DHT11
- DHT11 sensor with NodeMCU using Arduino IDE
- NodeMcu to DHT Interface in Blynk app
- DHT11 vs DHT22: Overview
- Mongoose OS – an IoT firmware development framework
- How To Enable Free HTTPS on your website
- How To Create Secure MQTT Broker
- MQTT Public Brokers List
- Controlling LED with Raspberry Pi
- Home automation | IoT Products for Home Automation
Pingback: IoT Sensors and Actuators - IoTbyHVM - Bits & Bytes of IoT
Pingback: Log Temperature Sensor Data to Google Sheet using NodeMCU ESP8266
Pingback: IoT Sensors and Actuators - CompileIoT - Explore Internet of Things
You said the DHT11 is slightly slower. This is incorrect. The DHT11 will take 1 reading every second, 1Hz. The DHT22 is one reading every 2 seconds, 0.5Hz. This makes the DHT22 half the speed of the DHT11.
In other aspects, yes the DHT22 is more accurate, but if you want faster, less accurate reads, DHT11 is the one.
Thanks for your attention. You are right Now I updated this post.
Actually I add “slightly slower” word in conclusion para. This was my mistake.
Thanks for your attention.
I already mentioned all in this post, as you are saying.