☁️ DHT11, DHT22 and DHT21 sensors comparison

☁️ DHT11, DHT22 and DHT21 sensors comparison

Daniil Zhuk

Today some sensors and modules can be used to measure temperature and other indicators related to the maintenance of optimal human activity, as well as other things and organisms.

They can be used in the simplest weather stations, in various climate control systems, and in a smart house, to maintain the required temperature in the premises, at work, and in many other cases.

Sensors of the DHT family are the most popular among the Arduinschik. Important criteria here are ease of use and writing software, and relatively inexpensive cost.

In the DHT family, there are three most common sensors: DHT11, DHT22, and DHT21.

If you are just starting to get acquainted with Arduino and recently started developing your project on this platform, then we recommend starting your acquaintance with temperature sensors from the DHT family. The disadvantage of these sensors is that they do not have high accuracy and speed.

They consist of a thermistor and a capacitive humidity sensor. The digital signal from the chip inside the sensor allows you to read the temperature and humidity, and then we can output these values ​​to the port monitor or display, process them, etc.

These modules are connected very simply - with the help of three contacts (two of which are responsible for the power supply, and the third is connected to the digital output on the board).

The question immediately arises: which sensor is better to use? After all, they differ in their characteristics and prices. How to choose the necessary module specifically for your project and with the right price-quality ratio? Let's figure it out. Let's start with a small review.

The first two sensors look a bit similar to each other, besides they are also connected in the same way.

DHT21 has a slightly different look.

The difference between this module and the first two is that it has a protective case, which allows it to be used outdoors, where this case will protect it from dust, dirt, and rain.

Now compare the modules on the main indicators.

DHT11 sensor:

  • determination of humidity in the range of 20-80% with an accuracy of ± 5% RH
  • determination of temperature from 0 ° C to + 50 ° C with an accuracy of ± 2 ° C
  • polling frequency 1 time per second

DHT22 sensor:determination of humidity in the range of 0-100% with an accuracy of ± 2% RH

  • temperature determination from -40 ° C to + 125 ° C with an accuracy of ± 0.5
  • polling frequency 1 time in 2 seconds

DHT21 sensor:

  • determination of humidity in the range of 0-100% with an accuracy of ± 2% RH
  • temperature determination from -40 ° C to + 80 ° C with an accuracy of ± 0.5 ° C


By comparing the prices of these modules, you can immediately select a low price for a DHT11 sensor. It costs, as a rule, in the region of 100-200 rubles - this is due to the high demand for these modules and their simple device.

DHT21 and DHT22 against the background of the first one can easily be attributed to more expensive ones: the price for them usually fluctuates around 300-400 rubles (that is, 2-3 times more expensive).

This is due to greater accuracy of readings, a large range in temperature measurement, besides, the DHT22 sensor has a protective housing that protects it from pollution and moisture, which also plays a significant role in price compilation.

In this regard, it is worthwhile to think, and do you have to overpay for the protective case, if the use of your sensor is limited, for example, to only a room?

The DHT11 will be the most optimal sensor for a home meteorological station, because it is cheaper, takes up less space, is reliable and easy to operate, and does not require the creator to measure record low or high temperatures while maintaining stability for a long time.

If you need to measure negative temperature or increase the accuracy and frequency of results, then use the DHT22 sensor.

DHT21 is used and bought much less frequently than the previous two, because it is more expensive, takes up more space and will be very unusual for the beginner engineer, and experienced experts quite often use sensors of the Dallas family.

Add a comment

* Comments must be approved before being displayed.