

The Si7021 is a digital humidity and temperature sensor that provides accurate and reliable measurements with low power consumption. It features an I2C interface, making it easy to integrate into a wide range of applications. The sensor is commonly used in environmental monitoring, HVAC systems, weather stations, and IoT devices. Its compact design and high precision make it an excellent choice for applications requiring real-time temperature and humidity data.








The Si7021 sensor is designed to deliver high performance while maintaining simplicity in integration. Below are its key technical specifications:
| Parameter | Value |
|---|---|
| Supply Voltage (VDD) | 1.9V to 3.6V |
| Average Current | 150 µA (measuring) |
| Sleep Current | 60 nA |
| Humidity Range | 0% to 100% RH |
| Temperature Range | -40°C to +125°C |
| Humidity Accuracy | ±3% RH (typical) |
| Temperature Accuracy | ±0.4°C (typical) |
| Communication Interface | I2C |
| I2C Address | 0x40 (default) |
The Si7021 sensor has four pins, as described in the table below:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VDD | Power supply (1.9V to 3.6V) |
| 2 | GND | Ground |
| 3 | SDA | I2C data line |
| 4 | SCL | I2C clock line |
The Si7021 sensor is straightforward to use in a circuit, thanks to its I2C interface. Below are the steps and considerations for using the sensor:
The Si7021 can be easily interfaced with an Arduino UNO. Below is an example code to read temperature and humidity data from the sensor:
#include <Wire.h>
#include "Adafruit_Si7021.h"
// Create an instance of the Si7021 sensor
Adafruit_Si7021 sensor = Adafruit_Si7021();
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("Si7021 Sensor Test");
if (!sensor.begin()) {
Serial.println("Sensor not found. Check wiring!");
while (true); // Halt execution if the sensor is not detected
}
}
void loop() {
// Read humidity and temperature from the sensor
float humidity = sensor.readHumidity();
float temperature = sensor.readTemperature();
// Print the readings to the Serial Monitor
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %");
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
delay(2000); // Wait for 2 seconds before the next reading
}
Sensor not detected by the microcontroller:
Inaccurate readings:
No data output:
Q: Can the Si7021 measure both temperature and humidity simultaneously?
A: Yes, the Si7021 can measure both parameters, but the measurements are taken sequentially.
Q: What is the maximum I2C clock speed supported by the Si7021?
A: The Si7021 supports I2C clock speeds up to 400 kHz.
Q: Is the Si7021 suitable for outdoor use?
A: While the Si7021 can be used outdoors, it should be protected from direct exposure to water and extreme environmental conditions.
Q: Can I use the Si7021 with a 5V microcontroller?
A: Yes, but you will need a level shifter to safely interface the 3.3V I2C lines with the 5V microcontroller.