HTU21D Humidity Sensor Hookup Guide
This Tutorial is Retired!
The HTU21D has been retired from the SparkFun catalog. We recommend looking at the Si7021 which is a drop in replacement for the HTU21D.
View the updated tutorial: Si7021 Humidity and Temperature Sensor Hookup Guide
HTU21D Overview
The HTU21D is a low-cost, easy to use, highly accurate, digital humidity sensor. All you need is two lines for I2C communication and you’ll have relative humidity readings such as “45.2%” or “23.1%” and very accurate temperature readings as a bonus!
Things you should know about this sensor:
- Uses the I2C interface
- Typical humidity accuracy of ±2%
- Typical temperature accuracy of ±0.3C
- Operates from 0 to 100% humidity but this sensor isn’t recommended for harsh environments where it could come in contact with water (such as rain).
- 3.3V sensor - use inline logic level converters or 10k resistors to limit 5V signals
- Here’s the datasheet
- Only one HTU21D sensor can reside on the I2C bus at a time
This sensor is ideal for environmental sensing and data logging. Perfect for a weather station or humidor control system. It is a very good replacement for digital humidity sensors such as the SHT15, SHT21, SHT25, HIH-4030, HIH6130 and capacitive humidity sensors such as the HH10D.
Suggested Reading
Things you might need to know:
- I2C Protocol
- Using the PCA9306 voltage translator
- Logic Levels
- Installing an Arduino library
- What are pull-up resistors?
- How to use a breadbaord