Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use SHT40: Examples, Pinouts, and Specs

Image of SHT40
Cirkit Designer LogoDesign with SHT40 in Cirkit Designer

Introduction

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.

Explore Projects Built with SHT40

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Nano Weather Station with Ethernet Connectivity
Image of Nano_Sht31_W5500: A project utilizing SHT40 in a practical application
This circuit features an Arduino Nano microcontroller interfaced with an Ethernet W5500 module for network connectivity and an SHT31 sensor for temperature and humidity measurements. The Arduino Nano communicates with the Ethernet module via SPI and reads data from the SHT31 sensor using I2C, enabling remote monitoring of environmental conditions.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano-Controlled LED Display with RTC and Humidity Sensing
Image of Alarm Clock: A project utilizing SHT40 in a practical application
This circuit features a Nano 3.0 ATmega328P microcontroller connected to an LED dot display, a real-time clock (RTC DS3231), and a humidity and temperature sensor (SHT21). The microcontroller communicates with the RTC and SHT21 via I2C (using A4 and A5 as SDA and SCL lines, respectively), and it controls the LED display through SPI-like signals (using D10, D11, and D12 for DIN, CS, and CLK). The circuit is designed to display time and environmental data on the LED display, with all components sharing a common power supply and ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO WiFi with Heart Pulse and Temperature Monitoring
Image of BioTrackers: A project utilizing SHT40 in a practical application
This circuit features an Arduino UNO R4 WiFi microcontroller connected to a Heart Pulse Sensor and an SHT1x-Breakout sensor. The Arduino is configured to read heart pulse signals from the Heart Pulse Sensor on analog pin A0 and temperature/humidity data from the SHT1x-Breakout sensor via the I2C interface on pins A4 (DATA) and A5 (SCK). Both sensors are powered by the Arduino's 5V output, and their ground pins are connected to the Arduino's ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Wi-Fi Weather Station with DHT11 and AHT10 Sensors
Image of otro: A project utilizing SHT40 in a practical application
This circuit features an ESP32 microcontroller interfaced with two sensors: a DHT11 for temperature and humidity data, and an AHT10 for more precise temperature and humidity measurements. The ESP32 collects data from these sensors via GPIO pins and I2C communication, respectively, and powers both sensors through its 3.3V and GND pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SHT40

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Nano_Sht31_W5500: A project utilizing SHT40 in a practical application
Arduino Nano Weather Station with Ethernet Connectivity
This circuit features an Arduino Nano microcontroller interfaced with an Ethernet W5500 module for network connectivity and an SHT31 sensor for temperature and humidity measurements. The Arduino Nano communicates with the Ethernet module via SPI and reads data from the SHT31 sensor using I2C, enabling remote monitoring of environmental conditions.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Alarm Clock: A project utilizing SHT40 in a practical application
Arduino Nano-Controlled LED Display with RTC and Humidity Sensing
This circuit features a Nano 3.0 ATmega328P microcontroller connected to an LED dot display, a real-time clock (RTC DS3231), and a humidity and temperature sensor (SHT21). The microcontroller communicates with the RTC and SHT21 via I2C (using A4 and A5 as SDA and SCL lines, respectively), and it controls the LED display through SPI-like signals (using D10, D11, and D12 for DIN, CS, and CLK). The circuit is designed to display time and environmental data on the LED display, with all components sharing a common power supply and ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of BioTrackers: A project utilizing SHT40 in a practical application
Arduino UNO WiFi with Heart Pulse and Temperature Monitoring
This circuit features an Arduino UNO R4 WiFi microcontroller connected to a Heart Pulse Sensor and an SHT1x-Breakout sensor. The Arduino is configured to read heart pulse signals from the Heart Pulse Sensor on analog pin A0 and temperature/humidity data from the SHT1x-Breakout sensor via the I2C interface on pins A4 (DATA) and A5 (SCK). Both sensors are powered by the Arduino's 5V output, and their ground pins are connected to the Arduino's ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of otro: A project utilizing SHT40 in a practical application
ESP32-Based Wi-Fi Weather Station with DHT11 and AHT10 Sensors
This circuit features an ESP32 microcontroller interfaced with two sensors: a DHT11 for temperature and humidity data, and an AHT10 for more precise temperature and humidity measurements. The ESP32 collects data from these sensors via GPIO pins and I2C communication, respectively, and powers both sensors through its 3.3V and GND pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • HVAC systems for climate control
  • Weather stations and environmental monitoring
  • IoT devices and smart home applications
  • Industrial process monitoring
  • Consumer electronics, such as wearables and smartphones

Technical Specifications

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

Pin Configuration and Descriptions

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

Usage Instructions

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:

Circuit Connection

  1. Connect the VDD pin to a 3.3V or 5V power supply.
  2. Connect the GND pin to the ground of your circuit.
  3. Connect the SDA pin to the I²C data line of your microcontroller.
  4. Connect the SCL pin to the I²C clock line of your microcontroller.
  5. Use pull-up resistors (typically 4.7 kΩ) on the SDA and SCL lines if not already present.

Important Considerations

  • Ensure the supply voltage is within the specified range (2.4V to 5.5V).
  • Avoid exposing the sensor to extreme conditions (e.g., condensation or high humidity for prolonged periods) to maintain accuracy.
  • Use proper decoupling capacitors (e.g., 0.1 µF) near the VDD pin to stabilize the power supply.

Example Code for Arduino UNO

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
}

Notes on the Code

  • The code uses the Adafruit SHT4x library, which simplifies communication with the sensor. Install the library via the Arduino Library Manager.
  • The setPrecision function allows you to configure the sensor's precision mode. High precision is recommended for most applications.

Troubleshooting and FAQs

Common Issues

  1. Sensor not detected by the microcontroller:

    • Ensure the I²C address (default: 0x44) matches the one in your code.
    • Check the wiring, especially the SDA and SCL connections.
    • Verify that pull-up resistors are present on the I²C lines.
  2. Incorrect or unstable readings:

    • Ensure the sensor is not exposed to condensation or contaminants.
    • Verify that the power supply is stable and within the specified range.
    • Check for proper decoupling capacitors near the VDD pin.
  3. I²C communication errors:

    • Confirm that the microcontroller's I²C clock speed is compatible with the sensor.
    • Ensure no other devices on the I²C bus are causing address conflicts.

FAQs

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.