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

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

B2B Business: info@acebott.com

Individual buyer: shop on aliexpress