Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Adafruit SHT31-D: Examples, Pinouts, and Specs

Image of Adafruit SHT31-DDesign with Adafruit SHT31-D in Cirkit Designer

Introduction

The Adafruit SHT31-D is a precision sensor for measuring temperature and humidity. Based on the Sensirion SHT31-D sensor, this breakout board is designed for easy integration into a wide range of applications, including weather stations, environmental monitoring, home automation, and HVAC systems. Its high accuracy, fast response time, and low power consumption make it an excellent choice for both hobbyists and professionals.

Explore Projects Built with Adafruit SHT31-D

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 Arduino Nano-Based Air Quality Monitor with OLED Display and Alert Buzzer: A project utilizing Adafruit SHT31-D in a practical application
Arduino Nano-Based Air Quality Monitor with OLED Display and Alert Buzzer

This circuit features an Arduino Nano microcontroller interfaced with an Adafruit SGP30 air quality sensor, an Adafruit SHTC3 temperature and humidity sensor, and a 0.96" OLED display for real-time environmental monitoring. The sensors communicate with the Arduino via I2C, with the SGP30 and SHTC3 sensors providing air quality readings (CO2 and TVOC) and temperature/humidity data, respectively, which are then displayed on the OLED. Additionally, a buzzer is connected to the Arduino and is programmed to activate when CO2 levels exceed a certain threshold, serving as an alert system.

Open Project in Cirkit Designer
Image of Arduino Nano-Controlled LED Display with RTC and Humidity Sensing: A project utilizing Adafruit SHT31-D 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.

Open Project in Cirkit Designer
Image of Arduino Nano Weather Station with Ethernet Connectivity: A project utilizing Adafruit SHT31-D 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.

Open Project in Cirkit Designer

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 VDD Power supply (2.4V to 5.5V)
2 GND Ground
3 SCL I2C Clock
4 SDA I2C Data
5 ADR Address selection pin
6 ALR Alert pin (active low)
7 NC Not connected
8 NC Not connected

Usage Instructions

Integration into a Circuit

  1. Connect the VDD pin to a 2.4V to 5.5V power supply.
  2. Connect the GND pin to the ground of your power supply.
  3. Connect the SCL and SDA pins to the I2C clock and data lines, respectively.
  4. If you need to change the I2C address, connect the ADR pin to VDD or GND.
  5. The ALR pin can be used for external alerts and should be connected if this feature is required.

Best Practices

Example Code for Arduino UNO

#include <Wire.h>
#include "Adafruit_SHT31.h"

Adafruit_SHT31 sht31 = Adafruit_SHT31();

void setup() {
  Serial.begin(9600);
  if (!sht31.begin(0x44)) {   // Set to 0x45 for the alternative I2C address
    Serial.println("Couldn't find SHT31");
    while (1) delay(1);
  }
}

void loop() {
  float t = sht31.readTemperature();
  float h = sht31.readHumidity();

  if (!isnan(t)) {  // Check if 't' is not a NaN value
    Serial.print("Temp *C = "); Serial.println(t);
  } else { 
    Serial.println("Failed to read temperature");
  }

  if (!isnan(h)) {  // Check if 'h' is not a NaN value
    Serial.print("Hum. % = "); Serial.println(h);
  } else { 
    Serial.println("Failed to read humidity");
  }

  delay(500);
}

Troubleshooting and FAQs

Common Issues

Solutions and Tips

FAQs

Q: Can the SHT31-D sensor be used outdoors? A: Yes, but it should be protected from direct sunlight, high humidity, and water ingress.

Q: What is the purpose of the ADR pin? A: The ADR pin allows you to change the I2C address of the sensor. This is useful if you have multiple sensors on the same I2C bus.

Q: How often should the sensor be calibrated? A: The SHT31-D is factory-calibrated. However, recalibration is recommended if the sensor is used in harsh environmental conditions over a long period.

For further assistance, consult the Adafruit SHT31-D datasheet and the Sensirion SHT31-D technical documentation.