QB002/QB071 DHT11 Sensor

1.Product Introduction

../../_images/DHT11-1.png

DHT11 Temperature and humidity sensor is a sensor based on the digital temperature and humidity sensor DHT11, it is a combination of temperature and humidity sensor, it converts the physical temperature and humidity through the temperature, humidity sensor and the corresponding circuit into a digital quantity that is convenient for data acquisition equipment to read directly.

DHT11 is composed of resistive humidity sensing device and NTC coefficient temperature sensing device, and has the function of calibrating digital signal output. Using a single bus serial interface, the output data a total of 5 bytes, respectively: Humidity integer, humidity digit, temperature integer, temperature digit and checksum, where the checksum is the low 8-bit binary complement of the result of adding each byte of data. If the checksum calculation result does not match the last byte of data sent by DHT11, the data may be wrong and need to be re-obtained.

Application reference: This module can be used for weather station, temperature and humidity regulator, etc.

2.Parameter Specification

Parameter

Value//Description

Operating voltage

3.3V~5V

Operating temperature

-20°C~+60°C ±2°C

Humidity range

5~95%RH ±5%RH

Output signal

Digital signal

Size

3.16cm*2.38cm

../../_images/DHT11-5.jpg

3.Wiring Diagram

../../_images/DHT11-2.png

PIR Motion Sensor

UNO

VCC

5V

GND

GND

S

Digital Pin 2

4.Sample Code

 1//www.acebott.com
 2#include <DHT.h> // Include library
 3DHT dht2(2, 11); /*The first parameter 2 is the pin number of the sensor data pin connected to the Arduino. 
 4The second parameter, 11, is the sensor model number and is used to specify that the DHT11 model sensor is being used.*/
 5void setup(){
 6Serial.begin(9600);
 7dht2.begin();// Initialize the DHT sensor
 8}
 9void loop(){
10// Read and print the temperature
11 Serial.print("Temperature:");
12 Serial.println(dht2.readTemperature());
13 // Read and print the humidity
14 Serial.print("Humidity:");
15 Serial.println(dht2.readHumidity());
16delay(1000);
17}

5.Test Result

After uploading the code to the controller board, open the serial port monitor of the Arduino IDE, set the baud rate to 9600, and switch to scroll mode.

By placing the module in the air, you can see the measured values of temperature and humidity.

../../_images/DHT11-3.png
../../_images/DHT11-4.png

Hint

The module is non-contact, do not put it in water.

6.Related Resources

7.Get One Now