Ks0034 keyestudio DHT11 Temperature and Humidity Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
<br>
==Introduction==
==Introduction==
This DHT11 Temperature and Humidity Sensor features calibrated digital signal output with the temperature and humidity sensor complex. Its technology ensures high reliability and excellent long-term stability. A high-performance 8-bit microcontroller is connected. This sensor includes a resistive element and a sense of wet NTC temperature measuring devices. It has advantages of excellent quality, fast response, anti-interference ability and high cost performance.
This DHT11 Temperature and Humidity Sensor is a composite sensor which contains a calibrated digital signal output of the temperature and humidity.<br>
Each DHT11 sensor features extremely accurate calibration data of humidity calibration chamber. The calibration coefficients stored in the OTP program memory, internal sensors detect signals in the process, and we should call these calibration coefficients. The single-wire serial interface system is integrated to make it quick and easy. Qualities of small size, low power, and 20-meter signal transmission distance makes it a wide +application and even the most demanding one. Convenient connection, special packages can be provided according to users need.
Its technology ensures high reliability and excellent long-term stability. A high-performance 8-bit microcontroller is connected. <br>
<br>[[File:341.png|500px|frameless|thumb]]<br>
This sensor includes a resistive element and a sense of wet NTC temperature measuring devices. It has excellent quality, fast response, anti-interference ability and high cost performance advantages.<br>
Each DHT11 sensor features extremely accurate calibration data of humidity calibration chamber. The calibration coefficients stored in the OTP program memory, internal sensors detect signals in the process, and we should call these calibration coefficients. <br>
The single-wire serial interface system is integrated to make it quick and easy. Qualities of small size, low power, and 20-meter signal transmission distance make it a wide applied application or even the most demanding one. Convenient connection, special packages can be provided according to users’ need.
<br>[[File:无标题-0034.png|700px|frameless|thumb]]<br>
 
<br>


==Specification==
==Specification==
Line 9: Line 16:
*Humidity: 20-90% RH ± 5% RH error
*Humidity: 20-90% RH ± 5% RH error
*Interface: Digital
*Interface: Digital
*Size: 30*20mm
*Weight: 4g


<br>
==Connection Diagram ==
==Connection Diagram ==
<br>[[File:6C.png|700px|frameless|thumb]]<br>


<br>[[File:342.png|500px|frameless|thumb]]<br>  
<br>


==Sample Code ==
==Sample Code ==
Please download the [https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib DHT11Lib] firstly.Or to see [http://playground.arduino.cc/Main/DHTLib the website]
Please download the [https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib DHT11Lib] firstly.Or to see [http://playground.arduino.cc/Main/DHTLib the website] <br>
 
<span style=color:red> '''Note:''' before compiling the code, do remember to place the library into libraries directory of Arduino IDE. Otherwise, compiling will fail. </span><br>


<pre>
<pre>
Line 59: Line 68:
    
    
   delay(1000);
   delay(1000);
}</pre>
}
</pre>
 
<br>
== Result ==
Wire it up well and upload the above code to UNO board.<br>
<br>[[File:QQ图片20210526171948.png|600px|frameless|thumb]]<br>
Then open the serial monitor and set the baud rate as 9600, finally you will see the current temperature and humidity value.
<br>[[File:QQ图片20210526171.png|600px|frameless|thumb]]<br>
 
<br>


==Resources ==
==Resources ==


'''Video'''
* '''Video'''<br>
http://video.keyestudio.com/ks0034/


http://www.keyestudio.com/wp/2016/05/ks0034-dht11-temperature-and-humidity-sensor/
* '''Code and Libraries''' <br>
https://fs.keyestudio.com/KS0034


'''Datasheet'''


http://www.keyestudio.com/files/index/download/id/1463650483/
<br>


==Buy from ==
==Buy from ==
http://www.keyestudio.com/keyestudio-dht11-temperature-and-humidity-sensor-for-arduino.html


https://www.amazon.com/Keyestudio-Temperature-Humidity-Arduino-raspberry/dp/B0172TZ5ZQ/ref=sr_1_1?ie=UTF8&qid=1479954728&sr=8-1&keywords=keyestudio+DHT11+Temperature+and+Humidity+Sensor+for+Arduino
*[https://www.keyestudio.com/free-shipping-keyestudio-dht11-temperature-humidity-moisture-sensor-detection-module-for-arduino-p0374-p0374.html    '''Official Website''']
 
*[https://www.aliexpress.com/store/product/Free-shipping-DHT11-temperature-and-humidity-sensor/1452162_2051330134.html?spm=2114.12010612.8148356.5.75291aeewF4DNA    '''Shop on aliexpress''']
 
 
 
[[Category: Sensor]]
[[Category: Sensor]]

Latest revision as of 17:27, 26 May 2021


Introduction

This DHT11 Temperature and Humidity Sensor is a composite sensor which contains a calibrated digital signal output of the temperature and humidity.
Its technology ensures high reliability and excellent long-term stability. A high-performance 8-bit microcontroller is connected.
This sensor includes a resistive element and a sense of wet NTC temperature measuring devices. It has excellent quality, fast response, anti-interference ability and high cost performance advantages.
Each DHT11 sensor features extremely accurate calibration data of humidity calibration chamber. The calibration coefficients stored in the OTP program memory, internal sensors detect signals in the process, and we should call these calibration coefficients.
The single-wire serial interface system is integrated to make it quick and easy. Qualities of small size, low power, and 20-meter signal transmission distance make it a wide applied application or even the most demanding one. Convenient connection, special packages can be provided according to users’ need.
thumb


Specification

  • Supply Voltage: +5 V
  • Temperature Range: 0-50 °C error of ± 2 °C
  • Humidity: 20-90% RH ± 5% RH error
  • Interface: Digital


Connection Diagram


thumb


Sample Code

Please download the DHT11Lib firstly.Or to see the website

Note: before compiling the code, do remember to place the library into libraries directory of Arduino IDE. Otherwise, compiling will fail.

#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 4
  
void setup(){
  Serial.begin(9600);
  Serial.println("DHT TEST PROGRAM ");
  Serial.print("LIBRARY VERSION: ");
  Serial.println(DHT11LIB_VERSION);
  Serial.println();
  Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
}
  
void loop(){
  int chk;
  Serial.print("DHT11, \t");
  chk = DHT.read(DHT11_PIN);    // READ DATA
  switch (chk){
    case DHTLIB_OK:  
                Serial.print("OK,\t"); 
                break;

case DHTLIB_ERROR_CHECKSUM: 

                Serial.print("Checksum error,\t"); 
                break;
    case DHTLIB_ERROR_TIMEOUT: 
                Serial.print("Time out error,\t"); 
                break;
    default: 
                Serial.print("Unknown error,\t"); 
                break;
  }
 // DISPLAT DATA
  Serial.print(DHT.humidity,1);
  Serial.print(",\t");
  Serial.println(DHT.temperature,1);
  
  delay(1000);
}


Result

Wire it up well and upload the above code to UNO board.

thumb
Then open the serial monitor and set the baud rate as 9600, finally you will see the current temperature and humidity value.
thumb


Resources

  • Video

http://video.keyestudio.com/ks0034/

  • Code and Libraries

https://fs.keyestudio.com/KS0034



Buy from