SHT45 Temperature and Humidity Sensor

View on Amazon
Overview
About SHT45 Temperature and Humidity Sensor
The SHT45, part of Sensirion’s 4th-generation sensor platform, delivers industry-leading accuracy for temperature and humidity measurements. Its compact size, low power consumption, and wide voltage range make it perfect for HVAC systems, data loggers, and environmental monitoring.
⚡ Key Features
- Ultra-High Accuracy – ±1.0% RH (humidity) and ±0.1°C (temperature).
- Low Power & Wide Voltage Range – Operates from 1.08V to 3.6V, ideal for battery-powered devices.
- I²C Communication – Simple integration with ESP32, Arduino, and embedded systems.
- Compact & Reliable – Optimized for long-term environmental sensing.
With its exceptional precision and efficiency, the SHT45 is a top choice for advanced climate monitoring and industrial applications. 🚀
SHT45 Specifications
Complete technical specification details for SHT45 Temperature and Humidity Sensor
📊 Technical Parameters
SHT45 Pinout
The SHT45 uses standard I²C communication with 4 pins, optimized for high precision and low power.
Visual Pinout Diagram

Pin Types
Quick Tips
Standard I²C interface for easy integration,📡 Default I²C address is 0x44
Exceptional accuracy: ±0.1°C temp, ±1% humidity,🔋 Ultra-low voltage (1.08V-3.6V) for battery applications
Top-tier sensor in SHT4x series
Pin Descriptions
| Pin Name | Type | Description | Notes |
|---|---|---|---|
1 VDD | Power | Power supply input (1.08V to 3.6V) | Ultra-low voltage for battery-powered devices |
2 GND | Power | Ground connection | Connect to ESP32 ground |
3 SDA | Communication | I²C data line | Bidirectional data communication |
4 SCL | Communication | I²C clock line | Clock signal from master device |
Wiring SHT45 to ESP32
Connect the SHT45 using standard I²C interface for maximum precision in low-power applications.
Visual Wiring Diagram

Connection Status
Protocol
Pin Connections
| SHT45 Pin | Connection | ESP32 Pin | Description |
|---|---|---|---|
1 VDD Required | 3.3V | Power supply (1.08V to 3.6V supported) | |
2 GND Required | GND | Ground connection | |
3 SDA Required | GPIO21 | I²C data line (default SDA) | |
4 SCL Required | GPIO22 | I²C clock line (default SCL) |
GPIO21/22 are default I²C pins on ESP32
I²C address is 0x44 (fixed)
Add 10kΩ pull-up resistors on SDA/SCL if needed
Ideal for ultra-low power IoT applications
SHT45 Troubleshooting
Common issues and solutions to help you get your sensor working
Common Issues
Issue: The sensor fails to initialize, and no data is received.
Solution: Ensure that the SDA and SCL lines are correctly connected to the corresponding GPIO pins on the microcontroller. Verify that the power supply voltage is within the specified range (1.08V to 3.6V). Check for proper pull-up resistors on the SDA and SCL lines if required by your specific setup. Confirm that the I²C address used in your code matches the sensor's default address (0x44).
Issue: The sensor provides inaccurate temperature or humidity readings.
Solution: Avoid placing the sensor near heat sources or in direct sunlight. Ensure that the sensor is not exposed to condensation or water droplets. Allow the sensor to stabilize after power-up, as recommended by the manufacturer. Calibration may be necessary for precise measurements.
Issue: Communication with the sensor is intermittent or fails.
Solution: Verify that the correct I²C address (0x44) is used in your code. Ensure that the timing requirements for the I²C signals are met. Check the integrity of the SDA and SCL connections and ensure that appropriate pull-up resistors are in place if not already included on the sensor module.
Debugging Tips
Use the Serial Monitor to check for error messages and verify the sensor's output. Add debug prints in your code to track the sensor's state.
Use a multimeter to verify voltage levels and check for continuity in your connections. Ensure the power supply is stable and within the sensor's requirements.
Additional Resources
SHT45 Programming Examples
Ready-to-use code examples for different platforms and frameworks
#include <Wire.h>
#include "Adafruit_SHT4x.h"
Adafruit_SHT4x sht4 = Adafruit_SHT4x();
void setup() {
Serial.begin(115200);
if (!sht4.begin()) {
Serial.println("Couldn't find SHT4x");
while (1) delay(10);
}
Serial.println("Found SHT4x sensor");
}
void loop() {
sensors_event_t humidity, temp;
sht4.getEvent(&humidity, &temp);
Serial.print("Temperature: ");
Serial.print(temp.temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity.relative_humidity);
Serial.println(" %");
delay(2000);
}This Arduino code initializes the SHT45 sensor using the Adafruit SHT4x library. In the setup() function, it sets up serial communication and attempts to initialize the sensor. If the sensor is not found, it prints an error message and halts execution. In the loop() function, it reads temperature and humidity data from the sensor and prints the values to the Serial Monitor every two seconds.
#include "sht4x.h"
#include "esp_log.h"
#define I2C_MASTER_SCL_IO 22
#define I2C_MASTER_SDA_IO 21
#define I2C_MASTER_FREQ_HZ 100000
#define SHT45_ADDR 0x44
static const char *TAG = "SHT45";
void app_main() {
ESP_LOGI(TAG, "Initializing SHT45...");
sht4x_dev_t dev;
sht4x_init(&dev, I2C_MASTER_SCL_IO, I2C_MASTER_SDA_IO, I2C_MASTER_FREQ_HZ, SHT45_ADDR);
while (1) {
float temperature, humidity;
if (sht4x_read_temperature(&dev, &temperature) == ESP_OK &&
sht4x_read_humidity(&dev, &humidity) == ESP_OK) {
ESP_LOGI(TAG, "Temperature: %.2f°C", temperature);
ESP_LOGI(TAG, "Humidity: %.2f%%", humidity);
} else {
ESP_LOGE(TAG, "Failed to read data from SHT45 sensor");
}
vTaskDelay(2000 / portTICK_PERIOD_MS);
}
}This ESP-IDF code configures the ESP32 to communicate with the SHT45 sensor over I²C. The sht4x_init function initializes the sensor, while sht4x_read_temperature and sht4x_read_humidity fetch temperature and humidity data. The values are logged to the console every two seconds, and errors are reported if data retrieval fails.
sensor:
- platform: sht4x
temperature:
name: "SHT45 Temperature"
humidity:
name: "SHT45 Humidity"
address: 0x44
update_interval: 2sThis ESPHome configuration sets up the SHT45 sensor to measure temperature and humidity over I²C. The sensor readings update every two seconds, and the default I²C address is 0x44.
platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
adafruit/Adafruit SHT4x Library
wire
monitor_speed = 115200main.cpp
#include <Wire.h>
#include "Adafruit_SHT4x.h"
Adafruit_SHT4x sht4 = Adafruit_SHT4x();
void setup() {
Serial.begin(115200);
if (!sht4.begin()) {
Serial.println("Couldn't find SHT4x");
while (1) delay(10);
}
Serial.println("Found SHT4x sensor");
}
void loop() {
sensors_event_t humidity, temp;
sht4.getEvent(&humidity, &temp);
Serial.print("Temperature: ");
Serial.print(temp.temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity.relative_humidity);
Serial.println(" %");
delay(2000);
}This PlatformIO code initializes the SHT45 sensor using the Adafruit SHT4x library. The sensor communicates over I²C, and the program continuously reads and prints temperature and humidity values to the Serial Monitor every two seconds.
Wrapping Up SHT45
The ESP32 SHT45 Temperature and Humidity Sensor is a powerful environment sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.
Best Practices
For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.
Safety First
Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.
Ready to Start Building?
Now that you have all the information you need, it's time to integrate the SHT45 into your ESP32 project and bring your ideas to life!
Explore Alternative Sensors
Looking for alternatives to the SHT45? Check out these similar sensors that might fit your project needs.

HDC1080 / GY-213V-HDC1080 Temperature and Humidity Sensor
The HDC1080 sensor is a digital humidity and temperature sensor that provides accurate and reliable measurements. Its low power consumption...

BME680 Environmental Sensor
The BME680 is a versatile environmental sensor capable of measuring air quality (VOCs), temperature, humidity, and pressure. It supports I2C...

SHT11 Temperature and Humidity Sensor
The SHT11 is a high-precision digital temperature and humidity sensor that offers fully calibrated digital output. Its compact design, low...



