Si7021 GY-21 Digital Temperature and Humidity Sensor Module – I2C
The Si7021 GY-21 Temperature and Humidity Sensor Module is a compact, high-precision digital sensor designed for accurate environmental monitoring in electronics, automation, and IoT applications.
Based on the Silicon Labs Si7021 sensor, this module combines a relative humidity sensor, temperature sensor, analog-to-digital converter, signal processing, and factory calibration in a single integrated circuit.
Featuring an I2C digital communication interface, low power consumption, and excellent long-term stability, the Si7021 is suitable for Arduino, ESP32, Raspberry Pi, and other microcontroller-based projects.
The sensor is factory-calibrated, with calibration data stored in non-volatile memory, eliminating the need for user calibration in most applications.
Key Features
-
Dual Measurement: Measures relative humidity and ambient temperature.
-
High Accuracy: Typical ±3% RH humidity accuracy and ±0.4°C temperature accuracy.
-
Digital I2C Interface: Simple integration with microcontrollers.
-
Low Power Consumption: Suitable for battery-powered monitoring applications.
-
Factory Calibrated: Calibration data stored in internal non-volatile memory.
-
High Resolution: Up to 12-bit humidity and 14-bit temperature resolution.
-
Long-Term Stability: Designed for reliable environmental measurements.
-
Compact Module: Ideal for embedded systems and IoT projects.
-
Microcontroller Compatible: Supports Arduino, ESP32, Raspberry Pi, and other I2C-capable devices.
Technical Specifications
| Parameter |
Specification |
| Module Model |
GY-21 |
| Sensor IC |
Si7021 |
| Manufacturer of Sensor IC |
Silicon Labs |
| Sensor Type |
Digital Temperature and Humidity |
| Sensor Operating Voltage |
1.9V–3.6V DC |
| Recommended Module Supply |
3.3V DC |
| Communication Interface |
I2C |
| I2C Address |
0x40 |
| Temperature Measurement Range |
-40°C to +125°C |
| Humidity Measurement Range |
0–100% RH |
| Temperature Accuracy |
±0.4°C Typical |
| Humidity Accuracy |
±3% RH Typical |
| Temperature Resolution |
Up to 14-bit |
| Humidity Resolution |
Up to 12-bit |
| Calibration |
Factory Calibrated |
| Output Type |
Digital |
| PCB Type |
GY-21 Breakout Module |
Accuracy values are typical under specified operating conditions. The module supply voltage should be verified against the exact breakout board design.
Pin Configuration
The GY-21 module typically provides four connection pins.
| Pin |
Function |
Description |
| VCC / VIN |
Power Input |
3.3V Recommended |
| GND |
Ground |
Common Ground |
| SCL |
I2C Clock |
Connect to Microcontroller SCL |
| SDA |
I2C Data |
Connect to Microcontroller SDA |
Connection Examples
Arduino UNO
| Si7021 GY-21 |
Arduino UNO |
| VCC |
3.3V |
| GND |
GND |
| SDA |
A4 |
| SCL |
A5 |
ESP32
| Si7021 GY-21 |
ESP32 |
| VCC |
3.3V |
| GND |
GND |
| SDA |
GPIO21 |
| SCL |
GPIO22 |
Raspberry Pi
| Si7021 GY-21 |
Raspberry Pi |
| VCC |
3.3V |
| GND |
GND |
| SDA |
GPIO2 (Pin 3) |
| SCL |
GPIO3 (Pin 5) |
Important: The Si7021 is a 3.3V-class sensor. Ensure that I2C pull-up resistors are connected to a compatible logic voltage. A 5V Arduino UNO may require an I2C level shifter, depending on the breakout board circuitry.
Applications
- Arduino and ESP32 Projects
- Raspberry Pi Environmental Monitoring
- IoT Weather Stations
- Smart Home Automation
- HVAC Monitoring Systems
- Greenhouse Monitoring
- Indoor Climate Monitoring
- Data Logging Systems
- Industrial Environmental Monitoring
- Educational Electronics Projects
Important Notes
- The Si7021 uses the I2C communication protocol.
- Its fixed I2C address is 0x40.
- The bare Si7021 sensor operates from 1.9V to 3.6V; do not assume the breakout board accepts 5V without checking its circuitry.
- Use 3.3V-compatible I2C logic unless the module provides verified level shifting.
- Avoid direct water exposure and prolonged condensation.
- The module is not waterproof.
- For accurate measurements, position the sensor away from heat-generating components.
- Factory calibration eliminates the need for routine user calibration in most applications.
- Header pins may require soldering before installation.
Package Includes
- 1 × Si7021 GY-21 Temperature and Humidity Sensor Module
- 1 × Male Header Pin Strip