Skip to main content

Grove - Temperature&Humidity Sensor(DHT20)

The new Grove - Temperature & Humidity Sensor is based on the DHT20 sensor. The DHT20 is an upgraded version of the DHT11, compared with the previous version, the temperature and humidity measurement accuracy are higher, and the measurement range is larger. It features I2C output which means it is easier to use.

Upgradable to Industrial Sensors

With the SenseCAP S2110 controller and S2100 data logger, you can easily turn the Grove into a LoRaWAN® sensor. Seeed not only helps you with prototyping but also offers you the possibility to expand your project with the SenseCAP series of robust industrial sensors.

SenseCAP S210x series industrial sensors provide an out-of-box experience for environmental sensing. Please refer to the S2101 Wireless Temperature and Humidity Sensor with higher performance and robustness for air quality monitoring. The series includes sensors for soil moisture, air temperature and humidity, light intensity, CO2, EC, and an 8-in-1 weather station. Try the latest SenseCAP S210x for your next successful industrial project.

SenseCAP Industrial Sensor
S2101 Air Temp & Humidity

Features

  • High Accuracy:
    • Temperature Accuracy:± 0.5 ℃
    • Humidity Accuracy:± 3 % RH ( 25 ℃ )
  • Wide measurement ranges:
    • Measuring Range (Humidity):0 ~ 100% RH
    • Measuring Range (Temperature):-40 ~ + 80 ℃
  • Better compatibility:
    • Digital output
    • I²C interface
  • Fully calibrated
  • Excellent long-term stability
  • Quick response and anti-interference capability
  • Wide voltage support 2.5-5.5V DC

Specification

ParameterValue
Input Voltage2.0 V – 5.5 V
Measuring Humidity Range0 ~ 100% RH
Measuring Temperature Range-40 ~ + 80 ℃
Humidity Accuracy± 3 % RH ( 25 ℃ )
Temperature Accuracy± 0.5 ℃
Output SignalI2C signal

Hardware Overview

Pin Map

Platforms Supported

ArduinoRaspberry Pi
caution

The platforms mentioned above as supported is/are an indication of the module's software or theoretical compatibility. We only provide software library or code examples for the Arduino platform in most cases. It is not possible to provide software library/demo code for all possible MCU platforms. Hence, users have to write their own software library.

Getting Started

Play With Arduino

Hardware

Materials required

Seeeduino V4.2Base ShieldGrove - Temperature & Humidity Sensor V2.0
Get One NowGet One NowGet One Now
  • Step 1. Connect the Grove Temperature & Humidity Sensor V2.0 to port I2C of Grove-Base Shield.

  • Step 2. Plug Grove - Base Shield into Seeeduino.

  • Step 3. Connect Seeeduino to PC through a USB cable.

Software

note

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

Compared with DHT11, the DHT20 Temperature and Humidity Sensor has clear changes in supply voltage, measurement range of temperature and humidity, precision and quality of output signal.

It has equipped with a fully calibrated digital I2C interface, so there are slightly different definitions of pins. You should download and install the library here to use DHT20.

Once it is all set up, we can upload the sample code to see if it works:

// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
#include "Wire.h"
#include "DHT.h"
#define DHTTYPE DHT20 // DHT 20
/*Notice: The DHT10 and DHT20 is different from other DHT* sensor ,it uses i2c interface rather than one wire*/
/*So it doesn't require a pin.*/
DHT dht(DHTTYPE); // DHT10 DHT20 don't need to define Pin

#if defined(ARDUINO_ARCH_AVR)
#define debug Serial

#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM)
#define debug SerialUSB
#else
#define debug Serial
#endif

void setup() {

debug.begin(115200);
debug.println("DHTxx test!");
Wire.begin();

/*if using WIO link,must pull up the power pin.*/
// pinMode(PIN_GROVE_POWER, OUTPUT);
// digitalWrite(PIN_GROVE_POWER, 1);

dht.begin();
}

void loop() {
float temp_hum_val[2] = {0};
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)


if (!dht.readTempAndHumidity(temp_hum_val)) {
debug.print("Humidity: ");
debug.print(temp_hum_val[0]);
debug.print(" %\t");
debug.print("Temperature: ");
debug.print(temp_hum_val[1]);
debug.println(" *C");
} else {
debug.println("Failed to get temprature and humidity value.");
}

delay(1500);
}

After done uploading, we can use Serial Monitor in Arduino to see the result.

And the output should be something like... :

The values are based on the current environment.

Play with MicroPython

Connect RaspberryPi Pico

Materials required

RaspberryPi PicoGrove Shield for Pi Pico v1.0Grove - Temperature & Humidity Sensor V2.0
Get One NowGet ONE NowGet ONE Now

I2C Connection

  • Step 1. Plug RaspberryPi Pico into Grove Shield for Pi Pico.

  • Step 2. Plug Grove - CO2 & Temperature & Humidity Sensor - SCD41 to I2C0 port of Grove Shield for Pi Pico.

  • Step 3. Connect RaspberryPi Pico to a PC through a USB cable.

    tip

    please pay attention to use I2C0, if use I2C1, it won't work.

This is the basic hardware connecting.

Software

  • Step 1. We need to use third-party library to control Grove - Temperature & Humidity Sensor V2.0
  1. Download dht20_demo2.py and DHT20.py library save it to the computer.

  2. Use Thonny to open dht20_demo2.py and DHT20.py, click on the "file" option at the top left, and then select "save as".

  1. Select "Raspberry Pi Pico" and save it in Pico.
note

Once we saving, Thonny will ask to name the file. Here we type "dht20_demo2.py" as its name, and we also need to type the extension of the file, or it can not be used.

  • Step 2. Start the process.
  1. Initialize DHT20.py first.
  1. Start the demo process and then you can see the results below.

Schematic Online Viewer

Resources

Tech Support & Product Discussion

Upgradable to Industrial Sensors

With the SenseCAP S2110 controller and S2100 data logger, you can easily turn the Grove into a LoRaWAN® sensor. Seeed not only helps you with prototyping but also offers you the possibility to expand your project with the SenseCAP series of robust industrial sensors.

The IP66 housing, Bluetooth configuration, compatibility with the global LoRaWAN® network, built-in 19 Ah battery, and powerful support from APP make the SenseCAP S210x the best choice for industrial applications. The series includes sensors for soil moisture, air temperature and humidity, light intensity, CO2, EC, and an 8-in-1 weather station. Try the latest SenseCAP S210x for your next successful industrial project.

Loading Comments...