Overview
The SHT40 is Sensirion's 4th-generation industry-leading digital relative humidity and temperature sensor. Housed in a microscopic 4-pin DFN package, it delivers class-leading humidity accuracy and temperature accuracy.
Operating across an extended supply range of to DC with a idle current of just , the SHT40 features an integrated variable-power internal heater ( max) for self-decontamination and condensation removal, 16-bit ADC output, and an interface (0x44 default).
Quick reference
Operating voltage (VIN) | 3.3 V to 5.0 V DC (breakout module with 3.3V LDO regulator) |
IC supply voltage (VDD) | 1.08 V to 3.6 V DC (3.3 V nominal) |
| Interface | Fast-Mode Plus (up to 1.0 MHz) |
| Default address | 0x44 (SHT40-AD1B) / 0x45 (SHT40-BD1B) |
| Humidity range & accuracy | ( typical) |
| Temperature range & accuracy | ( typical) |
| Variable power heater | 3 power levels () for condensation removal |
| Idle supply current | () |
Pinout
Breakout module header & STEMMA QT / Qwiic connectors:
| Pin | Name | Type | Description |
|---|---|---|---|
| 1 | VIN | Power | Supply power input (+3.3 V to +5.0 V DC) |
| 2 | GND | Power | Ground reference (0 V) |
| 3 | SCL | Digital Input | Serial Clock |
| 4 | SDA | Digital Input / Output | Serial Data |
Specifications
| Parameter | Symbol | Min | Typ | Max | Unit | Conditions |
|---|---|---|---|---|---|---|
| Supply Voltage (Module) | 3.3 | 3.3 / 5.0 | 5.5 | V | Power rail with LDO | |
| Average Current (1 Hz sampling) | — | 0.4 | 1.0 | µA | Low repeatability mode | |
| Idle Current | — | 80 | 150 | nA | Sleep mode | |
| Temp Accuracy () | -0.2 | +0.2 | °C | High precision mode | ||
| RH Accuracy () | -1.8 | +1.8 | % RH | At | ||
| High Precision Measure Time | — | 6.9 | 8.3 | ms | 16-bit measurement |
Commands & Conversion Formulas
- Measure High Precision:
0xFD(6.9 ms conversion). - Measure Medium Precision:
0xF6(4.5 ms conversion). - Measure Low Precision:
0xE0(1.7 ms conversion). - Activate Heater (, 1 sec):
0x39
Temperature Calculation ()
Relative Humidity Calculation ()
(Clamp RH output to ).
Wiring
| SHT40 Pin | → | Arduino / MCU | ESP32 | Notes |
|---|---|---|---|---|
VIN | 5V / 3.3V | 3.3V | Power rail | |
GND | GND | GND | System ground | |
SCL | A5 | GPIO 22 | Clock | |
SDA | A4 | GPIO 21 | Data |
Example (Adafruit_SHT4x Library)
cpp
#include <Wire.h>
#include "Adafruit_SHT4x.h"
Adafruit_SHT4x sht4 = Adafruit_SHT4x();
void setup() {
Serial.begin(115200);
Serial.println("Adafruit SHT40 Humidity & Temp Test");
if (!sht4.begin()) {
Serial.println("Couldn't find SHT40 sensor! Check I2C wiring.");
while (1);
}
sht4.setPrecision(SHT4X_HIGH_PRECISION);
sht4.setHeater(SHT4X_NO_HEATER);
}
void loop() {
sensors_event_t humidity, temp;
sht4.getEvent(&humidity, &temp);
Serial.print("Temperature: "); Serial.print(temp.temperature); Serial.print(" °C | ");
Serial.print("Humidity: "); Serial.print(humidity.relative_humidity); Serial.println(" % RH");
delay(1000);
}
Common mistakes
- Leaving internal heater running continuously: Running the heater continuously causes heavy sensor self-heating ( temperature bias). Use heater pulses for short 1-second intervals only.
- Confusing conversion formulas with SHT31/SHT21: The SHT40 uses updated temperature formula offsets () compared to SHT31 () and SHT21 ().
Notes
- Sensirion SHT40 Family: SHT40 ( standard grade), SHT41 ( high accuracy), SHT45 ( ultra-high precision).
Assets & downloads
- datasheetdatasheet
- product-pagereference