Ks0129 keyestudio EASY plug DHT11 Temperature and Humidity Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long term stability.<br>
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long term stability.<br>


<span style=color:red> '''Special Note:''' <br>
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><br>
<br>
<br>
==Specification==
==Specification==
* Connector: Easy plug
* Connector: Easy plug
Line 28: Line 31:
<br>
<br>
==Upload the Code==
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.  
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<pre>
<br>[[File:ks0397 20.1.png|500px|frameless|thumb]]<br>
#include <dht11.h>
 
dht11 DHT;
<br>
#define DHT11_PIN 9
==What You Should See==
void setup(){
Open the Serial monitor, you should be able to see the temperature and humidity data. <br>
Serial.begin(9600);
<br>[[File:ks0397 20-2.png|600px|frameless|thumb]]<br>
Serial.println("DHT TEST PROGRAM ");
 
Serial.print("LIBRARY VERSION: ");
<br>
Serial.println(DHT11LIB_VERSION);
<span style="color: red">'''Little Knowledge:'''</span> <br>
Serial.println();
* If the data is scrolling very fast, you can’t make out the data clearly, so you can modify the Delay time in the code to check it easily.
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
<br>[[File:ks0397 20-5.png|500px|frameless|thumb]]<br>
}
 
void loop(){
<br>
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);
}
</pre>


<span style="color: red">'''Code to Note: ''' </span> <br>
==Extension Experiment==
Before compile the code, do remember to put the libraries needed inside the libraries folder of Arduino IDE directory.<br>
<br>
Download all the libraries:<br>
<span style=color:brown>'''Make a Hygrothermograph'''</span><br>  
https://drive.google.com/open?id=1GIaSDErMAz5O6N_h9Ml_Zk4dRjR-WapT
<br>
'''Hookup Guide'''<br>
Connect the EASY Plug DHT11 sensor and 1602 LCD module to control board using RJ11 cables.  
<br>[[File:温湿度2.jpg|500px|frameless|thumb]]<br>


<br>
<br>
'''Test Code'''<br>
Below is an example code.
<br>[[File:ks0397 20.1.png|500px|frameless|thumb]]<br>


==What You Should See==
<br>
Open the Serial monitor to see the temperature and humidity data.  
'''What You Should See'''<br>
<br>[[File:ks0129 Result.gif|700px|frameless|thumb]]<br>
<br>[[File:ks0397 20-3.png|500px|frameless|thumb]]<br>
<br>
Upload success, you should be able to see the temperature and humidity data are showed on the LCD screen.  
<br>[[File:ks0397 20-4.png|500px|frameless|thumb]]<br>


<br>
<br>


<br>
==Resources ==
==Resources ==
'''Datasheet:'''<br>
https://drive.google.com/open?id=16c0ZfBYkPR77hy53iIoWxFF7lu-q7crj


'''Download the libraries dht11:'''<br>
https://fs.keyestudio.com/KS0129
https://drive.google.com/open?id=1GIaSDErMAz5O6N_h9Ml_Zk4dRjR-WapT


'''Download the code:''' <br>
https://drive.google.com/open?id=1ugnlOI5qxP5vwVkLjCxEaCKTrk019owp


<br>
<br>


==Buy from ==
==Buy from ==
*'''Official Website:''' http://www.keyestudio.com/ks0129.html
*[https://www.keyestudio.com/new-keyestudio-easy-plug-dht11-temp-humidity-sensor-module-for-arduino-steam-p0070-p0070.html   '''Official Website''']


* [https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-DHT11-Temperature-Humidity-Sensor-Module-for-arduino/1452162_32645959631.html?spm=2114.12010612.8148356.24.41484ba7oHPAY6  Shop on aliexpress ]
* [https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-DHT11-Temperature-Humidity-Sensor-Module-for-arduino/1452162_32645959631.html?spm=2114.12010612.8148356.24.41484ba7oHPAY6  Shop on aliexpress ]

Latest revision as of 16:42, 7 January 2021

Keyestudio EASY plug DHT11 Temperature and Humidity Sensor

Introduction

The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor.
It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and provides a pre-calibrated digital signal output.
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long term stability.

Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


Specification

  • Connector: Easy plug
  • Supply Voltage: 5V
  • Relative Humidity and temperature measurement
  • Good for 20-90% humidity readings with 5% accuracy
  • Good for 0-50°C temperature readings ±2°C accuracy
  • Interface: Digital
  • Low Cost


Technical Details

  • Dimensions: 42mm*20mm*18mm
  • Weight: 5.6g


Connect It Up

Connect the EASY Plug DHT11 sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See

Open the Serial monitor, you should be able to see the temperature and humidity data.

thumb


Little Knowledge:

  • If the data is scrolling very fast, you can’t make out the data clearly, so you can modify the Delay time in the code to check it easily.


thumb


Extension Experiment


Make a Hygrothermograph

Hookup Guide
Connect the EASY Plug DHT11 sensor and 1602 LCD module to control board using RJ11 cables.
thumb


Test Code
Below is an example code.
thumb


What You Should See

thumb

Upload success, you should be able to see the temperature and humidity data are showed on the LCD screen.
thumb



Resources

https://fs.keyestudio.com/KS0129



Buy from