Features:
- High Precision: Offers accurate measurement of temperature and humidity.
- I2C Communication: Supports direct data reading via the I2C protocol.
- Versatile Integration: Suitable for thermostats, weather stations, and more.
- Wide Humidity Range: 0% to 100% RH.
- Extended Temperature Range: -40°C to 125°C.
- Accuracy: ±2% RH, ±0.3°C in the 0°C to 70°C range.
- Resolution Options: Adjustable precision for different applications.
- Compact Size: 21mm x 16mm for easy integration.
- Power Efficiency: Low current consumption, ideal for battery-powered devices.
- Enhanced Precision Mode: Higher resolution with longer measurement times.
- Integrated IC: Built around the SHT21 chip for consistent performance.
Principle of Work:
The SHT21 sensor uses a capacitive sensor for humidity and a band gap sensor for temperature. These analog signals are converted via a 14-bit ADC and communicated digitally over I2C. I2C enables simple two-wire communication (SDA & SCL) and supports multiple devices, multi-master configurations, and open-drain signaling for low power and noise immunity.
Pinout of the Board:

Pin Name |
Function |
VCC |
Power supply pin (+) |
GND |
Ground pin (-) |
SCL |
Serial Clock (I2C) |
SDA |
Serial Data (I2C) |
Applications:
- Weather Stations: Accurate environmental monitoring.
- HVAC Systems: Control indoor air quality.
- Industrial Automation: Maintain factory conditions.
- Agriculture: Optimize greenhouses and storage environments.
- Food and Beverage: Ensure quality during storage.
- Medical Devices: Support sensitive applications like incubators.
- Data Centers: Prevent overheating and improve efficiency.
- Automotive: Monitor cabin climate.
- Consumer Electronics: Smart home and wearable integration.
- R&D: Accurate measurements for experimental setups.
- Energy Efficiency: Optimize building energy use.
- Environmental Monitoring: Study ecosystems and climate.
Circuit Diagram:
Connect the SHT21 sensor to an Arduino UNO as follows:
- VCC → 3.3V
- GND → GND
- SDA → A4
- SCL → A5

Library Installation:
- Download the SHT21 Arduino library.
- Open Arduino IDE.
- Go to Sketch > Include Library > Add .ZIP Library.
- Select the downloaded .ZIP file.
- Verify it appears under Sketch > Include Library.
Example Code:
#include "SHT21.h"
SHT21 sht;
float temperature;
float humidity;
void setup() {
Wire.begin();
Serial.begin(9600);
Serial.println("SHT21 Sensor Data:");
}
void loop() {
temperature = sht.getTemperature();
humidity = sht.getHumidity();
if (isnan(temperature) || isnan(humidity)) {
Serial.println("Error reading data from sensor");
return;
}
Serial.print("Temperature: ");
Serial.print(temperature, 2);
Serial.print(" °C\t");
Serial.print("Humidity: ");
Serial.print(humidity, 2);
Serial.println(" %");
delay(2000);
}
Technical Details:
- IC: SHT21
- Operating Voltage: 3V – 5V DC
- Current Consumption: 150mA
- Humidity Range: 0% – 100% RH
- Temperature Range: -40°C – 125°C
- Accuracy: ±2% RH, ±0.3°C
- Resolution: 0.04% RH, 0.01°C (Max)
- Module Size: 21mm x 16mm
Resources:
Comparison with Other Modules:
Feature |
SHT21 |
DHT11 |
LM75 |
Temperature Accuracy |
±0.3°C |
±2°C |
±2°C |
Humidity Accuracy |
±2% RH |
±5% RH |
– |
Humidity Range |
0–100% RH |
20–80% RH |
– |
Temp Range |
-40°C to 125°C |
0°C to 50°C |
-55°C to 125°C |
Interface |
I2C |
Single-Wire |
I2C |
Measures Humidity |
Yes |
Yes |
No |
Use Case |
Precision sensing, indoor climate |
Basic monitoring |
Temp-only, industrial |
Features:
- High Precision: Offers accurate measurement of temperature and humidity.
- I2C Communication: Supports direct data reading via the I2C protocol.
- Versatile Integration: Suitable for thermostats, weather stations, and more.
- Wide Humidity Range: 0% to 100% RH.
- Extended Temperature Range: -40°C to 125°C.
- Accuracy: ±2% RH, ±0.3°C in the 0°C to 70°C range.
- Resolution Options: Adjustable precision for different applications.
- Compact Size: 21mm x 16mm for easy integration.
- Power Efficiency: Low current consumption, ideal for battery-powered devices.
- Enhanced Precision Mode: Higher resolution with longer measurement times.
- Integrated IC: Built around the SHT21 chip for consistent performance.
Principle of Work:
The SHT21 sensor uses a capacitive sensor for humidity and a band gap sensor for temperature. These analog signals are converted via a 14-bit ADC and communicated digitally over I2C. I2C enables simple two-wire communication (SDA & SCL) and supports multiple devices, multi-master configurations, and open-drain signaling for low power and noise immunity.
Pinout of the Board:

Pin Name |
Function |
VCC |
Power supply pin (+) |
GND |
Ground pin (-) |
SCL |
Serial Clock (I2C) |
SDA |
Serial Data (I2C) |
Applications:
- Weather Stations: Accurate environmental monitoring.
- HVAC Systems: Control indoor air quality.
- Industrial Automation: Maintain factory conditions.
- Agriculture: Optimize greenhouses and storage environments.
- Food and Beverage: Ensure quality during storage.
- Medical Devices: Support sensitive applications like incubators.
- Data Centers: Prevent overheating and improve efficiency.
- Automotive: Monitor cabin climate.
- Consumer Electronics: Smart home and wearable integration.
- R&D: Accurate measurements for experimental setups.
- Energy Efficiency: Optimize building energy use.
- Environmental Monitoring: Study ecosystems and climate.
Circuit Diagram:
Connect the SHT21 sensor to an Arduino UNO as follows:
- VCC → 3.3V
- GND → GND
- SDA → A4
- SCL → A5

Library Installation:
- Download the SHT21 Arduino library.
- Open Arduino IDE.
- Go to Sketch > Include Library > Add .ZIP Library.
- Select the downloaded .ZIP file.
- Verify it appears under Sketch > Include Library.
Example Code:
#include "SHT21.h"
SHT21 sht;
float temperature;
float humidity;
void setup() {
Wire.begin();
Serial.begin(9600);
Serial.println("SHT21 Sensor Data:");
}
void loop() {
temperature = sht.getTemperature();
humidity = sht.getHumidity();
if (isnan(temperature) || isnan(humidity)) {
Serial.println("Error reading data from sensor");
return;
}
Serial.print("Temperature: ");
Serial.print(temperature, 2);
Serial.print(" °C\t");
Serial.print("Humidity: ");
Serial.print(humidity, 2);
Serial.println(" %");
delay(2000);
}
Technical Details:
- IC: SHT21
- Operating Voltage: 3V – 5V DC
- Current Consumption: 150mA
- Humidity Range: 0% – 100% RH
- Temperature Range: -40°C – 125°C
- Accuracy: ±2% RH, ±0.3°C
- Resolution: 0.04% RH, 0.01°C (Max)
- Module Size: 21mm x 16mm
Resources:
Comparison with Other Modules:
Feature |
SHT21 |
DHT11 |
LM75 |
Temperature Accuracy |
±0.3°C |
±2°C |
±2°C |
Humidity Accuracy |
±2% RH |
±5% RH |
– |
Humidity Range |
0–100% RH |
20–80% RH |
– |
Temp Range |
-40°C to 125°C |
0°C to 50°C |
-55°C to 125°C |
Interface |
I2C |
Single-Wire |
I2C |
Measures Humidity |
Yes |
Yes |
No |
Use Case |
Precision sensing, indoor climate |
Basic monitoring |
Temp-only, industrial |