Types of DHT sensors
There are mainly two types of DHT sensors.
DHT11
The DHT11 is an essential digital temperature and humidity sensor at an economical price.
It measures the surrounding air with a capacitive humidity sensor and a thermistor while producing a digital signal output on the data pin.
It's pretty simple to use, and a sought-after device for amateurs and hobbyists, but data collection needs careful scheduling ahead.
One major negative of this particular sensor is that it collects new data periodically every 2 seconds,
so the values can be 2 seconds older while using our library.

Source: Link
Features of DHT11
- Ultra-low-cost
- 3 to 5V power and I/O
- 2.5mA max current use during conversion.
- Suitable for 20-80% humidity readings with 5% accuracy.
- Suitable for 0-50°C temperature readings with a ±2°C accuracy.
- No more than 1 Hz sampling rate (once every second)
- Four pins with 0.1" spacing
DHT22
In DHT22 ,a capacitive humidity sensor and a high precision temperature sensor are included, which is also known as RHT03 or AM2302.
To achieve high dependability and long-term stability, it employs specialised digital module acquisition technology as well as temperature and humidity sensor technology.
A capacitive sensor element and a high-precision temperature measuring portion are also included in the DHT22, which is paired to a high-performance 8-bit microprocessor.
As a result, it offers great quality, ultra-quick response, powerful anti-interference capability, and high cost performance.

Source: Link
Features of DHT22
- Low cost
- 3 to 5V power and I/O
- 2.5mA is the max current used during conversion (while requesting data)
- Good for 0-100% humidity readings with a 2-5% accuracy.
- Good for -40 to 80°C temperature readings with a ±0.5°C accuracy
- No more than 0.5 Hz sampling rate (once every 2 seconds)
- 4 pins with 0.1" spacing (i.e. exactly similar).
Working of DHT sensors
The working of the sensors is quite easy to understand. They consist of humidity sensing components, a thermistor, and an IC on the back of the sensor.
For humidity, it uses the humidity sensing component which has two electrodes with moisture holding substrate between them.
As the humidity changes, the substrate's conductivity or the resistance between these electrodes changes as well.
The IC measures and processes the change in resistance, preparing it for reading by a microcontroller.
These sensors, on the other hand, measure temperature via an NTC temperature sensor or a thermistor.
A thermistor is a variable resistor that changes resistance in response to temperature variations.
To give bigger variations in resistance with just slight changes in temperature, these sensors are created by sintering materials such as ceramics or polymers.
The word "NTC" stands for "Negative Temperature Coefficient," which signifies that resistance lowers as temperature rises.
You can also read 8051 Microcontroller Pin Diagram here.
Difference between DHT11 and DHT22
The DHT22 is the costlier version with some better specifications. Its temperature measuring range is between -40 to +125 degrees Celsius with a plus-minus 0.5-degree accuracy, while on the other hand, the DHT11 temperature measuring range is from 0 to 50 degrees Celsius with +-2 degrees accuracy.
There are two different variations of the DHT sensor, they look a bit similar and even have the same pinout, but at the same time have different characteristics.
Here are the specs:
Which one is better?
As observed in the above comparison we can comprehend that The DHT22 is a little more accurate and more efficient over a slightly larger range,
Since both use a single digital pin and are quite slow and in that you can't query them more than once every second or two. The DHT22 outperforms the DHT11 in major aspects from temperature range, temperature accuracy, humidity range, and humidity accuracy.
The only downside of the DHT22 is, of course, the slightly higher price but you are paying for the better specs.
Therefore, if you want a sensor with a wider range and accuracy, go for the DHT22. If not, the DHT11 should work fine for your projects as well.
Overall, these DHT sensors are basic and slow temperature and humidity sensors that are suitable for beginners and hobbyists looking to do basic data logging.
They both use a single digital pin and are a little slow where you can’t query them more than once every second.
Frequently asked questions
What is DHT in IoT?
For prototypes monitoring, the ambient humidity and temperature of a specified area, the DHT11 is a regularly used temperature and humidity sensor.
How do DHT sensors work?
It needs a capacitive humidity sensor and a thermistor to monitor the ambient air and delivers a digital signal on the data pin. Although it is simple to use, data collection requires careful planning.
How do DHT11 Sensors send data?
DHT11 switches from low-power consumption to operating mode when MCU delivers a start signal, waiting for MCU to complete the start signal. DHT11 provides a response signal to MCU with 40-bit data that includes relative humidity and temperature information after it's finished.
Conclusion
This article extensively discussed DHT sensors, DHT11 and DHT22 sensors, their working, and other features. We hope that this blog has helped you enhance your knowledge regarding DHT sensors and if you would like to learn more, check out our articles here. Do upvote our blog to help other ninjas grow.
To enhance your knowledge you must visit Interview Experience, SQL, interview prep, Basics of Python, and Coding mock test series. You can also practice at the Code studio test series, Code Studio Interview Experience, Interview Bundle, SQL problems
Happy Coding!