edit

Grove - AHT20 I2C Industrial Grade Temperature&Humidity Sensor

AHT20 is a new generation of temperature and humidity sensor embedded with a dual-row flat and no-lead SMD package, suitable for the reflow soldering. AHT20 is equipped with a newly designed ASIC chip: an improved MEMS semiconductor capacitive humidity sensor, and a standard on-chip temperature sensor. The performance of AHT20 is more stable in harsh environments compared with the previous generation of temperature and humidity sensor such as Grove - Temperature & Humidity Sensor Pro (AM2302/DHT22), as a matter of fact, AHT20 is fittable in most industrial scenarios.

Feature

  • Temperature measurement range -40 ~ 85°C, Humidity measurement range 0 ~ 100% RH
  • Digital output, Grove I2C interface
  • Excellent long-term stability
  • SMD package suitable for reflow soldering
  • Quick response and strong anti-interference ability
  • Compatible with Arduino
  • 4-pin interface reserved

Specification

Item Value
Operating Voltage DC: 2.0V-5.5V
Measuring Range (humidity) 0 ~ 100% RH
Temperature Range -40 ~ + 85 ℃
Humidity Accuracy ± 2% RH (25 ℃)
Temperature Accuracy ± 0.3 ℃
Resolution Temperature : 0.01 ℃; Humidity : 0.024% RH
Output Interface Grove I²C Interface
I2C address 0x38

Platform Supported

Arduino Raspberry Pi

Getting Started

Materials Required

Seeeduino Lotus V1.1 Grove-AHT20 Temperature&Humidity Sensor
enter image description here enter image description here
Get ONE Now Get ONE Now

Hardware Connection

Tip

Please plug the USB cable,Grove-AHT20 Temperature&Humidity Sensor Interface into Seeeduino Lotus V1.1 Interface gently, otherwise you may damage the port.

  • Step 1. Plug Grove-AHT20 Temperature&Humidity Sensor into I2C interface of Seeeduino Lotus V1.1 with a Grove Cable.

  • Step 2. Connect Seeeduino Lotus V1.1 to PC via a USB cable.

  • Step 3. Download the code, please refer to the software part.

  • Step 4. Run the code and the outcome will display on the screen of Serial Monitor in your Arduino IDE .

Software

Attention

If this is the first time you work with Arduino, we strongly recommend you to see Getting Started with Arduino before the start.

  • Step 1. Download the Demo code.

  • Step 2. Copy the whole Seeed_Arduino_AHT20 file and paste it into your Arduino IDE library file.

  • Step 3. Open the BasicRead file of examples with your Arduino IDE.

  • Step 4. Upload the demo. If you do not know how to upload the code, please check How to upload code.

Software Code

// ARDUINO DEMO FOR GROVE-AHT20
//
#include <Wire.h>
#include "AHT20.h"

AHT20 AHT;

void setup()
{
    Serial.begin(115200);
    Serial.println("AHT20 DEMO");
    AHT.begin();
}

void loop()
{
    float humi, temp;

    int ret = AHT.getSensor(&humi, &temp);

    if(ret)     // GET DATA OK
    {
        Serial.print("humidity: ");
        Serial.print(humi*100);
        Serial.print("%\t temerature: ");
        Serial.println(temp);
    }
    else        // GET DATA FAIL
    {
        Serial.println("GET DATA FROM AHT20 FAIL");
    }

    delay(100);
}

// END FILE

Success

If everything goes well, you can go to Serial Monitor to see an outcome as following:

AHT'' OUTCOME

Schematic Online Viewer

Resources

Tech Support

Please submit any technical issue into our forum.