GY-21 HTU21D Humidity / Temperature Sensor Module

Measures 0 to100% humidity and -40 to 125°C temperature with I2C interface Description The GY-21 HTU21D Humidity...
Vendor: Keszoox
$2.59
$2.95
$2.59

Shipping

The shipping fee depends on your address

Standard: 9-15 business days,fee is down to $3.99

Express: 4-7 business days,fee is down to $5.99

Support Customization

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

If you're looking for a custom product, we can help. Kindly contact us via email support@keszoox.com and send us the details for your need, then we'll let you know how we can deliver the right solution.

Built And process your order

We make into production usually Within 1 - 3 Bussiness Days.

Expect customization orders.
GY-21 HTU21D Humidity / Temperature Sensor Module

GY-21 HTU21D Humidity / Temperature Sensor Module

$2.95 $2.59

GY-21 HTU21D Humidity / Temperature Sensor Module

$2.95 $2.59

Measures 0 to100% humidity and -40 to 125°C temperature with I2C interface

Description

The GY-21 HTU21D Humidity / Temperature Sensor Module uses the I2C interface to report both humidity (0 – 100%) and temperature (-40 – 125°C).

PACKAGE INCLUDES:

  • GY-21 HTU21D Humidity / Temperature Sensor Module
  • 1×4 Male Header Strip

KEY FEATURES OF GY-21 HTU21D HUMIDITY / TEMPERATURE  MODULE:

  • Reports humidity over range of 0% to 100% RH
  • Humidity reading accuracy is ±2% over 5 to 95% RH (typ)
  • Reports temperature over range of -40 to 125°C
  • Temperature reading accuracy is ±0.6°C over range of -30°C to 90°C (typ)
  • Fast <50mS read time
  • Uses I2C interface
  • 3.3 and 5V logic compatible

This GY-21 module mounts the HTU21D which is a combined humidity and temperature sensor.  The HTU21D sensor itself operates at 3V.  The backside of the module mounts a 3.3V regulator and level shifting MOSFET transistors to make the module compatible with both 3.3V and 5V MCUs.

The small size of the module allows it to be mounted into just about anything for monitoring or controlling humidity and/or temperature such as thermostats, humidistats, indoor weather stations and similar devices.

The HTU21D sensor is capable of reading humidity over the full range of 0 to 100% RH with a typical accuracy of ± 2% over the range of 5 to 95% with a maximum of ± 5% at the extremes of the range.  Humidity reading has 12-bit resolution by default.

The maximum temperature range of the device is -40 to 125°C.  The HTU21D temperature sensor has a typical accuracy of ±0.4°C over the range of 0 to 70°C with a maximum of ±1°C over -30 to 90°C and a maximum of ±1.6°C at the extreme ends of the -40 to 125°C range.  The temperature reading has a 14-bit resolution by default.

The sensor has a small window for air to contact the sensor.  Keep contaminates away from the window as that can affect the accuracy of the humidity reading.  The window must remain open to the air, but it can be protected from dust and similar contaminates with a PTFE membrane, gauze or other material that still allows air to flow through or by positioning it in an enclosure where air passes through but is protected from excess dust or moisture.

If soldering to the board, it is safest to forego cleaning any flux from the board, though it can be done if care is used to not allow the cleaning solution to enter the window of the sensor.

Module Connections

The module has a 4-pin header on the assembly.

1 x 4 Header

  • VIN  =   Connect to 3.3V or 5V to match MCU.
  • GND  = Connect to system ground.  This ground needs to be in common with the MCU.
  • SCL  =   I2C Clock / SCL – Connects to SCL on MCU
  • SDA  =  I2C Data / SDA – Connects to SDA on MCU

OUR EVALUATION RESULTS:

This is a nice very small module for humidity and temperature measurement with good accuracy and repeatability.GY-21 HTU21D Humidity Temperature Sensor Module - in Use

Once up and running with a microcontroller, it is easy to test basic functionality of the module by breathing on the sensor.  That will increase both humidity and temperature temporarily.

The test program below uses the Adafruit_HTU21DF.h library that can be downloaded from the Arduino IDE Library Manager.  It is very minimalistic, but easy to use.

Simply connect the VIN pin to either 3.3V or 5V to match your MCU and ground to ground.

SCL and SDA pins connect to the same on the MCU.

The program outputs the measured temperature in °C and °F along with the humidity.  Once the program is downloaded, open the Serial Monitor window and set to 9600 baud to see the output.  This shows an example output.  It is snowing outside, so humidity is very low.

GY-21 HTU21D Humidity Temperature Sensor Module - Program Output

 

HTU21D Humidity / Temperature Sensor Test Program

/***************************************************
  GY-21 HTU21D Test Program
  
  Connect Vin to 3-5VDC to match MCU
  Connect GND to ground
  Connect SCL to I2C SCL clock pin 
  Connect SDA to I2C SDA data pin
 ****************************************************/

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

Adafruit_HTU21DF HTU21 = Adafruit_HTU21DF();
//===============================================================================
//  Initialization
//===============================================================================
void setup() {
  Serial.begin(9600);
  Serial.println("HTU21D Test");

  if (!HTU21.begin()) {
    Serial.println("Sensor not found!");
    while (1);
  }
}
//===============================================================================
//  Main
//===============================================================================
void loop() {
    float tempC = HTU21.readTemperature();
    float relative_hum = HTU21.readHumidity();
    Serial.print("Temp: "); Serial.print(tempC); Serial.print(" C  :  ");
    float tempF = (tempC * 1.8 + 32);  // Convert C to F
    Serial.print (tempF); Serial.print(" F     ");
    Serial.print("Relative Humidity: "); Serial.print(relative_hum); Serial.println(" %");
    delay(1000);
}

BEFORE THEY ARE SHIPPED, THESE MODULES ARE:

  • Sample inspected and tested per incoming shipment.

Notes: 

  1. None

Technical Specifications

Maximum Ratings
          Vcc Range 3.3 to 5.5V
          Vmax <200uA
          Tmin  Minimum Sampling Period 50mS
Operating Ratings
          Humidity Max Range 0% to 100%RH  (± 5%RH)
Optimum Range 5% to 95%RH  (± 2%RH typ)
        Temperature Max Range -40 to 125°C (±1.6°C)
Optimum Range  -30 to 90°C   (±0.6°C typ )
Dimensions L x W (PCB) 13.5 x 10.5mm (0.53 x 0.42″)
Datasheet TE HTU21D

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

Contact us:
Support@keszoox.com
What we can help:
If you're looking for a wire or cable assembly, we can help.
What we need your help next:
Kindly contact us via email support@keszoox.com and send us the details fo your need, then we'll let you know how we can deliver the right solution.

Shipping Policy

All orders are dispatched from our warehouse. The shipments are fully tracked—from our door to yours. Please allow 3-5 business days for your order to be processed in addition to the shipping times below.

Shipping Times

Standard: 9-15 business days. Express: 4-7 business days.

Please note that shipping providers are extremely busy during this time, and some orders might experience a delay on top of usual delivery times. If your order is late, please allow 5-10 days more than indicated in standard shipping times before contacting our customer service. Thank you for your understanding.

Tracking

All orders are 100% tracked. You’ll receive an email with a tracking number and a link to track your parcel once your order leaves our warehouse. Please allow 24-48 hours for the tracking link to start showing shipping information.

Related Products

Recently Viewed Products