Comparing the DHT11 and DHT22 Temperature and Humidity Sensor

20 November 2023


Ⅰ. What is a temperature sensor?

Ⅱ. DHT11 vs DHT22: Overview

Ⅲ. DHT11 vs DHT22: Symbol and footprint

Ⅳ. DHT11 vs DHT22: Features

Ⅴ. DHT11 vs DHT22: Pin configuration

Ⅵ. DHT11 vs DHT22: Working principle

Ⅶ. DHT11 vs DHT22: Technical parameters

Ⅷ. DHT11 vs DHT22: Applications



Temperature sensors utilize the principles of diverse physical properties of matter to undergo changes corresponding to temperature, thereby transforming temperature variations into electrical signals. As one of the important means of monitoring temperature, it brings great convenience to our lives. DHT11 and DHT22 are two famous humidity and temperature modules for Arduino and Raspberry Pi. This article will comprehensively compare the two in terms of features, pin configuration, working principle, technical parameters and applications.


b86ff0dd6715a0412a0924ef411a1878.png



Ⅰ. What is a temperature sensor?


A temperature sensor is a device that senses temperature and converts it into a usable output signal. It is the core of temperature measuring instruments and comes in many varieties. According to the measurement method, it can be divided into contact type and non-contact type. According to the sensor material and electronic component characteristics, it can be divided into thermal resistance and thermocouple. Temperature sensors have very high accuracy in measuring ambient temperature, and they are widely used in various fields such as workshops, warehouses, agriculture, and industry.



Ⅱ. DHT11 vs DHT22: Overview


1. DHT11 overview


321fd7d6b7b95bfc41b6b74b43effc3c.png


The DHT11 digital sensor provides calibrated digital signal output and serves as a composite sensor for measuring both temperature and humidity. It uses dedicated digital module acquisition technology and temperature and humidity sensing technology to ensure that the product has extremely high reliability and long-term stability. The device employs an NTC temperature measuring element and a resistive humidity sensing element, both linked to a high-performance 8-bit microcontroller. Therefore, this product has the advantages of ultra-fast response, excellent quality, high cost performance, and strong anti-interference ability.


Replacements and equivalents:

• DHT22 (AM2302)

AM2320

BME280

• HTU21D


2. DHT22 overview


d202f4bcd3c9a0c20b149a3a228925fa.png


DHT22 is also known as AM2302, it has a standard single bus interface. Compared with DHT11, it has higher accuracy and larger range. It is a temperature and humidity composite sensor with calibrated digital signal output, using dedicated digital module acquisition technology and temperature and humidity sensing technology. This product guarantees exceptional reliability and enduring stability over the long term.


Replacements and equivalents:

• DHT11

AM2320

• Si7021



Ⅲ. DHT11 vs DHT22: Symbol and footprint


The figures below show the symbols and footprints of DHT11 and DHT22 respectively.


9947bb870fcb50fc4d8974c5e45bc932.png



Ⅳ. DHT11 vs DHT22: Features


1. Features of DHT11


• Its signal transmission distance is long.


• Strong resistance to drying out


• Relative humidity and temperature integrated testing


• Single-wire digital interface (easy system integration)


• It has fast response time.


• High reliability: It adopts CMOSens processing technology, and the sensing head can be completely immersed in water during accurate measurement.


2. Features of DHT22


• Features ultra-low power consumption


• Use independent moisture-sensing components, with good stability and strong anti-pollution ability


• Its signal transmission distance is long.


• It has extremely high reliability and excellent stability, allowing it to be used in conjunction with a microcontroller to easily implement temperature and humidity testing and interaction.


• It can replace the expensive imported SHT0 temperature and humidity sensor and be used when the ambient temperature and humidity measurement requirements are relatively high.



Ⅴ. DHT11 vs DHT22: Pin configuration


The following shows the pin configurations of DHT11 and DHT22 respectively.


43d6fa1c6e243d3e0c06dd4f8127017e.png


• VCC: This pin provides sensor power. Although the power supply voltage range is 3.3V to 5.5V, it is recommended to use a 5V power supply. If we use a 5V power supply, we can maintain the sensor at a distance of up to 20 meters. However, under a 3.3V power supply voltage, the cable length should not exceed 1 meter. Otherwise, the voltage drop of the circuit will cause measurement errors.


• Data: It is the medium through which the sensor communicates with the microcontroller.


• NC: Not connected.


• GND: It should be connected to the Arduino ground.



Ⅵ. DHT11 vs DHT22: Working principle


1. How does the DHT11 sensor work?


The DHT11 employs a capacitive humidity sensor to gauge humidity and a thermistor to assess temperature, enabling the measurement of both temperature and humidity in the surrounding environment. It is also equipped with a microcontroller and a specialized digital signal processor responsible for converting the analog signals read from the sensors into digital signals. DHT11 can communicate with microcontrollers or other electronic devices through a single bus digital signal interface.


2. How does the DHT22 sensor work?


The DHT22 sensor also uses a capacitive humidity sensor and a thermistor to measure humidity and temperature, and its principle is similar to the DHT11. But the components in the DHT22 sensor are of higher quality and undergo a more complex calibration process, which gives it greater accuracy and measurement rates. At the same time, it also communicates with other devices through digital signal interfaces.



Ⅶ. DHT11 vs DHT22: Technical parameters


The figure below compares the differences of technical parameters between DHT11 and DHT22.


056d35683ec3174fe0b58bf904ea103a.png


Initially, regarding measurement range, the DHT11 is capable of measuring temperatures within the range of 0°C to 50°C and humidity within the range of 20%RH to 90%RH. In contrast, the DHT22 can measure temperatures ranging from -40°C to 80°C, with humidity spanning from 0%RH to 100%RH.


Secondly, in terms of accuracy, DHT22 has higher accuracy than DHT11. The temperature measurement error range of DHT11 is about ±2°C, and the humidity measurement error range is about ±5%RH; while the temperature measurement error range of DHT22 is about ±0.5°C, and the humidity measurement error range is about ±2%RH.



Ⅷ. DHT11 vs DHT22: Applications


1. Applications of DHT11


• Warehouse management system: It can be used to monitor the temperature and humidity conditions inside the warehouse, helping to ensure the quality and safety of goods and preventing damage or rot due to excessively high or low temperature and humidity.


• Temperature and humidity monitoring system: It can be used to monitor the temperature and humidity conditions of greenhouses, warehouses, laboratories and other environments, thereby feeding back data to users in a timely manner, helping to maintain the stability of the environment.


• Data logger: The DHT11 sensor can be used to establish a data logging system to record changes in temperature and humidity of the environment over time for subsequent analysis or reporting.


• Intelligent agriculture: In the field of agriculture, it can be used to monitor the temperature and humidity of crop growth environments in real time, helping farmers manage farmland scientifically and improve crop yield and quality.


• Indoor environment monitoring: DHT11 sensor is suitable for temperature and humidity monitoring in indoor environments such as homes, offices, laboratories, etc. By monitoring indoor temperature and humidity changes in real time, it can help maintain a comfortable living and working environment and take timely adjustment measures.


• Health monitoring devices: It can be integrated into health monitoring equipment to measure the impact of indoor environment on patient health. In addition, it can also be used together with other sensors to monitor the overall health status of living spaces.


2. Applications of DHT22


• Data logger and home temperature measurement


• Smart home: DHT22 can be used as part of a smart home system to monitor the temperature and humidity of different rooms, thereby automatically adjusting heating, air conditioning and humidity equipment.


• Food storage and transportation: It is employed for overseeing temperature and humidity levels throughout the storage and transportation of food, guaranteeing the quality and safety of the food products.


• Greenhouse control: Within the greenhouse, it adeptly observes temperature and humidity levels, establishing a crucial foundation for controlling the greenhouse environment and, consequently, guaranteeing optimal environmental conditions for plant growth.


• Weather station: The DHT22 can be used to build a simple weather station for monitoring temperature and humidity in indoor or outdoor environments. By placing multiple sensors at different locations, we can obtain more comprehensive environmental data.




Frequently Asked Questions


1. Does DHT11 need calibration?


Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate on humidity calibration. The calibration coefficients are stored as programmes in the OTP memory, which are used by the sensor's internal signal detecting process.


2. What are the disadvantages of DHT22?


As for the drawbacks, DHT22 is a little bit bigger than DHT11, and it has slower sample rate in comparison DHT11, which is 0.5Hz (every two seconds) for DHT22 and 1Hz (every second) for DHT11.


3. Does DHT22 need calibration?


Therefore, calibration is needed to reduce the error value of the sensor. The DHT22 RH vs. ASTM RH chart was created to see the relationship between the two measuring instruments so that they obtained the equation from the DHT22 sensor to the RH value of ASTM.


4. Is DHT22 better than DHT11?


The DHT22 outshines the DHT11 in every aspect from temperature range, temperature accuracy, humidity range to humidity accuracy. The only downside of the DHT22 is, of course, the slightly higher price but you are paying for the better specs.


5. What are the disadvantages of DHT22?


As for the drawbacks, DHT22 is a little bit bigger than DHT11, and it has slower sample rate in comparison DHT11, which is 0.5Hz (every two seconds) for DHT22 and 1Hz (every second) for DHT11.