

The SHT40 Temperature & Humidity Sensor, manufactured by Sensirion AG, is a highly accurate digital sensor designed to measure temperature and relative humidity. It features a compact design, low power consumption, and fast response times, making it ideal for a wide range of applications. The sensor communicates via the I2C interface, ensuring seamless integration with microcontrollers and other digital systems.








The following table outlines the key technical details of the SHT40 sensor:
| Parameter | Value |
|---|---|
| Supply Voltage (VDD) | 1.08V to 3.6V |
| Typical Operating Voltage | 3.3V |
| Current Consumption | 0.4 µA (standby), 900 µA (active) |
| Temperature Range | -40°C to +125°C |
| Temperature Accuracy | ±0.2°C (typical) |
| Humidity Range | 0% to 100% RH |
| Humidity Accuracy | ±1.8% RH (typical) |
| Communication Interface | I2C |
| I2C Address | 0x44 (default) |
| Response Time | < 8 seconds (humidity) |
| Dimensions | 1.5 mm x 1.5 mm x 0.5 mm |
The SHT40 sensor has four pins, as described in the table below:
| Pin Name | Pin Number | Description |
|---|---|---|
| VDD | 1 | Power supply pin (1.08V to 3.6V) |
| GND | 2 | Ground pin |
| SDA | 3 | I2C data line |
| SCL | 4 | I2C clock line |
0x44. Ensure no other devices on the I2C bus share this address.Below is an example of how to interface the SHT40 with an Arduino UNO using the I2C protocol. This code uses the Sensirion SHT4x library, which can be installed via the Arduino Library Manager.
#include <Wire.h>
#include <SensirionI2CSht4x.h>
// Create an instance of the SHT4x sensor
SensirionI2CSht4x sht40;
// Variables to store temperature and humidity readings
float temperature;
float humidity;
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
// Initialize the SHT40 sensor
sht40.begin(Wire);
uint16_t error = sht40.reset();
if (error) {
Serial.print("Error initializing SHT40: ");
Serial.println(error);
while (1); // Halt execution if initialization fails
}
Serial.println("SHT40 initialized successfully!");
}
void loop() {
// Read temperature and humidity from the sensor
uint16_t error = sht40.measureHighPrecision(temperature, humidity);
if (error) {
Serial.print("Error reading from SHT40: ");
Serial.println(error);
delay(1000); // Wait before retrying
return;
}
// Print the readings to the Serial Monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %RH");
delay(2000); // Wait 2 seconds before the next reading
}
No Response from the Sensor
0x44) and check all connections.Inaccurate Readings
I2C Communication Errors
Sensor Overheating
Q: Can the SHT40 operate at 5V?
A: No, the SHT40 operates within a supply voltage range of 1.08V to 3.6V. Use a voltage regulator if your system operates at 5V.
Q: How do I protect the sensor in harsh environments?
A: Use a protective filter or housing to shield the sensor from dust, water, and other contaminants.
Q: What is the typical response time of the sensor?
A: The SHT40 has a response time of less than 8 seconds for humidity measurements.
Q: Can I use multiple SHT40 sensors on the same I2C bus?
A: The SHT40 has a fixed I2C address (0x44), so multiple sensors cannot share the same bus unless an I2C multiplexer is used.
This concludes the documentation for the SHT40 Temperature & Humidity Sensor.