The KY-015 DHT11 Temperature-Humidity Sensor Module is a versatile and easy-to-use sensor that measures both temperature and humidity. It utilizes the DHT11 sensor to provide digital output of the temperature and humidity readings, making it straightforward to interface with microcontrollers such as the Arduino UNO. This module is widely used in weather stations, environmental monitoring systems, and home automation projects.
Parameter | Value |
---|---|
Operating Voltage | 3.3V - 5.5V |
Operating Current | 0.3mA (measuring) |
Temperature Range | 0°C to 50°C |
Humidity Range | 20% to 90% RH |
Temperature Accuracy | ±2°C |
Humidity Accuracy | ±5% RH |
Signal Output | Digital |
Response Time | 1 second |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5.5V) |
2 | DATA | Digital signal output |
3 | NC | Not connected |
4 | GND | Ground |
KY-015 DHT11 Module
-------------------
VCC -> 5V (Arduino)
DATA -> Digital Pin 2 (Arduino)
GND -> GND (Arduino)
#include <DHT.h>
#define DHTPIN 2 // Digital pin connected to the DHT11 sensor
#define DHTTYPE DHT11 // DHT11 sensor type
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
delay(2000); // Wait a few seconds between measurements
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
// Check if any reads failed and exit early (to try again).
if (isnan(humidity) || isnan(temperature)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" *C");
}
By following this documentation, users should be able to effectively integrate and utilize the KY-015 DHT11 Temperature-Humidity Sensor Module in their projects.