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

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==EASY plug DHT11 Temperature and Humidity Sensor==
[[image:ks0129图.jpg|thumb|600px|right|Keyestudio EASY plug DHT11 Temperature and Humidity Sensor]]
<br>[[File:ks0129-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==
This DHT11 Temperature and Humidity Sensor features a digital temperature and humidity sensor complex with a calibrated digital signal output. It can detect temperature and humidity of the surroundings. It has excellent quality, fast response, anti-interference ability and high cost performance advantages.<br>
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. <br>
Note: this module needs to be used together with EASY plug control board.<br>
It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and provides a pre-calibrated digital signal output. <br>
 
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long term stability.<br>


<br>
==Specification==
==Specification==
* Interface: Easy plug
* Connector: Easy plug
* Supply Voltage: +5 V
* Supply Voltage: 5V
* Temperature range: 0-50 °C error of ± 2 °C
* Relative Humidity and temperature measurement
* Humidity: 20-90% RH ± 5% RH error
* Good for 20-90% humidity readings with 5% accuracy
* Good for 0-50°C temperature readings ±2°C accuracy
* Interface: Digital
* Interface: Digital
* Size: 42*20mm
* Low Cost
* Weight: 6g
 


==Connection Diagram ==
<br>
<br>[[File:ks0129-2.png|500px|frameless|thumb]]<br>
==Technical Details==
* Dimensions: 42mm*20mm*18mm
* Weight: 5.6g
<br>


==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.
<br>[[File:ks0129.jpg|500px|frameless|thumb]]<br>


==Sample Code==
<br>
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.   
<pre>
<pre>
#include <dht11.h>
#include <dht11.h>
dht11 DHT;
dht11 DHT;
#define DHT11_PIN 10
#define DHT11_PIN 9
void setup(){
void setup(){
Serial.begin(9600);
Serial.begin(9600);
Serial.println("DHT TEST PROGRAM ");
Serial.println("DHT TEST PROGRAM ");
Serial.print("LIBRARY VERSION: ");
Serial.print("LIBRARY VERSION: ");
Serial.println(DHT11LIB_VERSION);
Serial.println(DHT11LIB_VERSION);
Serial.println();
Serial.println();
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
}
}
void loop(){
void loop(){
int chk;
int chk;
Serial.print("DHT11, \t");
Serial.print("DHT11, \t");
chk = DHT.read(DHT11_PIN);   // READ DATA
chk = DHT.read(DHT11_PIN);//READ DATA
switch (chk){
switch (chk){
  case DHTLIB_OK:
case DHTLIB_OK:
              Serial.print("OK,\t");
Serial.print("OK,\t");
              break;
break;
  case DHTLIB_ERROR_CHECKSUM:
case DHTLIB_ERROR_CHECKSUM:
              Serial.print("Checksum error,\t");
Serial.print("Checksum error,\t");
              break;
break;
  case DHTLIB_ERROR_TIMEOUT:
case DHTLIB_ERROR_TIMEOUT:
              Serial.print("Time out error,\t");
Serial.print("Time out error,\t");
              break;
break;
  default:
default:
              Serial.print("Unknown error,\t");
Serial.print("Unknown error,\t");
              break;
break;
}
}
// DISPLAT DATA
// DISPLAT DATA
Serial.print(DHT.humidity,1);
Serial.print(DHT.humidity,1);
Serial.print(",\t");
Serial.print(",\t");
Serial.println(DHT.temperature,1);
Serial.println(DHT.temperature,1);
delay(1000);
delay(1000);
}
}
</pre>
</pre>


==Resources ==
<span style="color: red">'''Code to Note: '''
Before compile the code, do remember to put the libraries needed inside the libraries folder of Arduino IDE directory.<br>
Download all the libraries:<br>
https://drive.google.com/open?id=1GIaSDErMAz5O6N_h9Ml_Zk4dRjR-WapT


'''Datasheet'''
<br>
==What You Should See==
Open the Serial monitor to see the temperature and humidity data.
<br>[[File:ks0129 Result.gif|500px|frameless|thumb]]<br>


<br>
==Resources ==
'''Datasheet'''<br>
https://drive.google.com/open?id=16c0ZfBYkPR77hy53iIoWxFF7lu-q7crj
https://drive.google.com/open?id=16c0ZfBYkPR77hy53iIoWxFF7lu-q7crj
 
<br>
'''Download the libraries of dht11'''
'''Download the libraries of dht11'''<br>
 
https://drive.google.com/open?id=1qY8b3_gpWn53gIKmSqr1kBF1kzFQSyMC
https://drive.google.com/open?id=1qY8b3_gpWn53gIKmSqr1kBF1kzFQSyMC
<br>


==Buy from ==
==Buy from ==
'''Official Website'''
'''Official Website'''<br>
 
http://www.keyestudio.com/keyestudio-easy-plug-dht11-temperature-humidity-sensor-module-for-arduino.html
http://www.keyestudio.com/keyestudio-easy-plug-dht11-temperature-humidity-sensor-module-for-arduino.html




[[category:EASY Plug]]
[[category:EASY Plug]]

Revision as of 11:53, 16 November 2018

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.


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

Copy and paste below code to Arduino IDE and upload.

#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 9 
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);
}

Code to Note: Before compile the code, do remember to put the libraries needed inside the libraries folder of Arduino IDE directory.
Download all the libraries:
https://drive.google.com/open?id=1GIaSDErMAz5O6N_h9Ml_Zk4dRjR-WapT


What You Should See

Open the Serial monitor to see the temperature and humidity data.
thumb


Resources

Datasheet
https://drive.google.com/open?id=16c0ZfBYkPR77hy53iIoWxFF7lu-q7crj
Download the libraries of dht11
https://drive.google.com/open?id=1qY8b3_gpWn53gIKmSqr1kBF1kzFQSyMC

Buy from

Official Website
http://www.keyestudio.com/keyestudio-easy-plug-dht11-temperature-humidity-sensor-module-for-arduino.html