
If you are building an Arduino, ESP32, Raspberry Pi, or IoT project that needs to measure both temperature and humidity, the DHT22 Temperature and Humidity Sensor Module is a popular and easy-to-use option.
The DHT22, also known as the AM2302, is a digital temperature and humidity sensor designed to provide calibrated readings through a single digital data connection. Compared with the commonly used DHT11, it offers a wider temperature measurement range, better accuracy, and finer resolution.
The module is useful for projects ranging from simple classroom experiments to weather stations, greenhouse monitoring, environmental monitoring, home automation, and IoT systems.
If you're looking for a ready-to-use module for your next electronics project, you can check out the DHT22 Temperature and Humidity Sensor Module from Component Wala.
What Is a DHT22 Temperature and Humidity Sensor?
The DHT22 is a digital sensor capable of measuring two important environmental parameters:
- Temperature
- Relative humidity
Internally, the sensor combines a capacitive humidity sensing element with a temperature-sensing element and an integrated controller that processes the measurements before transmitting them digitally.
Unlike an analog temperature sensor that produces a continuously varying voltage, the DHT22 sends processed measurement data through its digital data pin. This makes it relatively straightforward to connect to development boards such as Arduino and ESP32.
The Component Wala version uses a simple three-pin interface consisting of VCC, OUT/DATA, and GND, making wiring easier for beginners and hobbyists.
DHT22 Sensor Specifications
The exact module implementation can vary slightly between manufacturers, but typical DHT22/AM2302 specifications include:
Specification | DHT22 |
|---|---|
Sensor type | Digital temperature & humidity sensor |
Temperature range | -40°C to +80°C |
Temperature accuracy | ±0.5°C |
Temperature resolution | 0.1°C |
Humidity range | 0–100% RH |
Humidity accuracy | ±2% RH |
Humidity resolution | 0.1% RH |
Operating voltage | 3.3–5.5V |
Interface | Single-wire digital |
Typical sampling interval | About 2 seconds |
Output | Digital |
These specifications are consistent with published DHT22/AM2302 documentation and module specifications.
One important point is that the DHT22 is not designed for high-speed measurements. Its recommended measurement interval is approximately two seconds, which is generally sufficient for environmental monitoring applications.
How Does the DHT22 Work?
The DHT22 measures temperature and humidity internally and then sends the results to a connected microcontroller using a digital single-wire communication protocol.
The basic process is:
Environment → DHT22 sensing elements → Internal processing → Digital data → Microcontroller
For example, an ESP32 can request a measurement from the sensor. The DHT22 then returns the temperature and humidity values digitally through its data pin.
This means you don't need to build a separate analog-to-digital conversion circuit for the sensor output.
The sensor is factory calibrated, with calibration information stored internally, allowing the module to provide calibrated digital readings.
DHT22 Pin Configuration
A typical three-pin DHT22 module has the following connections:
Pin | Function |
|---|---|
VCC | Power supply |
OUT/DATA | Digital data signal |
GND | Ground |
The Component Wala module uses this three-pin configuration.
Basic DHT22 Wiring
For a typical Arduino or ESP32 project:
DHT22 VCC → Development board power
DHT22 OUT/DATA → Digital GPIO pin
DHT22 GND → GND
Many DHT22 breakout modules include the required pull-up circuitry on the board. For a bare DHT22 sensor, however, the data line may require an external pull-up resistor.
DHT22 with Arduino
One of the most common uses of the DHT22 is measuring environmental conditions with an Arduino.
A simple Arduino project can use the sensor to:
- Read the current temperature.
- Read relative humidity.
- Display the values on an LCD or OLED.
- Send the readings to a computer.
- Trigger another device when a temperature or humidity threshold is reached.
For example, you could build a room-monitoring system that displays:
Temperature: 26.4°C
Humidity: 58.2% RH
The DHT22's digital interface makes it convenient for these types of microcontroller projects.
DHT22 with ESP32
The DHT22 is also commonly paired with the ESP32 for IoT applications.
The ESP32 can read the sensor and then send the measurements over Wi-Fi to:
- A web dashboard
- A mobile application
- An IoT cloud platform
- A database
- A home automation system
This makes the DHT22 useful for creating connected environmental monitoring devices.
For example, an ESP32 + DHT22 project could periodically measure greenhouse temperature and humidity and upload the readings to an online dashboard.
DHT22 vs DHT11
If you're deciding between the DHT11 and DHT22, the DHT22 is generally the better choice when you need a wider measurement range and improved accuracy.
Feature | DHT11 | DHT22 |
|---|---|---|
Temperature range | Approximately 0–50°C | -40–80°C |
Temperature accuracy | Around ±2°C | Around ±0.5°C |
Humidity range | Approximately 20–80% RH | Up to 100% RH |
Humidity accuracy | Around ±5% RH | Around ±2% RH |
Resolution | Lower | 0.1°C / 0.1% RH |
Measurement interval | Faster | About 2 seconds |
The DHT22 therefore makes more sense for applications where measurement range and accuracy are more important than the lowest possible component cost.
Applications of DHT22 Temperature and Humidity Sensor
The DHT22 can be used in many electronics and IoT projects.
1. Weather Stations
A DHT22 can measure environmental temperature and humidity for a basic DIY weather station.
Combine it with an Arduino or ESP32 and a display to create a standalone weather monitoring device.
2. Greenhouse Monitoring
Plants can be sensitive to environmental conditions. A DHT22 can monitor greenhouse temperature and humidity and provide data that can be used to control fans, ventilation, or other equipment.
3. Home Automation
The sensor can be incorporated into smart-home systems to monitor indoor environmental conditions.
For example, an automation system could turn on a fan when the temperature exceeds a defined threshold.
4. IoT Projects
When combined with an ESP32 or similar Wi-Fi-enabled board, the DHT22 can become part of a connected environmental monitoring system.
Measurements can be transmitted to a server or cloud platform for remote monitoring.
5. Environmental Monitoring
The sensor can be used for monitoring temperature and humidity in rooms, storage areas, laboratories, and other environments where basic environmental data is required.
6. Educational and STEM Projects
Because the DHT22 uses a relatively simple digital interface, it is also suitable for electronics learning and STEM projects.
Students can use it to learn about:
- Sensors
- Microcontrollers
- Digital communication
- Data logging
- IoT
- Automation
The Component Wala product page also lists weather stations, home automation, temperature monitoring, humidity monitoring, environmental monitoring, IoT, and educational projects among its applications.
Advantages of the DHT22 Sensor
There are several reasons why the DHT22 remains popular among electronics enthusiasts and developers.
Digital Output
The sensor provides digital readings rather than requiring an analog measurement circuit.
Measures Two Parameters
One module provides both temperature and relative humidity measurements.
Wide Temperature Range
With a typical operating measurement range from -40°C to +80°C, it can be used in a wider range of environments than the DHT11.
Good Accuracy
The commonly specified accuracy is approximately ±0.5°C for temperature and ±2% RH for humidity under specified conditions.
Simple Wiring
The three-pin module configuration makes it convenient to connect to popular development boards.
Low Power Requirements
The DHT22 is suitable for many low-power monitoring applications, although system-level power consumption will also depend on the microcontroller and other components.
Things to Consider Before Using a DHT22
Although the DHT22 is easy to use, it isn't suitable for every application.
It Is Relatively Slow
The sensor should generally not be read more frequently than approximately once every two seconds.
Therefore, it isn't ideal for applications requiring rapid temperature or humidity updates.
Installation Matters
Sensor placement can influence measurements. Avoid placing the sensor directly next to heat-generating components such as voltage regulators, processors, or power devices.
Avoid Condensation
The published accuracy specifications are based on particular environmental conditions, and condensation or extreme conditions can affect sensor performance.
Cable Length Can Matter
Long connections can make the digital communication signal more difficult to maintain reliably. Proper wiring and pull-up configuration become increasingly important as cable length increases.
Why Choose a DHT22 Module for Your Project?
If your project needs a straightforward way to measure temperature and humidity, the DHT22 provides a practical combination of accuracy, measurement range, digital communication, and ease of integration.
It is particularly useful when a DHT11 doesn't provide enough range or accuracy but a more advanced environmental sensor would be unnecessary.
For Arduino prototypes, ESP32 IoT projects, greenhouse monitoring systems, weather stations, and educational electronics projects, the DHT22 can be a useful addition to your component collection.
Buy DHT22 Temperature and Humidity Sensor Module
Looking for a DHT22 module for your next electronics or IoT project?
The DHT22 Temperature and Humidity Sensor Module from Component Wala provides temperature and humidity measurement with a simple three-pin interface and is designed for easy integration with Arduino, ESP32, Raspberry Pi, and other microcontroller platforms. The product is currently listed at ₹125, with the product page showing it as in stock.
Buy the DHT22 Temperature and Humidity Sensor Module from Component Wala
Frequently Asked Questions
What is a DHT22 sensor used for?
The DHT22 is used to measure temperature and relative humidity. It is commonly used in weather stations, environmental monitoring systems, greenhouse projects, home automation, and IoT devices.
Is DHT22 better than DHT11?
For many applications, yes. The DHT22 generally offers a wider temperature range, better temperature and humidity accuracy, and finer resolution than the DHT11.
Can I use DHT22 with Arduino?
Yes. The DHT22 can be connected to an Arduino through its digital data pin and is widely used in Arduino temperature and humidity projects.
Can DHT22 work with ESP32?
Yes. The DHT22 can be connected to an ESP32 and used for both local environmental monitoring and Wi-Fi-based IoT applications.
How often can DHT22 take measurements?
The typical recommended measurement interval is approximately 2 seconds. It is therefore better suited to environmental monitoring than high-speed sensing applications.
Is DHT22 a digital or analog sensor?
The DHT22 is a digital sensor. It sends temperature and humidity measurements through a digital single-wire interface.
What is the difference between DHT22 and AM2302?
DHT22 and AM2302 are commonly used names for the same sensor family/device. The AM2302 designation is especially common for packaged or wired versions of the DHT22.
Final takeaway
The DHT22 Temperature and Humidity Sensor Module is a practical choice for projects that need reliable digital temperature and humidity measurements without complicated circuitry. Its wide temperature range, good accuracy, simple three-pin connection, and compatibility with popular microcontrollers make it particularly useful for Arduino, ESP32, IoT, weather monitoring, greenhouse, automation, and STEM projects.
For a ready-to-use module, you can explore the DHT22 Temperature and Humidity Sensor Module at Component Wala.
Related products
Components that pair well with this guide.




