Comparison · Intermediate · 3 min read
SHT3x, SHT4x and Digital Humidity Sensors
Choosing and Using Them
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
Sensirion SHT3x and SHT4x chips give accurate temperature and relative humidity over I2C and are a big step up from the DHT11. SHT31 and SHT4x boards are the usual choice for weather stations, greenhouses and data loggers. Keep the sensor in moving air away from heat, and avoid condensation for long periods.
Key specs at a glance
- SHT30 / SHT31 / SHT35
- I2C 0x44 or 0x45, ±3 %, ±2 %, ±1.5 %RH typical, built-in heater
- SHT40 / SHT41 / SHT45
- Newer low-power family, better accuracy, smaller
- HDC1080 / HTU21D
- Alternative I2C humidity chips with similar use
- DHT22
- Single-wire, slower and less accurate
- Supply
- 2.15 to 5.5 V on SHT3x; breakout boards often add regulators
- Response time
- Several seconds, slower in still air
Why choose an SHT sensor
Humidity sensors drift and are easily contaminated by dust, solvents and long exposure to condensation. Sensirion's SHT family is factory calibrated, stable and well documented, and is widely used in weather stations, HVAC and greenhouse control. Compared with the DHT11 and DHT22, the I2C interface is faster, more accurate and easier to share with other sensors.
SHT3x vs SHT4x
The two families work the same way. Choose by size and accuracy.
| Family | Typical accuracy | Notes |
|---|---|---|
| SHT30 | ±3 %RH, ±0.2 °C | Entry level, common on cheap breakouts |
| SHT31 | ±2 %RH, ±0.2 °C | Most popular; heater option |
| SHT35 | ±1.5 %RH | Precision version |
| SHT40 / SHT41 / SHT45 | Better accuracy as the number rises | Smaller, lower power, newer design |
- SHT30
- Typical accuracy:
- ±3 %RH, ±0.2 °C
- Notes:
- Entry level, common on cheap breakouts
- SHT31
- Typical accuracy:
- ±2 %RH, ±0.2 °C
- Notes:
- Most popular; heater option
- SHT35
- Typical accuracy:
- ±1.5 %RH
- Notes:
- Precision version
- SHT40 / SHT41 / SHT45
- Typical accuracy:
- Better accuracy as the number rises
- Notes:
- Smaller, lower power, newer design
Reading an SHT31 on Arduino
Use the Adafruit SHT31 library, or the sketch below if you prefer plain I2C. The address is 0x44 when the ADDR pin is low, and 0x45 when it is high.
#include <Wire.h>
const uint8_t ADDR = 0x44;
void setup() { Serial.begin(115200); Wire.begin(); }
void loop() {
Wire.beginTransmission(ADDR);
Wire.write(0x24); Wire.write(0x00); // single shot, high repeatability
Wire.endTransmission();
delay(20);
Wire.requestFrom(ADDR, (uint8_t)6);
uint8_t d[6];
for (int i = 0; i < 6; i++) d[i] = Wire.read();
float t = -45.0 + 175.0 * ((d[0] << 8) | d[1]) / 65535.0;
float rh = 100.0 * ((d[3] << 8) | d[4]) / 65535.0;
Serial.print(t); Serial.print(" C "); Serial.print(rh); Serial.println(" %");
delay(1000);
}Placement and care
- Mount it away from the board's regulator, display and any hot component, which warm the sensor and lower the humidity reading.
- Let air flow over it; a sealed box with the sensor inside will read wrongly.
- Use the built-in heater briefly to drive off condensation, then wait for it to cool before logging.
- Keep it clear of solvents, glue fumes and cleaners that damage the sensing layer.
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Mounting the sensor next to a heat source.
- Using a sealed enclosure with no airflow.
- Putting the sensor in condensing conditions without a protective cap.
- Forgetting that two sensors on the same address will clash.
- Reading before the first measurement has finished.
Frequently asked questions
What is the SHT31 I2C address?
0x44 by default, or 0x45 when the ADDR pin is high.
Is SHT31 better than DHT22?
Yes for accuracy, speed and bus sharing. The DHT22 is a single-wire sensor that is simpler but less accurate.
What is the heater for?
To warm the sensor and drive off condensation so it can recover in damp conditions.
Can I use it outdoors?
Yes in a ventilated radiation shield with a PTFE membrane cap to keep dust and water away.
SHT31 or SHT41?
SHT4x is newer and smaller and uses less power. SHT31 has more ready-made modules and libraries.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 167 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




