The DHT20 is a calibrated temperature and humidity sensor in the familiar 4-pin DHT housing, with a digital I2C output instead of the DHT11's single-wire signal. It runs on 3.3V or 5V, sits at I2C address 0x38 and reads with standard Arduino, ESP32, ESPHome and Raspberry Pi libraries. If you want a single data wire instead, see our DHT22 / AM2302 module with the pull-up fitted, or the low-cost bare DHT11.
Specifications
Datasheets
What's in the box
Bare 4-pin sensor in an anti-static bag. Pull-up resistors and wires are not included.
Great for
Wiring & getting started
- Find the pins
Hold the sensor with the vented grille towards you and the pins pointing down. From left to right the pins are 1 VDD, 2 SDA, 3 GND and 4 SCL. SDA and SCL are not side by side, so check them twice.
- Power it from your board's logic voltage
On an Arduino Uno or Nano connect VDD to 5V, SDA to A4 and SCL to A5. On an ESP32 connect VDD to 3.3V, SDA to GPIO21 and SCL to GPIO22. GND goes to GND on both.
- Add pull-ups if the bus needs them
If nothing else on the I2C bus has pull-up resistors, fit 4.7k from SDA to VDD and from SCL to VDD. A 100nF capacitor across VDD and GND, close to the sensor, keeps the supply clean.
- Read it
In the Arduino IDE install the DHT20 library by Rob Tillaart, or Adafruit AHTX0, and open its example. In ESPHome use the aht10 platform with variant AHT20. Wait at least 2 seconds between readings.
Note: The DHT20 uses I2C, so it is not a drop-in swap for a DHT11 or DHT22 in existing code or wiring. Hand solder only, briefly, and give the sensor a day or two in normal room air afterwards before trusting the humidity reading.
