SHT40

A Sensirion SHT40 (SHT4x family) breakout that reads humidity and temperature over I2C with ±1.8 %RH and ±0.2 °C typical accuracy at microamp currents.

  • Chip supply1.08 V to 3.6 V (3.3 V typical)
  • Pin voltage limit-0.3 V to VDD + 0.3 V on any pin
  • I2C address0x44 (SHT40-AD1B, the common part); 0x45 on SHT40-BD1B
  • Humidity accuracySHT40 and SHT41 ±1.8 %RH typical; SHT45 ±1.5 %RH; 0 to 100 %RH
SHT40, A Sensirion SHT40 (SHT4x family) breakout that reads humidity and temperature over I2C with ±1.8 %RH and ±0.2 °C typical accuracy at microamp currents.
In short

The SHT40 is Sensirion's fourth-generation humidity and temperature sensor: ±1.8 %RH and ±0.2 °C typical, 0 to 100 %RH and -40 to 125 °C, drawing 0.4 µA on average at one reading per second (Sensirion SHT4x datasheet v1, pp. 1, 4 to 5). The chip runs from 1.08 V to 3.6 V and answers at I2C address 0x44 (0x45 on the SHT40-BD1B) (pp. 1, 7). The Adafruit breakout adds a regulator and level shifting, so VIN takes 3 V or 5 V.

The SHT4x family replaced the SHT3x with a smaller package, a lower supply range and lower current. The SHT40 is the base grade at ±1.8 %RH and ±0.2 °C typical; the SHT41 keeps the same typical accuracy with a tighter maximum, and the SHT45 reaches ±1.5 %RH and ±0.1 °C (Sensirion datasheet v1, pp. 4 to 5; Adafruit guide, p. 3). All share the same pins, commands and code.

It is built for battery work: 80 nA idle, 350 µA while measuring and 0.4 µA averaged at one reading per second, with a high-precision measurement taking 6.9 ms typical and 8.2 ms at most (pp. 1, 7 to 8). Humidity responds in 6 s and temperature in 2 s to 63 % of a step (pp. 4 to 5).

A built-in heater offers 20, 110 or 200 mW pulses of 0.1 s or 1 s to drive off condensation or creeping offsets, with a maximum on-time of 1 s (pp. 10 to 11). Because the chip is a 3.6 V part, the Adafruit breakout includes a regulator and level shifting so 5 V boards can use it directly (Adafruit guide, pp. 5 to 6).

SHT40 pinout

tinkered.ai/components/sht40SHT40VINPower3VPowerGNDGroundSCLI2C SCLSDAI2C SDA
PinFunctionType
VINVIN3 V to 5 V, equal to your board's logic levelpower in
3V3V3.3 Vpower out
GNDGNDpower in
SCLI2C SCLLevel shifted to VINinput
SDAI2C SDALevel shifted to VINbidirectional

How to wire the SHT40

Pin by pin, for the board you have.

SHT40Arduino UnoNote
VIN5V
GNDGND
SCLA5
SDAA4
  • This assumes a breakout with a regulator and level shifter, like Adafruit's. A bare SHT4x board is a 3.6 V part (datasheet, p. 7): power it from 3.3V and use a level shifter on SDA and SCL.
Design this circuit on an Arduino Uno

SHT40 code

Every example here compiles for its board.

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

Adafruit_SHT4x sht4;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  if (!sht4.begin(&Wire)) {
    Serial.println("SHT4x not found at 0x44. Check wiring.");
    while (true) delay(10);
  }
  Serial.print("SHT4x serial number 0x");
  Serial.println(sht4.readSerial(), HEX);
  sht4.setPrecision(SHT4X_HIGH_PRECISION);  // 8.2 ms max per reading
  sht4.setHeater(SHT4X_NO_HEATER);
}

void loop() {
  sensors_event_t humidity, temp;
  sht4.getEvent(&humidity, &temp);
  Serial.print("Temperature: ");
  Serial.print(temp.temperature, 2);
  Serial.print(" C   Humidity: ");
  Serial.print(humidity.relative_humidity, 2);
  Serial.println(" %RH");
  delay(2000);
}
Compiled for arduino:avr:uno on 2026-10-30

Before you wire it

Do
  • Check the order code if a second sensor must share the bus: the AD1B parts answer at 0x44 and the BD1B at 0x45 (datasheet, p. 1).
  • Keep the heater off while logging, and never leave it on for more than 1 s at a time (p. 11).
  • Put the sensor where air moves and away from the regulator and microcontroller; humidity needs 6 s to reach 63 % of a step (p. 4).
  • Power a bare SHT4x board (no regulator) from 3.3 V or less: the chip's range ends at 3.6 V (p. 7).
Don’t
  • Never put 5 V on a bare SHT4x chip or its pins; pins are limited to VDD + 0.3 V (p. 8).
  • Never seal the sensor opening with glue, coating or tape: solvents and out-gassing shift humidity readings (p. 4).
  • Never run the 200 mW heater continuously; it is meant for short pulses (pp. 10 to 11).
  • Every reading arrives with a CRC; the library checks it and returns calibrated values in °C and %RH.
  • The heater pulses combine with a high-precision measurement at the end of the pulse (p. 10), useful to test that the sensor still responds.
  • At 0.4 µA average (p. 1), the sensor's own draw is negligible next to the breakout's regulator and power LED; a coin-cell design should use the bare chip.
  • The SHT4x tolerates condensing conditions and recovers (p. 1), but a wet sensor reads 100 %RH until it dries.

Specifications

Chip supply
1.08 V to 3.6 V (3.3 V typical)Sensirion SHT4x datasheet v1 (Oct 2020), p. 7
Pin voltage limit
-0.3 V to VDD + 0.3 V on any pinSensirion SHT4x datasheet v1 (Oct 2020), p. 8
I2C address
0x44 (SHT40-AD1B, the common part); 0x45 on SHT40-BD1BSensirion SHT4x datasheet v1 (Oct 2020), p. 1
Humidity accuracy
SHT40 and SHT41 ±1.8 %RH typical; SHT45 ±1.5 %RH; 0 to 100 %RHSensirion SHT4x datasheet v1 (Oct 2020), p. 4
Temperature accuracy
SHT40 and SHT41 ±0.2 °C typical; SHT45 ±0.1 °C; -40 to 125 °CSensirion SHT4x datasheet v1 (Oct 2020), p. 5
Response time
6 s humidity, 2 s temperature (to 63 %)Sensirion SHT4x datasheet v1 (Oct 2020), pp. 4 to 5
Current
80 nA idle, 350 µA measuring, 0.4 µA average at 1 HzSensirion SHT4x datasheet v1 (Oct 2020), pp. 1, 7
Measurement time
High precision 6.9 ms typical, 8.2 ms max; low precision 1.3 ms typicalSensirion SHT4x datasheet v1 (Oct 2020), p. 8
Heater
20, 110 or 200 mW (at 3.3 V) for 0.1 s or 1 s; 1 s maximum on-timeSensirion SHT4x datasheet v1 (Oct 2020), pp. 10 to 11
Breakout
Regulator and level shifting; VIN at your board's logic level (3 V or 5 V); 3V outputAdafruit SHT40/SHT41/SHT45 guide (PDF), pp. 5 to 6

From the SHT40 product page and SHT4x datasheet, published by Sensirion.

Common mistakes

  1. Assuming SHT3x code works

    The SHT4x uses different commands from the SHT31. Use an SHT4x library (Adafruit_SHT4x or Sensirion's), not the SHT31 one, even though both answer at 0x44.

  2. Reading high after using the heater

    A 200 mW pulse warms the die for a while. Wait several seconds after any heater pulse before trusting temperature or humidity.

  3. Mounting on top of an ESP32

    Self-heating of the board raises temperature and lowers relative humidity. Use a short cable and an edge mount.

  4. 5 V on a bare module

    Generic SHT40 boards without a regulator are 3.3 V parts. Check for a regulator before connecting VIN to 5 V.

SHT40 questions

What is the SHT40's I2C address?

0x44 on the standard SHT40-AD1B, which the Adafruit board uses; Sensirion also sells an SHT40-BD1B at 0x45 (SHT4x datasheet v1, p. 1). The address is fixed by the part number, not by a pin.

SHT40 or SHT31?

The SHT40 is newer, smaller and draws less (0.4 µA average at 1 Hz) with ±1.8 %RH typical against the SHT31's ±2 %RH. The SHT31 runs up to 5.5 V and has an address pin; the SHT40 is a 3.6 V part with the address set by order code.

SHT40, SHT41 or SHT45?

Same pins and code. The SHT41 has the SHT40's typical accuracy with tighter maximum limits; the SHT45 improves to ±1.5 %RH and ±0.1 °C (pp. 4 to 5). Pick the SHT45 for reference-grade work.

Can I power the SHT40 from 5 V?

Not the bare chip: 1.08 V to 3.6 V (p. 7). The Adafruit breakout's regulator and level shifting make it safe on a 5 V Uno.

What is the heater for?

Short heating pulses (20, 110 or 200 mW for 0.1 s or 1 s) drive off condensation and creep after long high-humidity exposure (pp. 10 to 11).

Build something with the SHT40

  • Coin-cell humidity logger

    Wake every minute, read, and sleep again.

    Build this
  • Instrument case monitor

    Keep a guitar case between 40 and 60 %RH and warn outside it.

    Build this
  • Dew point display

    Compute dew point from temperature and humidity.

    Build this
For AI assistants

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

What will you build with it?