Skip to content

Sensors · Temperature & Humidity

SHT31-D High-Accuracy Humidity Sensor

Lab-grade Sensirion sensor for precision climate logging.

Updated November 14, 2026 1 board guide
SHT31-D High-Accuracy Humidity Sensor

SHT31 practical reference

A high-accuracy I2C sensor from Sensirion used in HVAC and data-logging projects where DHT-series drift is unacceptable. The SHT31-D combines a capacitive humidity sensor and a bandgap temperature sensor on a single chip with factory calibration and onboard signal conditioning, delivering lab-grade accuracy and long-term stability that far exceeds cheaper hobbyist sensors like the DHT11/DHT22 — ideal for precision climate control, weather stations, and any project where measurement drift over time is a real concern.

Key specifications

  • Sensor type: Sensirion SHT31-D capacitive humidity + bandgap temperature sensor
  • Operating voltage: 2.4V–5.5V DC
  • Operating current: ~1.5 µA idle, ~600 µA during measurement (very low average power)
  • Humidity accuracy: ±2% RH typical (0-100% RH range)
  • Temperature accuracy: ±0.2°C typical (-40°C to +125°C range)
  • Response time: ~8 seconds (humidity, 63% response)
  • Interface: I2C, up to 1MHz (fast mode plus)
  • I2C address: 0x44 (default) or 0x45, selectable via the ADDR pin
  • Additional feature: Built-in heater element for condensation removal and self-diagnostics

Pinout and connection notes

Add standard 4.7kΩ pull-up resistors on SDA/SCL if not already present on the breakout board. The ADDR pin lets two SHT31 sensors share a single I2C bus at different addresses, which is handy for differential measurements (e.g. indoor vs outdoor) in the same project.

  • VIN: Power, 2.4–5.5V DC
  • GND: Ground
  • SCL: I2C clock line
  • SDA: I2C data line
  • ADDR: I2C address select — tie LOW for 0x44, HIGH for 0x45, useful when running two SHT31 sensors on the same bus

Integration checklist

  1. Confirm the exact part number and breakout-board revision.
  2. Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
  3. Check controller pin assignments and bus address or interface mode against the example code.
  4. Power up with external loads disconnected, then test signals before full integration.
  5. If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.

Troubleshooting and reproducibility

Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.

I2C diagnostics, sampling and heater use

The SHT31 normally appears at I2C address 0x44, with 0x45 available when the address input is configured accordingly. Run an I2C scan to confirm the address, but remember that a responding address only proves that a device acknowledged; it does not prove the measurement values or wiring are correct. Check that SDA and SCL are pulled up to the controller's logic voltage and that the breakout does not pull a 3.3 V microcontroller bus up to 5 V.

Choose a repeatable measurement mode and interval for the application. High-repeatability measurements take longer and can consume more energy than low-repeatability modes. Avoid reading continuously without need; allow the sensor to complete a measurement and respect the data-sheet timing. If the sensor is mounted near a regulator, display, processor or sunlit enclosure, local heating can bias temperature readings even when the humidity element is functioning correctly.

The integrated heater is intended for limited diagnostic or condensation-related use, not continuous temperature measurement. Heating the sensor changes its local temperature and therefore affects both reported temperature and relative humidity. After heater operation, allow the sensor to return to thermal equilibrium before treating readings as ambient conditions. The SHT31 is a well-calibrated digital sensor, but it is not a substitute for a traceable reference instrument where regulated measurement accuracy is required.

Wiring & code

Board integration

Library

Adafruit SHT31 by Adafruit

Arduino IDE → Tools → Manage Libraries → search "Adafruit SHT31" → Install

Wiring

Component pinArduino Uno pinNote
VIN5V
GNDGND
SDAA4I2C data.
SCLA5I2C clock.
sketch.ino
#include <Wire.h>
#include "Adafruit_SHT31.h"

Adafruit_SHT31 sht31 = Adafruit_SHT31();

void setup() {
  Serial.begin(9600);
  if (!sht31.begin(0x44)) { // default I2C address
    Serial.println(F("SHT31 not found — check wiring"));
    while (1);
  }
}

void loop() {
  float tempC = sht31.readTemperature();
  float humidity = sht31.readHumidity();

  if (!isnan(tempC) && !isnan(humidity)) {
    Serial.print(F("Temp: ")); Serial.print(tempC);
    Serial.print(F("C  Humidity: ")); Serial.print(humidity);
    Serial.println(F("%"));
  } else {
    Serial.println(F("Failed to read SHT31"));
  }
  delay(1000);
}
  • Noticeably more accurate than a DHT11/DHT22 (±0.3°C, ±2% RH vs the DHT's wider tolerances), and I2C instead of the DHT's finicky single-wire protocol — a solid upgrade if a project has outgrown a DHT sensor.
  • Address pin (ADDR) selects 0x44 (default, unconnected/GND) or 0x45 (tied to VCC) — handy for running two on one bus.
  • Unlike the DHT11/22, this can be read as fast as you like with no minimum polling interval.

Step-by-step

Board guides