Skip to content
SensorsTemperature & Humidity

SHT31-D High-Accuracy Humidity Sensor

Lab-grade Sensirion sensor for precision climate logging.

Wiring & code for

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.

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.

Swipe sideways to see every column →

C++
  • 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.
View full Arduino Uno guide