The SHT31 module is a high-accuracy digital sensor designed for measuring environmental temperature and humidity through an I2C communication interface. With a wide 2.4V to 5.5V operating voltage range, low power consumption, and factory-calibrated digital output, the SHT31 provides a simple and reliable solution for Arduino, ESP32, STM32, and IoT projects.
Compared with traditional analog humidity sensors, the SHT31 sensor module offers better accuracy, faster response, and improved signal processing performance. It supports a 0 to 100%RH humidity measurement range and -40°C to +125°C temperature range, making it suitable for applications such as smart home systems, weather monitoring, industrial environmental detection, and portable measurement devices. This article will introduce the SHT31’s pinout, technical specifications, Arduino wiring, programming method, and comparison with the popular BME280 sensor.
1. What is SHT31 Temperature & Humidity Sensor?
5. Wiring up a SHT31 Module to an Arduino
7. Frequently Asked Questions [FAQ]

The SHT 31 sensor is a high-accuracy digital temperature and humidity sensor module that uses I2C communication to transfer measurement data. It integrates a capacitive humidity sensor, temperature sensor, signal processing unit, and calibration memory inside a compact package.
Compared with traditional analog humidity sensors, the SHT31 sensor module provides higher measurement accuracy, faster response, and better long-term stability. It supports a wide operating voltage range of 2.4V to 5.5V, making it compatible with popular microcontrollers such as Arduino, ESP8266, ESP32, and STM32.
The module outputs calibrated digital temperature and humidity values through the I2C interface, reducing external circuit complexity and improving measurement reliability. With its small size and low power consumption, the sensor widely use in environmental monitoring, smart home systems, weather stations, and industrial sensing applications.
The SHT 31 module usually provides six pins for power supply, I2C communication, address selection, and alarm output.


Pin | Function |
VCC | Power supply voltage: 2.4V~5.5V (3.3V recommended) |
GND | Power ground |
SCL | I2C serial clock line |
SDA | I2C serial data line |
AD | I2C address selection pin, connect to VCC or GND, do not leave floating |
AL | Alarm status output indicator |
Use the AD pin to select the I2C address of the sensor. It should always connect to either VCC or GND to ensure stable communication.
Table
Parameter | Value |
Power Supply | 2.4V to 5.5V |
Current Draw | ~0.8mA during measurements |
Current Draw (Single Shot Mode) | ~0.2µA |
Humidity Range | 0 to 100%RH |
Humidity Accuracy | ±2%RH (20% to 80%RH range) |
Temperature Range | -40°C to +125°C |
Temperature Accuracy | ±0.3°C at 25°C |
Interface | I2C |
Module Size | 17mm × 12mm |
The SHT 31 provides stable humidity measurement across a wide range of environments and maintains high temperature accuracy, making it suitable for precision environmental monitoring applications.
The SHT 31 temperature and humidity sensor module provides stronger functionality and improved internal signal processing compared with many conventional humidity sensors. It can directly output digital temperature and humidity data through the I2C interface, simplifying system design.
The module expands application possibilities with improved environmental protection. Some SHT 31 modules include a PTFE protective membrane, which provides IP67-level waterproof and dustproof protection. This design helps prevent water droplets and dust from affecting sensor accuracy and performance, allowing the module to operate in harsher environments.
Common applications include:
· Weather monitoring systems
· Smart home environmental control
· HVAC systems
· Industrial environmental monitoring
· Greenhouse monitoring
· Data logging equipment
· IoT sensor nodes
· Portable measurement devices
The SHT31 communicates with Arduino through the I2C interface. On an Arduino Uno, the SDA and SCL pins are located on the A4 and A5 pins.
SHT31 Module | Arduino Uno |
VCC | 5V or 3.3V |
GND | GND |
SDA | A4 |
SCL | A5 |
AD | GND or VCC |
AL | Optional |
Should connect the AD pin to a fixed level. Leaving this pin floating may cause an unstable I2C address.
The BME280 is a digital environmental sensor that integrates temperature, humidity, and atmospheric pressure measurement. It uses Bosch APSM (Advanced Porous Silicon Membrane) technology and is designed for compact low-power applications.
Unlike the SHT31, which focuses on high-accuracy temperature and humidity measurement, the BME280 adds a pressure sensor, allowing altitude estimation and weather-related measurements.

Parameter | SHT31 | BME280 |
Measurement | Temperature + Humidity | Temperature + Humidity + Pressure |
Operating Voltage | 2.4V~5.5V | 1.7V~3.6V |
Temperature Range | -40°C~125°C | 0°C~65°C |
Temperature Accuracy | ±0.3°C at 25°C | ±0.5°C typical |
Humidity Range | 0~100%RH | 0~100%RH |
Humidity Accuracy | ±2%RH | ±2%RH |
Pressure Range | Not available | 300~1100hPa |
Interface | I2C | I2C / SPI |
Size | 17mm × 12mm | 15.4mm × 11.6mm × 2.4mm |
The BME280 is suitable for applications requiring atmospheric pressure measurement, such as weather stations, navigation devices, and altitude monitoring equipment. The SHT31 is optimized for applications where accurate temperature and humidity sensing is the main requirement.
The SHT31 is a digital temperature and humidity sensor developed for accurate environmental measurement. It uses I2C communication and integrates calibrated sensing elements with internal signal processing. The sensor provides humidity accuracy of ±2%RH and temperature accuracy of ±0.3°C at 25°C.
The cost of an SHT31 sensor module depends on the manufacturer, module design, protection features, and purchase quantity. Normaly from US$1-US$2. Basic breakout boards are generally affordable for hobby projects, while industrial versions with protective membranes cost more.
The SHT31 provides high measurement accuracy with humidity accuracy of ±2%RH over 20% to 80%RH and temperature accuracy of ±0.3°C at 25°C. Its internal calibration and digital signal processing improve reliability compared with many basic humidity sensors.
The SHT31 sensor itself is not waterproof. However, some SHT 31 modules use a PTFE membrane that provides IP67-level protection against water and dust, allowing operation in environments where moisture and contamination may affect sensor performance.
The SHT31 consumes approximately 0.8mA during normal measurements. In single-shot measurement mode, the power consumption can be reduced to around 0.2µA, making it suitable for battery-powered IoT devices.
Humidity sensors fail because prolonged exposure to condensation, chemicals, dust, extreme temperatures, or mechanical damage. Contaminants on the sensing surface can reduce accuracy and response speed over time.
The best humidity sensor depends on the application requirements. The SHT31 is suitable for high-accuracy temperature and humidity measurement, while prefer other sensors when additional functions such as pressure measurement or lower cost are required.
Should install a humidity sensor in an area with good airflow and away from direct sunlight, heat sources, water spray, and air-conditioning outlets. Proper placement helps obtain more accurate environmental measurements.
A reliable humidity sensor should provide stable accuracy, good calibration, low drift, and suitable environmental protection. Sensors such as the SHT31 are widely used because of their accuracy, digital communication, and long-term measurement stability.
The SHT31 temperature and humidity sensor module is a compact and accurate digital environmental sensor that provides reliable temperature and humidity measurements through the I2C interface. With high humidity accuracy, excellent temperature performance, low power consumption, and wide voltage compatibility, it is suitable for a variety of embedded and IoT applications.
Compared with basic humidity sensors, the SHT 31 offers improved stability and easier integration with modern microcontrollers such as Arduino, ESP32, and STM32. Its optional PTFE membrane protection also allows use in environments where dust and moisture affect sensor performance. For projects that require accurate temperature and humidity monitoring without the need for pressure measurement, the SHT 31 is a practical and dependable choice.
Read More:
1. SCD30 CO2 Sensor Module: Pinout, Arduino Guide & Datasheet
2. MPU9250 9-Axis Motion Sensor: Complete Guide and Alternative
3. Mini MP1584 DC-DC 3A Buck Converter Module: Complete Guide
2026-01-23
2025-12-14
2025-05-29
2025-09-04
2025-05-06
2025-07-28
2025-06-05
2025-06-30
2025-09-05
2025-05-12