FREE SHIPPING for all orders over $40
The DHT22 AM2302 temperature and air humidity sensor is a low-cost digital environmental sensor for microcontroller projects that need reliable indoor climate readings. It combines a capacitive humidity element and temperature measurement circuit, then outputs calibrated data over a single digital signal line so the host system does not need analog inputs.
This product is well suited for smart-home nodes, greenhouse monitoring, weather stations, HVAC experiments, and learning projects. It can be wired to Arduino-compatible boards like the ELAB Nano V3, Pico-class hosts like the Raspberry Pi Pico W, or quick prototypes using an MB 102 Breadboard Kit. If a project needs pressure and gas trend sensing as well, the BME680 Sensor Board is a useful upgrade path.
The DHT22/AM2302 works with 3.3V and 5V controller ecosystems and is intended for slow environmental readings with a typical two-second sampling interval. For best results, place it where air can circulate and keep it away from direct heat sources, water droplets, and enclosed hot electronics.
| Parameter | Value |
|---|---|
| SKU | TB-DHT22-Sensor |
| Model | DHT22 / AM2302 |
| Sensor Element | Capacitive humidity sensor and temperature measurement element |
| Output Signal | Digital single-bus signal |
| Supply Voltage | 3.3V-6V DC |
| Humidity Range | 0-100% RH |
| Temperature Range | -40C to +80C |
| Humidity Accuracy | Approx. +/-2% to +/-5% RH depending on conditions |
| Temperature Accuracy | Approx. +/-0.5C |
| Resolution | 0.1C and 0.1% RH |
| Detection Period | 2 seconds |
| Signal Pins | VCC, DATA, GND depending on package/module format |
| Typical Applications | Weather stations, air humidity monitoring, greenhouse logging, room comfort sensing |
Print temperature and humidity through the serial monitor.
#include DHT dht(2, DHT22);void setup() { Serial.begin(115200); dht.begin();}void loop() { Serial.print(“T=”); Serial.print(dht.readTemperature()); Serial.print(“C H=”); Serial.println(dht.readHumidity()); delay(2000);}
Turn on an alarm output when humidity drops below a target level.
#include DHT dht(2, DHT22);const int alarmPin = 8;void setup() { pinMode(alarmPin, OUTPUT); dht.begin();}void loop() { float humidity = dht.readHumidity(); digitalWrite(alarmPin, humidity < 45.0 ? HIGH : LOW); delay(2000);}
Read DHT22 values from an ESP32 running MicroPython.
import dhtfrom machine import Pinimport timesensor = dht.DHT22(Pin(15))while True: sensor.measure() print(“C:”, sensor.temperature(), “RH:”, sensor.humidity()) time.sleep(2)
Write repeated readings to a CSV file for trend review.
import timeimport boardimport adafruit_dhtsensor = adafruit_dht.DHT22(board.D4)with open(“climate.csv”, “a”, encoding=”utf-8″) as f: while True: try: f.write(f”{time.time():.0f},{sensor.temperature},{sensor.humidity}”) f.flush() except RuntimeError: pass time.sleep(2)
Q: Is this the same sensor family as AM2302?
A: Yes. DHT22 and AM2302 are commonly used names for this digital temperature and humidity sensor family.
Q: Does it need an analog pin?
A: No. It uses a digital single-bus output.
Q: What voltage can I use?
A: The current listing specifies 3.3V to 6V DC.
Q: How fast can it update?
A: Use a two-second reading interval.
Q: Can I use it for outdoor weather?
A: Yes for protected weather-station experiments, but shield it from rain and direct sun.
Q: Why do I get NaN or failed reads?
A: Check timing, wiring, pull-up resistor, library selection, and cable length.
Q: Is it calibrated?
A: It outputs calibrated digital readings suitable for hobby and education use.
Q: Can it measure soil moisture?
A: No. It measures air humidity, not soil moisture.
Only logged in customers who have purchased this product may leave a review.