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

How to Use Temperature/Humidity Sensor: Examples, Pinouts, and Specs

Image of Temperature/Humidity Sensor
Cirkit Designer LogoDesign with Temperature/Humidity Sensor in Cirkit Designer

Introduction

The DH-11 Sensor by Kuongshun Electronics is a reliable and cost-effective device designed to measure ambient temperature and humidity levels. It is widely used in applications such as weather monitoring systems, HVAC (Heating, Ventilation, and Air Conditioning) systems, and smart home automation. The sensor provides digital output, making it easy to interface with microcontrollers like Arduino, Raspberry Pi, and other embedded systems.

This sensor is ideal for projects requiring basic environmental monitoring, offering a balance of accuracy, simplicity, and affordability.

Explore Projects Built with Temperature/Humidity Sensor

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 Temperature and Humidity Monitoring System
Image of Copy of DHT11 - sim test 2: A project utilizing Temperature/Humidity Sensor in a practical application
This circuit is designed to measure ambient temperature and humidity using a DHT11 sensor, which is connected to an Arduino UNO microcontroller. The Arduino reads the sensor data and outputs the temperature and humidity readings to the serial monitor. A 10k Ohm pull-up resistor is used on the data line of the DHT11 sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO with DHT11 Temperature and Humidity Sensor Monitoring
Image of Measure Temperature and Humidity with Adafruit DHT11: A project utilizing Temperature/Humidity Sensor in a practical application
This circuit is designed to measure temperature and humidity using a DHT11 sensor interfaced with an Arduino UNO microcontroller. The Arduino is programmed to read the sensor data and output the temperature and humidity readings to the serial monitor. A pull-up resistor is connected to the data line of the DHT11 sensor to ensure reliable communication with the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO with DHT11 Temperature and Humidity Sensor Monitoring System
Image of Measure Temperature and Humidity with Adafruit DHT11: A project utilizing Temperature/Humidity Sensor in a practical application
This circuit is designed to measure temperature and humidity using a DHT11 sensor interfaced with an Arduino UNO microcontroller. The Arduino is programmed to read the sensor data, which is then output to the serial monitor for display. A pull-up resistor is connected between the sensor's data line and the 5V supply to ensure proper signal levels for the digital data communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Weather Station with I2C Sensors and LCD Display
Image of weather station: A project utilizing Temperature/Humidity Sensor in a practical application
This circuit is a weather station that measures temperature, humidity, atmospheric pressure, and light intensity. It uses an Arduino UNO as the central microcontroller, interfacing with a DHT22 sensor for temperature and humidity, a BMP180 sensor for pressure, an RTC DS3231 for real-time clock functionality, an LDR module for light intensity, and a rain sensor. The data from these sensors is displayed on an I2C LCD 16x2 screen, and the system is powered by a 9V battery connected through a 2.1mm Male connector.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Temperature/Humidity Sensor

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 Copy of DHT11 - sim test 2: A project utilizing Temperature/Humidity Sensor in a practical application
Arduino UNO Based Temperature and Humidity Monitoring System
This circuit is designed to measure ambient temperature and humidity using a DHT11 sensor, which is connected to an Arduino UNO microcontroller. The Arduino reads the sensor data and outputs the temperature and humidity readings to the serial monitor. A 10k Ohm pull-up resistor is used on the data line of the DHT11 sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Measure Temperature and Humidity with Adafruit DHT11: A project utilizing Temperature/Humidity Sensor in a practical application
Arduino UNO with DHT11 Temperature and Humidity Sensor Monitoring
This circuit is designed to measure temperature and humidity using a DHT11 sensor interfaced with an Arduino UNO microcontroller. The Arduino is programmed to read the sensor data and output the temperature and humidity readings to the serial monitor. A pull-up resistor is connected to the data line of the DHT11 sensor to ensure reliable communication with the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Measure Temperature and Humidity with Adafruit DHT11: A project utilizing Temperature/Humidity Sensor in a practical application
Arduino UNO with DHT11 Temperature and Humidity Sensor Monitoring System
This circuit is designed to measure temperature and humidity using a DHT11 sensor interfaced with an Arduino UNO microcontroller. The Arduino is programmed to read the sensor data, which is then output to the serial monitor for display. A pull-up resistor is connected between the sensor's data line and the 5V supply to ensure proper signal levels for the digital data communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of weather station: A project utilizing Temperature/Humidity Sensor in a practical application
Arduino UNO Based Weather Station with I2C Sensors and LCD Display
This circuit is a weather station that measures temperature, humidity, atmospheric pressure, and light intensity. It uses an Arduino UNO as the central microcontroller, interfacing with a DHT22 sensor for temperature and humidity, a BMP180 sensor for pressure, an RTC DS3231 for real-time clock functionality, an LDR module for light intensity, and a rain sensor. The data from these sensors is displayed on an I2C LCD 16x2 screen, and the system is powered by a 9V battery connected through a 2.1mm Male connector.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

The following are the key technical details of the DH-11 Sensor:

  • Manufacturer Part ID: DH-11 Sensor
  • Operating Voltage: 3.3V to 5.5V DC
  • Current Consumption: 0.3mA (measuring), 60µA (standby)
  • Temperature Range: 0°C to 50°C (±2°C accuracy)
  • Humidity Range: 20% to 90% RH (±5% accuracy)
  • Output Signal: Digital (1-wire protocol)
  • Sampling Rate: 1 Hz (1 reading per second)
  • Dimensions: 15.5mm x 12mm x 5.5mm
  • Operating Life: >500,000 measurements

Pin Configuration and Descriptions

The DH-11 Sensor has a 4-pin interface, but typically only 3 pins are used in most applications. Below is the pinout:

Pin Number Pin Name Description
1 VCC Power supply (3.3V to 5.5V DC)
2 DATA Digital data output (1-wire protocol)
3 NC Not connected (leave unconnected)
4 GND Ground (0V reference)

Note: Some DH-11 modules may include a pull-up resistor on the DATA pin. If not, you may need to add an external 10kΩ pull-up resistor.

Usage Instructions

How to Use the DH-11 Sensor in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. Connect the DATA Pin: Attach the DATA pin to a digital input pin on your microcontroller. Use a 10kΩ pull-up resistor if one is not already included on the module.
  3. Read Data: Use a compatible library or write a custom 1-wire protocol to read temperature and humidity data from the sensor.

Example Circuit

Below is an example of how to connect the DH-11 Sensor to an Arduino UNO:

  • VCC → 5V on Arduino
  • DATA → Digital Pin 2 on Arduino
  • GND → GND on Arduino

Arduino Code Example

Here is a sample Arduino sketch to read data from the DH-11 Sensor using the DHT library:

#include <DHT.h>

// Define the pin where the DH-11 DATA pin is connected
#define DHTPIN 2

// Define the type of DHT sensor (DHT11 in this case)
#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("DH-11 Sensor Initialized");
}

void loop() {
  delay(2000); // Wait 2 seconds between readings

  // 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 DH-11 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");
}

Important Considerations and Best Practices

  • Sampling Rate: The DH-11 Sensor has a sampling rate of 1 Hz. Avoid reading data more frequently than once per second to ensure accurate results.
  • Environmental Conditions: The sensor is designed for indoor use. Avoid exposing it to extreme temperatures, high humidity, or direct water contact.
  • Pull-Up Resistor: Ensure a 10kΩ pull-up resistor is connected to the DATA pin if not already included on the module.
  • Wiring Length: Keep the wiring between the sensor and the microcontroller as short as possible to minimize signal degradation.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the sensor is powered correctly (3.3V to 5.5V).
    • Verify the pull-up resistor on the DATA pin.
    • Check the wiring connections for loose or incorrect connections.
  2. Incorrect or NaN Readings:

    • Ensure the sampling rate is not faster than 1 Hz.
    • Verify that the sensor is operating within its specified temperature and humidity range.
    • Check for electromagnetic interference (EMI) from nearby devices.
  3. Sensor Not Responding:

    • Confirm that the correct pin is defined in the code.
    • Test the sensor with a different microcontroller or port to rule out hardware issues.

FAQs

Q1: Can the DH-11 Sensor measure negative temperatures?
No, the DH-11 Sensor is designed to measure temperatures in the range of 0°C to 50°C.

Q2: How accurate is the DH-11 Sensor?
The temperature accuracy is ±2°C, and the humidity accuracy is ±5%. For applications requiring higher precision, consider using the DHT22 sensor.

Q3: Can I use the DH-11 Sensor outdoors?
The DH-11 Sensor is not waterproof and is intended for indoor use. If used outdoors, ensure it is housed in a protective enclosure.

Q4: What is the maximum cable length for the DH-11 Sensor?
The recommended maximum cable length is 20 meters. For longer distances, use a shielded cable and reduce the pull-up resistor value to 5kΩ.

By following this documentation, you can effectively integrate the DH-11 Sensor into your projects for reliable temperature and humidity monitoring.