# HTU21D temperature and humidity sensor: specs and pinout

> A module built around the HTU21D(F) chip, a calibrated digital relative humidity sensor with a temperature output, read over I2C. The figures here…

[HTML version](https://soldr.ai/docs/components/htu21d)

[Docs](https://soldr.ai/docs) / [Components](https://soldr.ai/docs/components)

A module built around the HTU21D(F) chip, a calibrated digital relative humidity sensor with a temperature output, read over I2C. The figures here are for the chip, not the module board.

Every value cites its sourceOfficial pinout

[Buy on Compoden](https://compoden.com/products/htu21d-temperature-and-humidity-sensor-module-i2c-compoden)

## Specs

| Spec | Value | Source |
|---|---|---|
| Supply voltage (VDD) | 1.5 V to 3.6 V (3.0 V typical) | source Electrical and General Items |
| Interface and address | I2C; 7-bit device address 0x40 | source Communication / I2C device address text |
| Humidity operating range | 0 %RH to 100 %RH; stated accuracy applies between 5 %RH and 95 %RH | source Relative Humidity table |
| Humidity accuracy (25 C, 20 to 80 %RH) | plus or minus 2 %RH typical | source Relative Humidity table |
| Humidity resolution | 12 bits (0.04 %RH) or 8 bits (0.7 %RH) | source Relative Humidity table |
| Temperature operating range | -40 C to +125 C | source Temperature table |
| Temperature accuracy (25 C) | plus or minus 0.3 C typical | source Temperature table |
| Temperature resolution | 14 bits (0.01 C) or 12 bits (0.04 C) | source Temperature table |
| Supply current | 450 uA typical while measuring; 0.02 uA typical in sleep mode (VDD = 3 V) | source Electrical and General Items |
| Measuring time (14-bit temperature) | 44 ms typical, 50 ms maximum | source Temperature table |

## Power

| | Value | Source |
|---|---|---|
| Supply | 1.5 V to 3.6 V | source Electrical and General Items |
| Current | 450 uA typical while measuring (VDD = 3 V) | source Electrical and General Items |

## Pinout

The module board is not covered by an official document. Its regulator, pull-up resistors, address jumpers, level handling and header order are not documented by a source; check the printed labels on the board. The numbers on this page are for the chip.

| Pin | Function | Voltage | Notes | Source |
|---|---|---|---|---|
| 1 | DATA | | Data bit-stream (I2C data) | source Interface Specification table (6-pin DFN chip) |
| 2 | GND | | Ground | source Interface Specification table (6-pin DFN chip) |
| 3 | NC | | Must be left unconnected | source Interface Specification table (6-pin DFN chip) |
| 4 | NC | | Must be left unconnected | source Interface Specification table (6-pin DFN chip) |
| 5 | VDD | | Supply voltage | source Interface Specification table (6-pin DFN chip) |
| 6 | SCK | | Clock input | source Interface Specification table (6-pin DFN chip) |
| PAD | PAD | | Ground or unconnected | source Interface Specification table (6-pin DFN chip) |

## Build with it
Project ideas for the HTU21D temperature and humidity sensor. Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.

- [Room temperature and humidity display](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20room%20temperature%20and%20humidity%20display%20with%20an%20ESP32%2C%20an%20HTU21D%20sensor%20and%20an%20OLED%20display): The HTU21D (VDD up to 3.6 V) and the OLED share the ESP32 3.3 V I2C bus; the chip&#x27;s address is 0x40. Check on the module that the supply suits 3.3 V.
- [Dew point calculator](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20dew%20point%20display%20with%20an%20ESP32%2C%20an%20HTU21D%20sensor%20and%20an%20OLED%20display): Temperature and humidity from the chip give a computed dew point shown on the OLED. Keep readings in the 5 %RH to 95 %RH range where accuracy is specified. Learning project.
- [A humidity trend monitor for a storage box with an ESP32, an HTU21D sensor and an OLED display](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20humidity%20trend%20monitor%20for%20a%20storage%20box%20with%20an%20ESP32%2C%20an%20HTU21D%20sensor%20and%20an%20OLED%20display): The ESP32 keeps the last readings and shows the trend; an LED with a resistor lights above a humidity you set. Learning project.

## Common mistakes

- Powering the chip from 5 V: VDD is 1.5 V to 3.6 V (source: [link](https://cdn-shop.adafruit.com/datasheets/1899_HTU21D.pdf), Electrical and General Items). Check that the module board handles a higher supply before using 5 V.
- Sending commands right after power-up: the chip needs up to 15 ms to reach idle, and a soft reset at start is recommended (source: [link](https://cdn-shop.adafruit.com/datasheets/1899_HTU21D.pdf), Start-up sensor).
- Trusting readings at the humidity extremes: the stated accuracy applies between 5 %RH and 95 %RH, and condensation is outside it (source: [link](https://cdn-shop.adafruit.com/datasheets/1899_HTU21D.pdf), Relative Humidity table).

## Not covered by the official source

- TE Connectivity&#x27;s own site returned access denied, so the verbatim copy of the maker&#x27;s document on a mirror was used.
- The document is the earlier Measurement Specialties revision (HPC199_3), not a later TE revision.

## Sources

- [link](https://cdn-shop.adafruit.com/datasheets/1899_HTU21D.pdf) (HTU21D(F) Sensor Datasheet, Measurement Specialties, now TE Connectivity, HPC199_3, October 2013; verbatim maker PDF on a mirror)
