AHT20 temperature and humidity sensor
Small, cheap I2C humidity sensor, a good DHT replacement.
MeasuresTemperature and relative humidity
Accuracy±0.3 °C, ±2 % RH
InterfaceI2C
I2C address0x38
SensorsReviewedMPN AHT20Used in 18 projects
In short
What is the AHT20 temperature and humidity sensor and what is it used for?
Small, cheap I2C humidity sensor, a good DHT replacement. Makers use it for room monitors.
How it works
A capacitive humidity element and temperature sensor are read by an on-chip ADC and calibrated at the factory.
Key specifications
| Sensor spec | Value |
|---|---|
| Measures | Temperature and relative humidity |
| Accuracy | ±0.3 °C, ±2 % RH |
| Interface | I2C |
| I2C address | 0x38 |
| Supply voltage | 2.0 to 5.5 V |
Pinout
VIN2 to 5.5 V
GNDGround
SCLI2C clock
SDAI2C data
How to use it
Use the Adafruit AHTX0 library at address 0x38. Mount it away from the microcontroller and regulator. AHT20 boards are often combined with a BMP280 on one module to add pressure.
Applications
Room monitors
Builds that use it
Guided build
VOC and eCO2 desk sensor
Guided build
Room temperature and humidity logger with SD card
Guided build
Battery life calculator lab for sensor nodes
Guided build
Monsoon clothes drying rack fan
Guided build
Solar spice and fruit dryer fan control
Guided build
Grain storage temperature and moisture probe
Guided build
Onion storage ventilation controller
Guided build
Bathroom exhaust fan on humidity
Showing 8 of 18
Alternatives
- SHT31 temperature and humidity sensorSlightly better long-term stability
- DHT22 SensorOlder single-wire option
Common questions
What is the AHT20 temperature and humidity sensor used for?
In maker projects: room monitors.
How does the AHT20 temperature and humidity sensor work?
A capacitive humidity element and temperature sensor are read by an on-chip ADC and calibrated at the factory.
What voltage does the AHT20 temperature and humidity sensor need?
2.0 to 5.5 V.
How do I connect the AHT20 temperature and humidity sensor to an Arduino or ESP32?
I2C. Pins: VIN (2 to 5.5 V), GND (Ground), SCL (I2C clock), SDA (I2C data).
What can I use instead of the AHT20 temperature and humidity sensor?
SHT31 temperature and humidity sensor and DHT22 Sensor.
