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

How to Use Humidity Sensor Keyes: Examples, Pinouts, and Specs

Image of Humidity Sensor Keyes
Cirkit Designer LogoDesign with Humidity Sensor Keyes in Cirkit Designer

Introduction

The Keyes Humidity Sensor is a versatile electronic component designed to measure the moisture level in the air. It provides both analog and digital outputs, making it suitable for a wide range of applications. This sensor is commonly used in environmental monitoring, weather stations, agricultural systems, and smart home devices. Its compact design and ease of integration with microcontrollers, such as the Arduino UNO, make it a popular choice for hobbyists and professionals alike.

Explore Projects Built with Humidity Sensor Keyes

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 UNO-Based Smart Humidifier and Temperature Monitor with OLED Display
Image of Humidity Control: A project utilizing Humidity Sensor Keyes in a practical application
This circuit is a smart environmental monitoring and control system. It uses an Arduino UNO to read data from a temperature-humidity sensor and a real-time clock, displays information on an OLED screen, and controls an exhaust fan and a humidifier via a relay module. The system is powered by a 5V power supply and includes a key switch for user input.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based IoT Temperature and Humidity Controller with OLED Display and Wi-Fi Connectivity
Image of ESP32-DHT11-POWER: A project utilizing Humidity Sensor Keyes in a practical application
This circuit is an IoT-based temperature and humidity control system using an ESP32 microcontroller. It includes sensors for temperature and humidity, an OLED display for real-time data visualization, and relays to control external devices like a heater and humidifier. The system is integrated with Blynk for remote monitoring and control via a mobile app.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart AC Control System with Temperature and Humidity Monitoring
Image of MAIN: A project utilizing Humidity Sensor Keyes in a practical application
This is a smart climate control system that uses an ESP32 to read from multiple temperature and humidity sensors, display the readings on an OLED screen, and control an AC unit via IR signals. It includes user interaction through buttons and has the capability to store settings in EEPROM.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Environmental Monitoring and Security System
Image of PB: A project utilizing Humidity Sensor Keyes in a practical application
This circuit features an Arduino UNO microcontroller as the central processing unit, interfaced with a DHT11 temperature and humidity sensor, an MQ-2 gas sensor, an HC-SR501 motion sensor, a buzzer module, and a membrane matrix keypad. The Arduino is configured to read analog signals from the MQ-2 sensor, digital signals from the DHT11 and HC-SR501 sensors, and to control the buzzer. The keypad is connected to the digital pins for user input, and the sensors and buzzer are powered by the Arduino's 5V output.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Humidity Sensor Keyes

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 Humidity Control: A project utilizing Humidity Sensor Keyes in a practical application
Arduino UNO-Based Smart Humidifier and Temperature Monitor with OLED Display
This circuit is a smart environmental monitoring and control system. It uses an Arduino UNO to read data from a temperature-humidity sensor and a real-time clock, displays information on an OLED screen, and controls an exhaust fan and a humidifier via a relay module. The system is powered by a 5V power supply and includes a key switch for user input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32-DHT11-POWER: A project utilizing Humidity Sensor Keyes in a practical application
ESP32-Based IoT Temperature and Humidity Controller with OLED Display and Wi-Fi Connectivity
This circuit is an IoT-based temperature and humidity control system using an ESP32 microcontroller. It includes sensors for temperature and humidity, an OLED display for real-time data visualization, and relays to control external devices like a heater and humidifier. The system is integrated with Blynk for remote monitoring and control via a mobile app.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MAIN: A project utilizing Humidity Sensor Keyes in a practical application
ESP32-Based Smart AC Control System with Temperature and Humidity Monitoring
This is a smart climate control system that uses an ESP32 to read from multiple temperature and humidity sensors, display the readings on an OLED screen, and control an AC unit via IR signals. It includes user interaction through buttons and has the capability to store settings in EEPROM.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PB: A project utilizing Humidity Sensor Keyes in a practical application
Arduino UNO Based Environmental Monitoring and Security System
This circuit features an Arduino UNO microcontroller as the central processing unit, interfaced with a DHT11 temperature and humidity sensor, an MQ-2 gas sensor, an HC-SR501 motion sensor, a buzzer module, and a membrane matrix keypad. The Arduino is configured to read analog signals from the MQ-2 sensor, digital signals from the DHT11 and HC-SR501 sensors, and to control the buzzer. The keypad is connected to the digital pins for user input, and the sensors and buzzer are powered by the Arduino's 5V output.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

  • Manufacturer: Keyes
  • Model: Humidity Sensor
  • Output Type: Analog and Digital
  • Operating Voltage: 3.3V to 5V DC
  • Current Consumption: ≤ 20mA
  • Humidity Range: 20% to 90% Relative Humidity (RH)
  • Operating Temperature: 0°C to 50°C
  • Dimensions: 30mm x 15mm x 10mm (approx.)

Pin Configuration and Descriptions

The Keyes Humidity Sensor has a 3-pin interface. Below is the pinout description:

Pin Name Description
1 VCC Power supply pin. Connect to 3.3V or 5V DC.
2 GND Ground pin. Connect to the ground of the circuit.
3 OUT Output pin. Provides an analog voltage proportional to humidity or a digital signal.

Usage Instructions

Connecting the Sensor

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power source, depending on your microcontroller's operating voltage.
  2. Ground: Connect the GND pin to the ground of your circuit.
  3. Output:
    • For analog output, connect the OUT pin to an analog input pin on your microcontroller.
    • For digital output, connect the OUT pin to a digital input pin. Adjust the onboard potentiometer to set the desired humidity threshold for digital triggering.

Example Circuit with Arduino UNO

Below is an example of how to connect the Keyes Humidity Sensor to an Arduino UNO:

  • VCC → 5V on Arduino
  • GND → GND on Arduino
  • OUT → A0 (for analog reading) or D2 (for digital reading)

Sample Code for Arduino UNO

The following code demonstrates how to read the analog output of the Keyes Humidity Sensor and display the humidity level in the Serial Monitor:

// Define the analog pin connected to the sensor's OUT pin
const int sensorPin = A0;

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  pinMode(sensorPin, INPUT); // Set the sensor pin as input
}

void loop() {
  int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
  float humidity = map(sensorValue, 0, 1023, 20, 90); 
  // Map the sensor value to the humidity range (20% to 90% RH)

  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.println("%");

  delay(1000); // Wait for 1 second before taking the next reading
}

Important Considerations

  • Calibration: The sensor may require calibration for precise measurements. Use the onboard potentiometer to adjust the digital output threshold.
  • Environmental Factors: Avoid exposing the sensor to extreme temperatures or direct water contact, as this may damage the component.
  • Power Supply: Ensure a stable power supply to avoid fluctuations in readings.

Troubleshooting and FAQs

Common Issues

  1. No Output or Incorrect Readings:

    • Cause: Loose connections or incorrect wiring.
    • Solution: Double-check all connections and ensure the sensor is powered correctly.
  2. Fluctuating Readings:

    • Cause: Electrical noise or unstable power supply.
    • Solution: Use decoupling capacitors near the sensor's power pins to stabilize the voltage.
  3. Digital Output Not Triggering:

    • Cause: Incorrect potentiometer adjustment.
    • Solution: Rotate the potentiometer to adjust the humidity threshold.
  4. Sensor Not Responding:

    • Cause: Sensor damage or exceeding operating conditions.
    • Solution: Verify the operating temperature and humidity range. Replace the sensor if necessary.

FAQs

Q1: Can this sensor measure humidity below 20% or above 90%?
A1: No, the sensor is designed to operate within the range of 20% to 90% RH. Readings outside this range may not be accurate.

Q2: Can I use this sensor with a 3.3V microcontroller?
A2: Yes, the sensor is compatible with both 3.3V and 5V systems.

Q3: How do I know if the digital output is triggered?
A3: The digital output pin will go HIGH or LOW depending on the humidity level and the threshold set by the potentiometer.

Q4: Is this sensor waterproof?
A4: No, the sensor is not waterproof. Avoid direct exposure to water or high humidity for extended periods.

By following this documentation, you can effectively integrate the Keyes Humidity Sensor into your projects for reliable humidity monitoring.