

The KY-025 is a temperature and humidity sensor module manufactured by ESP32 with the part ID 13. It integrates the DHT11 sensor to provide accurate digital output for temperature and humidity measurements. This module is widely used in environmental monitoring, weather stations, and home automation systems due to its simplicity and reliability.








The KY-025 module is designed for ease of use and compatibility with microcontrollers like Arduino and ESP32. Below are its key technical details:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V - 5V |
| Operating Current | 0.5mA (typical) |
| Temperature Range | 0°C to 50°C |
| Temperature Accuracy | ±2°C |
| Humidity Range | 20% to 90% RH |
| Humidity Accuracy | ±5% RH |
| Output Type | Digital |
| Communication Protocol | Single-wire (proprietary) |
| Dimensions | 28mm x 12mm x 10mm |
The KY-025 module has three pins for easy interfacing with microcontrollers. Below is the pinout:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (3.3V - 5V) |
| 2 | GND | Ground pin |
| 3 | OUT | Digital output pin for temperature and humidity |
The KY-025 module is straightforward to use in a circuit. Follow the steps below to integrate it into your project:
VCC pin to the 3.3V or 5V power supply of your microcontroller and the GND pin to the ground.OUT pin to a digital input pin on your microcontroller.OUT pin requires a pull-up resistor (typically 10kΩ) to function correctly. Connect the resistor between the OUT pin and the VCC pin.Below is an example Arduino sketch to read temperature and humidity data from the KY-025 module:
#include <DHT.h>
// Define the pin connected to the KY-025 OUT pin
#define DHTPIN 2
// Define the DHT sensor type (DHT11 for KY-025)
#define DHTTYPE DHT11
// Initialize the DHT sensor
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600); // Start serial communication at 9600 baud
dht.begin(); // Initialize the DHT sensor
Serial.println("KY-025 Temperature and Humidity Sensor Test");
}
void loop() {
delay(2000); // Wait 2 seconds between readings
// Read temperature and humidity
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 KY-025 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");
}
OUT pin to ensure proper communication.No Output or Incorrect Readings:
OUT pin is connected to the correct digital input pin on the microcontroller.OUT and VCC pins."Failed to read from KY-025 sensor!" Error:
Inconsistent Readings:
Q: Can the KY-025 module be used outdoors?
A: The KY-025 is not waterproof or weatherproof. For outdoor use, it must be placed in a protective enclosure to shield it from moisture and extreme conditions.
Q: What is the maximum cable length for the KY-025?
A: The maximum cable length depends on the pull-up resistor value and the environment. Typically, a cable length of up to 20 meters is supported with a 10kΩ pull-up resistor.
Q: Can the KY-025 be used with a 3.3V microcontroller like ESP32?
A: Yes, the KY-025 is compatible with 3.3V microcontrollers. Ensure the VCC pin is connected to a 3.3V power source.
By following this documentation, you can effectively integrate the KY-025 module into your projects for reliable temperature and humidity monitoring.