DHT11 Vs DHT22 Sensor Temperature and Humidity Tutorial

The DHT11 and DHT22 are the most popular digital temperature and humidity sensors used in DIY electronics and IoT projects today. At first glance, both sensors look nearly identical – small black components with a bluish resin covering and four pins.

However, upon closer inspection, there are some key differences between the two models that make each one better suited for certain applications.

In this article, we will compare these two sensors in detail – looking at specifications like temperature/humidity range, accuracy, resolution, repeatability, interface types, and more.

What is a DHT11 Sensor?

The DHT11 is a basic, ultra-low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air’s humidity and temperature respectively.

The DHT11 is commonly used in DIY electronics projects, IoT devices, environmental monitoring systems, and automated control systems. Its low cost (under $5) and simple digital output make it popular among hobbyists and makers.

However, it only provides basic accuracy and reliability.

DHT11 Sensor

DHT11 Sensor


Low Cost – The DHT11 can be purchased for under $5 in single quantities, making it one of the most affordable temperature and humidity sensors on the market. This allows it to be integrated into mass-produced products and disposable systems.

Digital Signal Output – The DHT11 outputs calibrated digital signals over a single-wire serial interface. This makes integration with microcontrollers straightforward without needing additional analog-to-digital converters.

Low Power – Operating voltage is 3-5V with an average current below 2.5mA. This allows the DHT11 to run for long periods on batteries or solar power. Standby current is less than 50μA.

Temperature Range – The DHT11 can measure temperatures between 0-50°C with an accuracy of ±2°C. The maximum resolution is 1°C.

Humidity Range – Relative humidity is measured between 20-90% RH with an accuracy of ±5% RH. Maximum resolution is 1%RH.

Small Form Factor – The component measures approximately 15mm x 25mm x 5mm. This compact PCB-mounted module allows integration into tight spaces.

Simple Interface – Communication uses just one wire with a proprietary serial protocol similar to I2C. Easily interfaces with microcontrollers like Arduino.

While the DHT11 is easy to use and highly affordable, it has some accuracy and reliability limitations which make it unsuitable for scientific-grade environmental monitoring. However, it provides a basic entry-level option for makers and hobbyists.

What is a DHT22 Sensor?

The DHT22 is a higher-precision digital temperature and humidity sensor. It uses a capacitive humidity sensing element and a bandgap temperature sensor to provide calibrated digital outputs over an I2C interface.

The DHT22 builds on the qualities of the basic DHT11 with improved accuracy, resolution, and reliability. It costs slightly more than the DHT11 but delivers laboratory-grade performance for environmental monitoring and control systems.

DHT22 Sensor

DHT22 Sensor


High Accuracy – Temperature accuracy is ±0.5°C over a range of -40 to 80°C. Humidity accuracy is 2-5 % RH over a range of 0-100% RH. This allows the DHT22 to make scientific grade measurements.

Excellent Resolution – Temperature resolution is 0.1°C and humidity resolution is 0.1% RH. The digital outputs provide 16-bit to 14-bit measurement resolutions.

Fast Sampling – The DHT22 can sample temperature and humidity every 2 seconds with a fast data acquisition time. This allows quick detection of environmental changes.

Stable Sensing Elements – The sensing components have excellent long-term stability. Calibration is not required for most applications.

Low Power Consumption – Operating voltage is 3-5V with an average current of around 2.5mA during operation. Standby current is less than 50μA.

Wide Operating Range – Temperatures from -40°C to 80°C can be measured. And relative humidity from 0 to 100%RH.

Digital Interface – Calibrated digital outputs over the I2C interface for easy microcontroller connectivity. No analog-to-digital conversion is needed.

Small Form Factor – Measures just 15.1mm x 25.3mm x 7.8mm with a dual-row pin header. Easily integrated into weather stations and data loggers.

While costing slightly more than the DHT11, the DHT22 provides superior performance, accuracy, and resolution. It is an ideal choice whenever reliable laboratory-grade temperature and humidity measurements are needed.

What is the Working Principle of the DHT11 and DHT22 Sensors?

The DHT11 and DHT22 may appear similar but utilize different internal components and operating principles to provide digital temperature and humidity measurements.

DHT11 Working Principle

The DHT11 uses a basic thermistor to sense temperature. A thermistor is a type of resistor that changes resistance value based on the surrounding temperature. It is made of semiconductor materials like metal oxides.

As temperature rises, the resistivity of the thermistor material decreases. By measuring the resistance changes, the temperature can be derived.

The resistance variance is converted to a basic analog voltage signal digitized by an analog-to-digital converter (ADC) inside the DHT11. Additional components provide calibration adjustments. The ADC outputs a digital signal corresponding to the detected temperature.

For humidity sensing, the DHT11 uses a capacitive humidity sensor constructed from two conductive plates separated by a dielectric material. The dielectric absorbs or releases water vapor based on the relative humidity.

This changes the dielectric constant and capacitance between the plates. An electronic circuit converts the capacitance change to a voltage signal proportional to the ambient humidity. This voltage is digitized by the ADC and output.

The temperature and humidity signals are combined using a microcontroller inside the DHT11 to generate the calibrated digital output. A proprietary serial interface protocol transmits the data to external devices.

The simple low-cost components limit overall accuracy but allow the DHT11 to provide basic environmental readings.

DHT22 Working Principle

Unlike the DHT11, the DHT22 utilizes an integrated combo sensor component with a bandgap temperature sensor and a capacitive humidity sensor built together.

The bandgap temperature sensor uses silicon transistors and op-amps to produce a voltage proportional to absolute temperature. The voltage varies linearly and precisely with temperature changes, eliminating issues with analog thermistors.

The capacitive humidity sensor includes a moisture-absorbing substrate between two conductive plates. Changes in the dielectric as water vapor absorbs into the substrate cause proportional changes in capacitance.

The combo sensor converts these property changes into small analog voltage signals that interface to an internal analog-to-digital converter (ADC) chip. The ADC provides up to 16-bit digital output using proprietary algorithms for calibration and linearization.

Finally, a dedicated logic and memory chip handles the sensor signals and generates the calibrated digital humidity and temperature serial output. The superior components within the DHT22 allow it to deliver high accuracy, resolution, and stability.

DHT11 vs DHT22 Comparison

DHT11 and DHT22 are frequently used for their distinct characteristics and capabilities. Understanding their performance in measuring temperature and humidity is important for selecting the right sensor for any given application.


Temperature Measurement Performance

When it comes to measuring temperature, the DHT22 outperforms the DHT11 in nearly every metric that matters.

The DHT11 has a basic thermistor temperature sensor that provides just ±2°C accuracy over a range of 0°C to 50°C. Resolution is limited to 1°C increments. Repeatability and hysteresis introduce additional variability in measurements.

Long-term drift of around 0.5°C per year is also typical for the DHT11 thermistor. Frequent calibration is required for best accuracy.

In contrast, the DHT22 uses a bandgap temperature sensor with a far superior accuracy of ±0.5°C across a much wider -40°C to 80°C range. This allows it to be used in both hot and cold environments.

DHT22 Provides Better Temperature Measurement Compared To DHT22

DHT22 Provides Better Temperature Measurement Compared To DHT22

Resolution is also improved to 0.1°C increments, providing 20X higher resolution than the DHT11. Repeatability is within ±0.2°C and hysteresis is just ±0.3°C. The bandgap sensor in the DHT22 eliminates the long-term drift issues of thermistors, requiring less frequent calibration.

Overall, the DHT22 delivers laboratory-grade temperature measurement performance that surpasses the DHT11’s capabilities for basic personal projects.

Humidity Measurement Performance

Similar to its temperature sensing advantages, the DHT22 also provides superior humidity measurement performance compared to the lower-cost DHT11.

The DHT11 uses a basic capacitive humidity sensor with an accuracy of around ±5%RH. It can only handle a limited humidity range of 20-90%RH.

Resolution is restricted to integer percentages. Response times lag to changes in humidity up to 10 seconds. Hysteresis varies from 1 to 3%RH depending on conditions. And long-term drift degrades accuracy over time.

In comparison, the DHT22 leverages a vastly improved capacitive humidity sensor. Accuracy is 2-5%RH over a full 0-100%RH range, providing laboratory-grade performance.

Resolution reaches up to 0.1%RH, allowing the detection of minute humidity changes. Response times are under 6 seconds. Hysteresis is within ±0.3%RH. And long-term drift is negligible in normal use cases.

This superior humidity performance allows the DHT22 to excel in applications like environmental monitoring, agriculture, HVAC, and humidors. The DHT11 simply cannot match the DHT22’s sensing fidelity and calibration stability due to inherent limitations.

For any application requiring professional-grade humidity measurements, the DHT22 is certainly the better choice over its cheaper counterpart.

Interface and Communication

The DHT11 and DHT22 sensors take slightly different approaches for their digital interfaces and communication protocols.

The DHT11 uses a single-wire bidirectional interface to transmit the digital temperature and humidity readings. Communication occurs over proprietary serial protocol timing that is similar to the I2C standard. Data is transmitted in integer values with checksum validation.

Interfacing the sensor with a microcontroller like Arduino involves connecting the signal pin to a digital I/O pin. Care must be taken to provide precise timing of reset pulses and measurement commands.

However, once the timings are working, the simple integer values can be easily read over the single-wire interface.

In contrast, the DHT22 utilizes a standard I2C interface for communication. This provides clock (SCL) and data (SDA) lines to better accommodate timing needs and avoid issues with long wires.

Data is transmitted in calibrated 16-bit to 14-bit formats for higher-resolution readings. An I2C controller handles the timing and readout when interfacing with processors.

Overall, both sensors provide straightforward digital interfaces. The DHT11 uses a simpler proprietary protocol and the DHT22 leverages the common I2C standard.

For most DIY projects and short connections, the DHT11 single-wire setup works well. But when integrating across larger systems, the DHT22’s I2C interface helps ensure reliable communication and precision timing.

Compare Power Consumption During Operation and Standby

When comparing power consumption, the DHT11 is more efficient overall than the higher-performance DHT22.

The DHT11 operates at 3-5V with an average current of around 2.5mA when active. This keeps power usage under 15mW during measurement cycles.

Between readings, the standby current drops below 50μA. For intermittent operation on batteries or solar energy, the DHT11 can minimize power drainage.

In contrast, the DHT22 requires a slightly higher operating voltage of 3-5.5V with an active current of around 3mA – consuming up to 20mW when powered on. Its standby current remains under 50μA.

DHT22 Requires More Power Compared to DHT11

DHT22 Requires More Power Compared to DHT11

So while not dramatically higher, the DHT22 does draw more constant current during normal operation.

For always-on monitoring systems, the lower-power DHT11 can operate longer on small batteries or harvestable energy sources. The DHT22 requires a bit more overhead to account for its higher energy needs.

However, for most applications, the power difference is modest and overshadowed by the DHT22’s performance advantages.

Frequently Asked Questions

1. Can the DHT11 Replace the DHT22 in All Applications?

The DHT11 cannot replace the DHT22 in all applications due to its lower accuracy and narrower temperature and humidity range. It is suitable for simpler, less demanding projects where precision is not a critical factor.

2. How Often Should DHT11 and DHT22 Sensor Be Calibrated for Optimal Accuracy?

The DHT11 and DHT22 sensors generally do not require frequent recalibration as they come factory-calibrated. However, for critical applications demanding high accuracy, periodic checking and recalibration every six months to a year might be advisable.

3. What Are the Disadvantages of DHT22?

Disadvantages of the DHT22 include a higher cost than the DHT11, a slower response time than some other advanced sensors, and susceptibility to being less accurate in extreme humidity conditions.

4. How to Choose Between DHT11 and DHT22 for a Specific Application?

Select DHT11 for basic hobbyist uses, but pick DHT22 whenever professional-grade accurate and reliable temperature/humidity readings are needed.


Both the DHT11 and DHT22 provide digital temperature and humidity readings suitable for DIY and IoT projects. The DHT11 gives basic functionality at an ultra-low cost while the DHT22 delivers superior professional-grade performance for critical applications.

To maximize the accuracy of either sensor, pay close attention to the PCB design and manufacturing. A reliable PCB producer like PCBMay can create boards optimized for integrating the DHT11 or DHT22.

Our expertise in layout, layered PCB stack-ups, and assembly can help reduce noise, calibration errors, and drift. For commercial systems leveraging these sensors, having robust PCBs made by an experienced supplier like PCBMay will ensure stable and reliable operation.

Meta Description

Explore the DHT11 vs DHT22 comparison, focusing on their temperature and humidity measurement accuracy, power consumption, etc. for various applications.

Update cookies preferences
Scroll to Top

Get a Quick Quote!

Upload File

Get a Quick Quote!

Upload File