SHT31

A Sensirion SHT31 breakout that reads relative humidity and temperature over I2C with ±2 %RH and ±0.2 °C typical accuracy.

  • Supply voltage2.15 V to 5.5 V (3.3 V typical)
  • Absolute maximum-0.3 V to 6 V on VDD; SDA, SCL, ADDR, ALERT at most VDD + 0.3 V
  • I2C address0x44 (ADDR low, default) or 0x45 (ADDR high)
  • I2C clockUp to 1000 kHz
SHT31, A Sensirion SHT31 breakout that reads relative humidity and temperature over I2C with ±2 %RH and ±0.2 °C typical accuracy.
In short

The SHT31 is Sensirion's digital humidity and temperature sensor, typically accurate to ±2 %RH and ±0.2 °C from 0 to 90 °C, running from 2.15 V to 5.5 V (Sensirion SHT3x-DIS datasheet v7, pp. 2, 6). It talks I2C at address 0x44, or 0x45 with ADDR tied high (p. 9). The Adafruit SHT31-D breakout has no regulator: power VIN from your board's logic voltage (5V on an Uno, 3.3 V on an ESP32 or Pico), because its 10 kΩ SDA and SCL pull-ups go to VIN.

The SHT31 is the middle grade of Sensirion's SHT3x family: the SHT30 is cheaper and looser, the SHT35 tighter. It reports humidity across 0 to 100 %RH with 0.01 %RH resolution and temperature from -40 to 125 °C, with a typical accuracy of ±2 %RH and ±0.2 °C between 0 and 90 °C (Sensirion datasheet v7, p. 2). Each sensor is calibrated and linearized at the factory, and every reading arrives with a CRC byte.

Unlike most humidity chips, the SHT31 runs directly from 2.15 V to 5.5 V (p. 6), so the Adafruit SHT31-D breakout skips the regulator and level shifter: VIN powers the chip and pulls SDA and SCL up through 10 kΩ, which puts the I2C lines at whatever voltage you feed VIN (Adafruit SHT31-D guide, pp. 6 to 7). Feed it the same voltage your microcontroller's pins use.

A high-repeatability measurement takes 12.5 ms typical and 15 ms at most (p. 7). Between measurements the chip idles at 0.2 µA typical, so it suits battery loggers. An on-chip heater (3.6 to 33 mW, p. 6) can drive off condensation or test that the sensor responds; it also warms the die, so temperature reads high while it is on.

SHT31 pinout

tinkered.ai/components/sht31SHT31VINPowerGNDGroundSCLI2C SCLSDAI2C SDAADRI2C address selectALRAlert interruptRSTReset (active low)
PinFunctionType
VINVIN2.5 V to 5 V, equal to your board's logic levelpower in
GNDGNDpower in
SCLI2C SCLPulled up to VIN through 10 kΩinput
SDAI2C SDAPulled up to VIN through 10 kΩbidirectional
ADRI2C address selectinput
ALRAlert interruptoutput
RSTReset (active low)input

How to wire the SHT31

Pin by pin, for the board you have.

SHT31Arduino UnoNote
VIN5V
GNDGND
SCLA5
SDAA4
Design this circuit on an Arduino Uno

SHT31 code

Every example here compiles for its board.

Libraries: adafruit/Adafruit SHT31 Library
// SHT31 on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/sht31
// SHT31 on an Arduino Uno: VIN 5V, SDA A4, SCL A5, address 0x44
#include <Wire.h>
#include <Adafruit_SHT31.h>

Adafruit_SHT31 sht31;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  if (!sht31.begin(0x44)) {
    Serial.println("SHT31 not found at 0x44. Check wiring and ADR.");
    while (true) delay(10);
  }
  sht31.heater(false);
  Serial.println("SHT31 ready");
}

void loop() {
  float tempC, humidity;
  if (sht31.readBoth(&tempC, &humidity)) {
    Serial.print("Temperature: ");
    Serial.print(tempC, 2);
    Serial.print(" C   Humidity: ");
    Serial.print(humidity, 2);
    Serial.println(" %RH");
  } else {
    Serial.println("Read failed (CRC or bus error)");
  }
  delay(2000);
}
Compiled for arduino:avr:uno on 2026-10-30

Before you wire it

Do
  • Power VIN from the same voltage your board's I/O uses (5V on an Uno, 3.3 V on an ESP32 or Pico): the breakout's 10 kΩ pull-ups tie SDA and SCL to VIN (Adafruit SHT31-D guide, p. 6).
  • Leave ADR unconnected for address 0x44, or tie it to VIN for 0x45 so two sensors can share one bus (Sensirion datasheet, p. 9).
  • Keep the sensor away from the board's regulator and the microcontroller, and give it airflow: humidity takes 8 s to reach 63 % of a step even at 1 m/s (datasheet, p. 2).
  • Switch the heater off before logging temperature; it dissipates up to 33 mW (p. 6) and warms the die.
Don’t
  • Never feed VIN from 5 V when the board is an ESP32 or a Pico: the I2C lines would sit at 5 V.
  • Never exceed 6 V on VIN, the absolute maximum (datasheet, p. 7).
  • Never cover the sensor opening with conformal coat, glue or tape: Sensirion warns that out-gassing tapes and adhesives make the humidity reading drift (p. 2).
  • The SHT31 needs no regulator: it runs from 2.15 V to 5.5 V (datasheet, p. 6), so the breakout passes VIN straight to the chip.
  • SDA and SCL already have 10 kΩ pull-ups to VIN on the breakout. With several I2C boards on one bus the pull-ups add in parallel; above three or four boards, remove some or check the rise time.
  • The I2C bus may run up to 1000 kHz (p. 8); the default 100 kHz of every Arduino core is fine.
  • ALR is an alert output you can program with humidity and temperature limits; leave it unconnected if you only poll.
  • The 0x44 and 0x45 addresses are the only two, so a third SHT31 needs an I2C multiplexer or a second bus.

Specifications

Supply voltage
2.15 V to 5.5 V (3.3 V typical)Sensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 6
Absolute maximum
-0.3 V to 6 V on VDD; SDA, SCL, ADDR, ALERT at most VDD + 0.3 VSensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 7
I2C address
0x44 (ADDR low, default) or 0x45 (ADDR high)Sensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 9
I2C clock
Up to 1000 kHzSensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 8
Humidity accuracy (SHT31)
±2 %RH typical, 0.01 %RH resolution, 0 to 100 %RH specified rangeSensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 2
Temperature accuracy (SHT31)
±0.2 °C typical from 0 to 90 °C; specified range -40 to 125 °CSensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 2
Humidity response time
8 s to 63 % of a step (25 °C, 1 m/s airflow)Sensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 2
Supply current
0.2 µA typical idle (single shot), 600 µA typical while measuring (1500 µA max)Sensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 6
Measurement time
12.5 ms typical, 15 ms max at high repeatabilitySensirion SHT3x-DIS datasheet v7 (Dec 2022), p. 7
Breakout pull-ups
10 kΩ from SDA and SCL to VIN; ADR pulled down (0x44); RST pulled upAdafruit SHT31-D breakout guide (PDF), pp. 6 to 7

From the SHT3x-DIS datasheet, version 7, published by Sensirion.

Common mistakes

  1. Powering the breakout from 5 V on a 3.3 V board

    This board has no level shifter: its pull-ups go to VIN. Wire VIN to 5 V on an ESP32 or Pico and SDA and SCL idle at 5 V on 3.3 V pins. Use the board's 3.3 V pin instead.

  2. Mounting it next to something warm

    A sensor taped to the back of an ESP32 or a regulator reads several degrees high and its relative humidity low, since RH falls as the air around the die warms. Put it on a short cable or at the edge of the enclosure, in moving air.

  3. Leaving the heater on

    The heater is for de-fogging and self-test. If a reading looks too warm and too dry, call heater(false) and check isHeaterEnabled().

  4. Scanning for 0x40 or 0x76

    Those are other sensors' addresses. The SHT31 answers only at 0x44 (ADR low) or 0x45 (ADR high), per the datasheet, p. 9.

SHT31 questions

What is the SHT31's I2C address?

0x44 by default, with ADR low; tie ADR to VIN and it moves to 0x45 (Sensirion datasheet v7, p. 9). The Adafruit breakout pulls ADR low through 10 kΩ, so it answers at 0x44 out of the box.

Does the SHT31 work at 5 V?

Yes. The chip runs from 2.15 V to 5.5 V (datasheet, p. 6), so on an Uno you can power the breakout from 5V. On a 3.3 V board, power it from 3.3 V instead, because the I2C pull-ups follow VIN.

SHT31 or DHT22?

The SHT31 is the better sensor: ±2 %RH and ±0.2 °C typical (datasheet, p. 2), a standard I2C bus with CRC-checked data, and 12.5 ms per measurement. The DHT22 uses a timing-critical one-wire protocol and allows one reading every two seconds.

What is the difference between the SHT30, SHT31 and SHT35?

The same package and commands with different accuracy grades: ±2 %RH for the SHT30 and SHT31, ±1.5 %RH for the SHT35, and ±0.2 °C for the SHT30 and SHT31 over different ranges (0 to 65 °C and 0 to 90 °C), ±0.1 °C for the SHT35 (datasheet, p. 2). Code written for one runs on the others.

Why does my humidity reading creep up after a humid night?

Long stays above 80 %RH can offset the reading temporarily, about +3 %RH after 60 hours (datasheet, p. 6). Back in 20 to 80 %RH the sensor recovers to its calibration by itself, and the heater can speed that up.

Build something with the SHT31

  • Room climate logger

    Log temperature and humidity every minute and show the latest values on an OLED.

    Build this
  • Bathroom fan controller

    Switch an extractor fan through a relay when humidity rises above a threshold.

    Build this
  • Two-zone humidity comparison

    Run two SHT31s at 0x44 and 0x45 to compare indoors with a closet or a grow box.

    Build this
For AI assistants

This page as plain Markdown, for ChatGPT, Claude or your own agent. /components/sht31.md

What will you build with it?