

The KY-015 is a temperature and humidity sensor module that utilizes the DHT11 sensor. It is designed to provide accurate readings of ambient temperature and humidity levels, making it ideal for environmental monitoring applications. The module is widely used in weather stations, home automation systems, and agricultural monitoring setups. Its compact size and ease of use make it a popular choice for both hobbyists and professionals.








The KY-015 module is built around the DHT11 sensor and has the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5.5V |
| Temperature Range | 0°C to 50°C |
| Temperature Accuracy | ±2°C |
| Humidity Range | 20% to 90% RH |
| Humidity Accuracy | ±5% RH |
| Communication Protocol | Digital (Single-Wire) |
| Dimensions | 28mm x 12mm x 10mm |
The KY-015 module has three pins for easy interfacing:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (3.3V to 5.5V) |
| 2 | DATA | Digital data output pin for temperature and humidity |
| 3 | GND | Ground pin |
Below is an example of how to use the KY-015 module with an Arduino UNO:
// Include the DHT library for communication with the KY-015 module
#include <DHT.h>
// Define the pin connected to the KY-015 DATA pin
#define DHTPIN 2
// Define the sensor type (DHT11 for KY-015)
#define DHTTYPE DHT11
// Initialize the DHT sensor
DHT dht(DHTPIN, DHTTYPE);
void setup() {
// Start the serial communication for debugging
Serial.begin(9600);
Serial.println("KY-015 Temperature and Humidity Sensor Test");
// Initialize the DHT sensor
dht.begin();
}
void loop() {
// Wait a few seconds between readings
delay(2000);
// Read temperature and humidity values
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
// Check if the readings are valid
if (isnan(humidity) || isnan(temperature)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
// Print the readings to the serial monitor
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
}
No Data Output:
Incorrect Readings:
"Failed to Read from DHT Sensor" Error:
Q: Can the KY-015 module be used outdoors?
A: The KY-015 is not waterproof and should not be exposed to rain or direct sunlight. For outdoor use, consider placing it in a protective enclosure.
Q: What is the maximum cable length for the DATA pin?
A: The maximum cable length depends on the pull-up resistor value and environmental noise. For reliable communication, keep the cable length under 20 meters.
Q: Can I use the KY-015 with a 3.3V microcontroller?
A: Yes, the KY-015 is compatible with both 3.3V and 5V systems.
Q: How often can I read data from the KY-015?
A: The DHT11 sensor on the KY-015 module has a sampling rate of 1Hz, so you can read data once per second.