Gravity: Analog SHT30 Temp. & RH Sensor_SKU_DFR0588-DFRobot

Introduction

Gravity: Analog SHT30 Temperature & Humidity Sensor adopts the new generation SHT30 temperature and humidity sensor from Sensirion. Thanks to Sensirion's CMOSens® technology, highly integrated capacitive humidity sensing components and bandgap temperature sensing components, the SHT30 offers high reliability and long-term stability with low power consumption, fast response and immunity to interference. The sensor is internally calibrated, linearized and amplified to output analog voltages that are linear with temperature or humidity. It is compatible with 3.3V/5V controllers such as Arduino, micro:bit, ESP32. It is easy to achieve precise and high reliability temperature and humidity sensing for urban environment monitoring, intelligent buildings, industrial automation, smart home and other Internet of Things applications.

Features

Application

Specification

Board Overview


No. Label Description
1 - Power GND
2 + Power VCC(3.3~5.5V)
3 RH Relative humidity analog output (0.3-2.7V)
4 T Temperature analog output (0.3-2.7V)
5 / 2.54mm-4P via pinout

Output Characteristic

Arduino Tutorial

This tutorial presents a basic usage of the module with Arduino UNO.

Requirements

Connection Diagram


Example Codes

/**************************************************************************/
/*
    @file       SHT30_TempRH_Read.ino
    @author     Henry (DFRobot)
    @version    V1.0
    @date       2019-08-12
    @copyright  Copyright (c) 2010 DFRobot Co.Ltd (https://www.dfrobot.com)
    @licence    The MIT License (MIT)
    @breif      This example read and print the temperature and relative humidity.

    This demo and related libraries are for DFRobot Gravity: Analog SHT30 Temperature & Humidity Sensor
    Check out the links below for tutorials and connection diagrams
    Product(CH): https://www.dfrobot.com.cn/
    Product(EN): https://www.dfrobot.com/

*/
/**************************************************************************/

// VREF: Analog reference
// For Arduino UNO, Leonardo and mega2560, etc. change VREF to 5
// For Arduino Zero, Due, MKR Family, ESP32, etc. 3V3 controllers, change VREF to 3.3
#define VREF 5.0
#define TEMPERATURE_PIN A1
#define HUMIDITY_PIN A0
#define ADC_RESOLUTION 1024

float Tc, Tf, RH, analogVolt;

void setup() {
  Serial.begin(115200);
  Serial.println("SHT30 Starts up.");
}

void loop() {

  analogVolt = (float)analogRead(TEMPERATURE_PIN) / ADC_RESOLUTION * VREF;
  // Convert voltage to temperature (℃, centigrade)
  Tc = -66.875 + 72.917 * analogVolt;
  // Convert voltage to temperature (°F, fahrenheit )
  Tf = -88.375 + 131.25 * analogVolt;
  Serial.print("Termperature:" );
  Serial.print(Tc, 1);
  Serial.print(" C / " );
  Serial.print(Tf, 1);
  Serial.println(" F" );

  analogVolt = (float)analogRead(HUMIDITY_PIN) / ADC_RESOLUTION * VREF;
  // Convert voltage to relative humidity (%)
  RH = -12.5 + 41.667 * analogVolt;

  Serial.print("Humidity:" );
  Serial.print(RH, 1);
  Serial.println(" %RH" );

  Serial.println();
  delay(2000);
}

Results

micro:bit Tutorial

This tutorial presents a basic usage of the module with micro:bit.

Requirements

Connection Diagram


Example Codes

Results

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents