Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use KY-005: Examples, Pinouts, and Specs

Image of KY-005
Cirkit Designer LogoDesign with KY-005 in Cirkit Designer

Introduction

The KY-005 is a digital temperature and humidity sensor module manufactured by Arduino, with the part ID CINCO. It integrates the DHT11 sensor to provide accurate measurements of temperature and humidity. This module is widely used in environmental monitoring, home automation, weather stations, and other applications requiring reliable climate data.

The KY-005 is compact, easy to use, and compatible with microcontrollers like the Arduino UNO, making it an excellent choice for both beginners and experienced developers.

Explore Projects Built with KY-005

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Nano-Based Wireless Joystick and Motion Controller
Image of hand gesture: A project utilizing KY-005 in a practical application
This circuit features an Arduino Nano microcontroller interfaced with an HC-05 Bluetooth module, an MPU-6050 accelerometer/gyroscope, and a KY-023 Dual Axis Joystick Module. The Arduino Nano is powered by a 9V battery through a rocker switch and communicates with the HC-05 for Bluetooth connectivity, reads joystick positions from the KY-023 module via analog inputs, and communicates with the MPU-6050 over I2C to capture motion data. The circuit is likely designed for wireless control and motion sensing applications, such as a remote-controlled robot or a game controller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
Image of padelpro transmitter: A project utilizing KY-005 in a practical application
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Security System with RFID and Laser Tripwire
Image of CPE doorlock system: A project utilizing KY-005 in a practical application
This circuit is designed for a comprehensive security and access control system with motion detection, access via RFID, and a break-beam sensor. It includes a solenoid lock controlled by a relay, visual and audible alerts, and a robust power management system with solar and battery backup to ensure uninterrupted operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 Bluetooth-Controlled Flame Detection System with Servo Actuation
Image of apv circuit 1: A project utilizing KY-005 in a practical application
This circuit uses an Arduino Mega 2560 to monitor four KY-026 flame sensors and control four micro servo motors. The HC-05 Bluetooth module allows for wireless communication, enabling remote monitoring and control of the system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with KY-005

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of hand gesture: A project utilizing KY-005 in a practical application
Arduino Nano-Based Wireless Joystick and Motion Controller
This circuit features an Arduino Nano microcontroller interfaced with an HC-05 Bluetooth module, an MPU-6050 accelerometer/gyroscope, and a KY-023 Dual Axis Joystick Module. The Arduino Nano is powered by a 9V battery through a rocker switch and communicates with the HC-05 for Bluetooth connectivity, reads joystick positions from the KY-023 module via analog inputs, and communicates with the MPU-6050 over I2C to capture motion data. The circuit is likely designed for wireless control and motion sensing applications, such as a remote-controlled robot or a game controller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of padelpro transmitter: A project utilizing KY-005 in a practical application
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CPE doorlock system: A project utilizing KY-005 in a practical application
ESP32-Based Security System with RFID and Laser Tripwire
This circuit is designed for a comprehensive security and access control system with motion detection, access via RFID, and a break-beam sensor. It includes a solenoid lock controlled by a relay, visual and audible alerts, and a robust power management system with solar and battery backup to ensure uninterrupted operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of apv circuit 1: A project utilizing KY-005 in a practical application
Arduino Mega 2560 Bluetooth-Controlled Flame Detection System with Servo Actuation
This circuit uses an Arduino Mega 2560 to monitor four KY-026 flame sensors and control four micro servo motors. The HC-05 Bluetooth module allows for wireless communication, enabling remote monitoring and control of the system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

  • Sensor Type: DHT11 (Digital Temperature and Humidity Sensor)
  • Operating Voltage: 3.3V to 5.5V
  • Temperature Range: 0°C to 50°C (±2°C accuracy)
  • Humidity Range: 20% to 90% RH (±5% accuracy)
  • Output Signal: Digital (single-bus communication)
  • Sampling Rate: 1 Hz (1 reading per second)
  • Dimensions: 28mm x 12mm x 10mm

Pin Configuration and Descriptions

The KY-005 module has three pins, as detailed in the table below:

Pin Number Pin Name Description
1 VCC Power supply (3.3V to 5.5V)
2 DATA Digital signal output
3 GND Ground connection

Usage Instructions

How to Use the KY-005 in a Circuit

  1. Connect the Pins:

    • Connect the VCC pin to the 5V output of your microcontroller.
    • Connect the GND pin to the ground (GND) of your microcontroller.
    • Connect the DATA pin to a digital input pin on your microcontroller (e.g., pin 2 on an Arduino UNO).
  2. Add a Pull-Up Resistor:

    • Place a 10kΩ pull-up resistor between the DATA pin and the VCC pin to ensure stable communication.
  3. Upload the Code:

    • Use the Arduino IDE to upload the provided code to your Arduino UNO.

Important Considerations and Best Practices

  • Ensure the module is not exposed to extreme temperatures or humidity levels beyond its specified range.
  • Allow the sensor to stabilize for a few seconds after powering it on before taking readings.
  • Avoid placing the sensor in direct sunlight or near heat sources, as this may affect accuracy.
  • Use a pull-up resistor to maintain reliable communication between the sensor and the microcontroller.

Example Code for Arduino UNO

Below is an example code to read temperature and humidity data from the KY-005 module using the DHT library:

// Include the DHT library for sensor communication
#include <DHT.h>

// Define the pin connected to the DATA pin of the KY-005
#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-005 Temperature and Humidity Sensor Test");

  // Initialize the DHT sensor
  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements
  delay(2000);

  // Read the humidity value
  float humidity = dht.readHumidity();
  // Read the temperature value in Celsius
  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 results to the Serial Monitor
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" °C");
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the DATA pin is connected to the correct digital pin on the microcontroller.
    • Verify that the pull-up resistor (10kΩ) is properly connected between the DATA and VCC pins.
  2. Incorrect Readings:

    • Check that the sensor is operating within its specified temperature and humidity range.
    • Avoid placing the sensor in areas with rapid temperature changes or high airflow.
  3. "Failed to Read from DHT Sensor" Error:

    • Ensure the DHT library is installed in the Arduino IDE.
    • Verify that the correct pin number and sensor type (DHT11) are defined in the code.

FAQs

Q: Can the KY-005 be used with a 3.3V microcontroller?
A: Yes, the KY-005 operates within a voltage range of 3.3V to 5.5V, making it compatible with 3.3V microcontrollers.

Q: How often can I take readings from the KY-005?
A: The KY-005 has a sampling rate of 1 Hz, meaning it can provide one reading per second.

Q: Can I extend the cable length of the KY-005?
A: Yes, but keep the cable length as short as possible to avoid signal degradation. If longer cables are necessary, use shielded cables and ensure proper grounding.

Q: Is the KY-005 suitable for outdoor use?
A: The KY-005 is not waterproof and should be protected from direct exposure to rain or extreme environmental conditions. Use a protective enclosure if deploying outdoors.