

The KY-011 is a temperature and humidity sensor module that utilizes the DHT11 sensor. It provides accurate readings of ambient temperature and humidity levels, making it suitable for various environmental monitoring applications. The module is widely used in weather stations, home automation systems, and industrial monitoring setups due to its reliability and ease of use.








The KY-011 module is built around the DHT11 sensor, which is known for its simplicity and efficiency. Below are the key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5.5V |
| Operating Current | 0.3mA (measuring), 60µA (standby) |
| Temperature Range | 0°C to 50°C |
| Temperature Accuracy | ±2°C |
| Humidity Range | 20% to 90% RH |
| Humidity Accuracy | ±5% RH |
| Communication Protocol | Single-wire digital signal |
| Sampling Period | ≥1 second |
The KY-011 module has three pins for easy interfacing. Below is the pinout description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5.5V) |
| 2 | DATA | Digital data output for temperature and humidity readings |
| 3 | GND | Ground connection |
The KY-011 module is straightforward to use in a circuit. Follow the steps below to integrate it into your project:
Wiring:
VCC pin of the KY-011 to the 5V pin on the Arduino UNO.GND pin of the KY-011 to the GND pin on the Arduino UNO.DATA pin of the KY-011 to a digital I/O pin on the Arduino UNO (e.g., pin 2).Install Required Library:
DHT library from the Arduino Library Manager. This library simplifies communication with the DHT11 sensor.Arduino Code: Use the following example code to read temperature and humidity data from the KY-011 module:
// Include the DHT library for sensor communication
#include <DHT.h>
// Define the pin connected to the DATA pin of the KY-011
#define DHTPIN 2
// Define the sensor type (DHT11)
#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-011 Temperature and Humidity Sensor Test");
// Initialize the DHT sensor
dht.begin();
}
void loop() {
// Wait a second between readings (DHT11 requires a 1-second delay)
delay(1000);
// Read humidity and temperature
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");
}
DATA line if the module does not already include one.No Data Output:
Invalid or NaN Readings:
dht.begin() function is called in the setup() and add a delay of at least 1 second between readings.Inaccurate Readings:
Library Not Found:
DHT library is not installed.Q1: Can the KY-011 measure negative temperatures?
No, the DHT11 sensor used in the KY-011 module has a temperature range of 0°C to 50°C.
Q2: How often can I take readings from the KY-011?
The DHT11 sensor requires a minimum sampling period of 1 second between readings.
Q3: Can I use the KY-011 with a 3.3V microcontroller?
Yes, the KY-011 operates within a voltage range of 3.3V to 5.5V, making it compatible with 3.3V systems.
Q4: Is the KY-011 suitable for outdoor use?
The KY-011 is not waterproof and should be protected from direct exposure to water or condensation when used outdoors.