The SH-T10, manufactured by Sensirion, is a highly reliable sensor designed to measure and provide accurate readings of temperature and humidity in its environment. This versatile component is widely used in various applications, including HVAC systems, weather stations, industrial automation, and home automation systems. Its compact design and ease of integration make it a popular choice for both hobbyists and professionals.
Parameter | Value |
---|---|
Supply Voltage | 2.4V to 5.5V |
Operating Current | 150 µA (typical) |
Temperature Range | -40°C to 125°C |
Humidity Range | 0% to 100% RH |
Temperature Accuracy | ±0.3°C |
Humidity Accuracy | ±2% RH |
Communication | I2C |
Pin No. | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (2.4V to 5.5V) |
2 | GND | Ground |
3 | SDA | I2C data line |
4 | SCL | I2C clock line |
5 | NC | Not connected (leave unconnected or grounded) |
#include <Wire.h>
#define SH_T10_ADDRESS 0x44
void setup() {
Wire.begin();
Serial.begin(9600);
delay(1000); // Allow some time for the sensor to initialize
}
void loop() {
float temperature, humidity;
if (readSensorData(temperature, humidity)) {
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %RH");
} else {
Serial.println("Failed to read from SH-T10 sensor");
}
delay(2000); // Wait for 2 seconds before the next reading
}
bool readSensorData(float &temperature, float &humidity) {
Wire.beginTransmission(SH_T10_ADDRESS);
Wire.write(0xE5); // Command to read temperature and humidity
if (Wire.endTransmission() != 0) {
return false; // Transmission error
}
delay(20); // Wait for the sensor to process the command
Wire.requestFrom(SH_T10_ADDRESS, 6);
if (Wire.available() != 6) {
return false; // Not enough data received
}
uint16_t rawTemp = (Wire.read() << 8) | Wire.read();
uint16_t rawHumidity = (Wire.read() << 8) | Wire.read();
temperature = -45 + 175 * (rawTemp / 65535.0);
humidity = 100 * (rawHumidity / 65535.0);
return true;
}
No Data from Sensor:
Inaccurate Readings:
I2C Address Conflict:
By following this documentation, users should be able to effectively integrate and utilize the SH-T10 temperature and humidity sensor in their projects. For further assistance, refer to the Sensirion datasheet and support resources.