The SHT40, manufactured by Laskakit (Part ID: Senzor Tem,Hum), is a digital humidity and temperature sensor designed for precise environmental monitoring. It offers high accuracy, low power consumption, and a compact form factor, making it ideal for a wide range of applications. The SHT40 communicates via an I²C interface, ensuring easy integration into various systems.
The SHT40 is engineered to deliver reliable performance in demanding environments. Below are its key technical details:
Parameter | Value |
---|---|
Supply Voltage (VDD) | 2.4V to 5.5V |
Average Current | 0.4 µA (at 1 measurement per second) |
Measurement Range | Humidity: 0% to 100% RH |
Temperature: -40°C to +125°C | |
Accuracy | Humidity: ±1.8% RH (typical) |
Temperature: ±0.2°C (typical) | |
Communication Interface | I²C |
I²C Address | 0x44 (default) |
Operating Temperature | -40°C to +125°C |
Package Dimensions | 1.5 mm x 1.5 mm x 0.5 mm |
The SHT40 has a simple pinout, as shown in the table below:
Pin Name | Description |
---|---|
VDD | Power supply (2.4V to 5.5V) |
GND | Ground |
SDA | I²C data line |
SCL | I²C clock line |
The SHT40 is straightforward to use in a circuit, thanks to its I²C interface. Below are the steps and considerations for integrating the sensor:
Below is an example of how to use the SHT40 with an Arduino UNO. This code reads temperature and humidity data from the sensor and prints it to the Serial Monitor.
#include <Wire.h>
#include "Adafruit_SHT4x.h" // Include the Adafruit SHT4x library
Adafruit_SHT4x sht40; // Create an SHT40 object
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
while (!Serial) delay(10); // Wait for Serial Monitor to open
Serial.println("SHT40 Sensor Test");
if (!sht40.begin()) {
Serial.println("Failed to find SHT40 sensor!");
while (1) delay(10); // Halt if sensor is not found
}
Serial.println("SHT40 sensor found!");
sht40.setPrecision(SHT4X_HIGH_PRECISION); // Set high precision mode
}
void loop() {
sensors_event_t humidity, temp;
if (!sht40.getEvent(&humidity, &temp)) {
Serial.println("Failed to read data from SHT40!");
return;
}
// Print temperature and humidity readings
Serial.print("Temperature: ");
Serial.print(temp.temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity.relative_humidity);
Serial.println(" %");
delay(1000); // Wait 1 second before the next reading
}
setPrecision
function allows you to configure the sensor's precision mode. High precision is recommended for most applications.Sensor not detected by the microcontroller:
Incorrect or unstable readings:
I²C communication errors:
Q: Can the SHT40 operate at 5V logic levels?
A: Yes, the SHT40 supports a supply voltage range of 2.4V to 5.5V, making it compatible with both 3.3V and 5V systems.
Q: How often should I take measurements?
A: For most applications, a measurement interval of 1 second is sufficient. However, you can adjust this based on your specific requirements.
Q: Is the sensor factory-calibrated?
A: Yes, the SHT40 is factory-calibrated for both humidity and temperature, ensuring accurate measurements out of the box.
Q: Can I use the SHT40 in outdoor environments?
A: While the SHT40 is robust, it is recommended to use a protective enclosure to shield it from direct exposure to water, dust, and extreme conditions.
By following this documentation, you can effectively integrate the SHT40 into your projects and achieve reliable environmental monitoring.