DHT11 Sensor: Operation, Wiring, Specs, and Applications 

Dec 09 2025
Source: DiGi-Electronics
Browse: 1299

The DHT11 is a small digital sensor that measures temperature and humidity using a built-in thermistor, humidity element, and internal ADC. It works with common microcontrollers and needs only simple wiring. This article explains its advantages, pinout, sensing process, communication method, specifications, setup steps, limits, and applications in detail.

Figure 1. DHT11 Sensor

DHT11 Sensor Overview

The DHT11 is a compact, low-cost digital sensor designed for measuring temperature and relative humidity. It combines a calibrated NTC thermistor, a capacitive humidity element, and an internal 8-bit ADC. The sensor outputs pre-processed digital data, simplifying integration with Arduino, ESP8266/ESP32, Raspberry Pi, and other microcontroller platforms. Its small size, stable performance, and beginner-friendly digital interface make it suitable for indoor environmental monitoring and basic IoT systems.

Main Advantages of the DHT11 Sensor

Easy Digital Output

Provides temperature and humidity readings using a digital single-wire protocol, eliminating the need for analog measurement circuits.

Very Budget-Friendly

Offers reliable environmental readings at an extremely low cost, making it practical for basic and educational sensing setups.

Broad Compatibility

Works with common development boards such as Arduino, ESP-series modules, Raspberry Pi, PIC, and STM32, requiring only basic firmware libraries.

Simplified Wiring

Uses a three-pin interface (VCC, DATA, GND), allowing quick and error-free wiring, even in compact or beginner projects.

Low Power Operation

Consumes minimal current during active and idle states, making it useful for devices powered by small batteries or USB sources.

Wide Library Support

Supported by extensive community libraries and documentation, which shortens setup time and improves troubleshooting.

DHT11 Pinout and Electrical Specifications 

Pinout Overview

Pin No.Pin NameFunctionNotes
1VCCPower supply inputWorks at 3.3–5.5V
2DATADigital signal pinNeeds a pull-up resistor
3NC / GNDNot connected or groundedDepends on the module type
4GNDGroundCommon reference point

Electrical Characteristics

ParameterTypical ValueDescription
Supply Voltage3.0–5.5VWorks with both 3V and 5V systems
Max Current2.5 mALow operating current
Standby Current< 100 µAMinimal power use when idle
Sampling Rate1 HzUpdates once per second
CommunicationSingle-wire digitalUses a simple timing-based protocol

DHT11 Temperature and Humidity Sensing Process

Figure 2. DHT11 Temperature and Humidity Sensing Process

The DHT11 uses two internal sensing components:

• NTC Thermistor: Detects temperature by changing resistance as heat varies.

• Capacitive Humidity Sensor: Measures relative humidity through capacitance changes affected by moisture in the air.

A built-in microcontroller continuously reads these analog changes, applies factory calibration curves, and converts the measurements into digital values. This fully digital output ensures stable readings without the need for external ADCs or correction algorithms.

DHT11 Single-Wire Data Communication

Figure 3. DHT11 Single-Wire Data Communication

After the start condition, the microcontroller pulls the DATA pin LOW for about 18 ms to request a reading and then releases the line. The DHT11 answers with a presence pulse to show that it is ready to send data. Immediately after this handshake, the sensor transmits a 40-bit data frame on the same single-wire bus. The frame contains humidity, temperature, and a checksum, arranged as shown in Table:

Data SegmentDescription
8 bits for humidity (integer)Integer part of humidity
8 bits for humidity (decimal)Decimal part of humidity
8 bits for temperature (integer)Integer part of temperature
8 bits for temperature (decimal)Decimal part of temperature
8 bits for the checksumValidates transmitted data

Each bit in the frame is encoded by how long the signal stays HIGH. By measuring these HIGH-level durations, the microcontroller reconstructs all 40 bits and recovers the humidity, temperature, and checksum values.

DHT11 Technical Specifications

CategorySpecification
Temperature Range0°C to 50°C
Temperature Accuracy±2°C
Humidity Range20%–90% RH
Humidity Accuracy±5% RH
Temperature Resolution1°C
Humidity Resolution1%
Output TypeDigital (single wire)
Sampling Interval1 second
Operating Current0.5–2.5 mA
Storage Conditions–20°C to 60°C, 20–90% RH
Sensor Lifespan\~5 years typical
Dimensions\~15.5 × 12 × 5.5 mm

Comparing the DHT11 with Other Common Sensors

FeatureDHT11DHT22BME280DS18B20
Temp Range0–50°C–40–80°C–40–85°C–55–125°C
Temp Accuracy±2°C±0.5°C±0.5°C±0.5°C
Humidity Range20–90%0–100%0–100%N/A
Humidity Accuracy±5%±2–5%±2–3%N/A
Works at 3.3VYesYesYesYes
Sampling Rate1 Hz0.5 HzFast1 Hz
CostVery LowMediumHighLow
Best UseSimple projectsHigher accuracy needsAdvanced monitoringTemperature-only setups

DHT11 Calibration and Good Measurement Practices

Figure 4. DHT11 Calibration and Good Measurement Practices

• Allow the sensor to stabilize for 1–2 minutes after powering.

• Avoid placing it near heat sources, HVAC vents, sunlight, or windows.

• Use a 4.7 kΩ pull-up resistor on the DATA line for stable communication.

• Apply software filtering (moving average, median filters) for cleaner data.

• Keep wiring short to reduce signal noise and timing errors.

• Ensure free airflow around the sensor for accurate environmental measurement.

Arduino Setup Guide for the DHT11 Sensor

Wiring

• VCC → 5V

• GND → Ground

• DATA → Any digital pin (commonly D2)

• Add a 4.7 kΩ pull-up resistor between DATA and VCC

Software

• Install the Adafruit DHT Sensor library

• Open the example sketch named DHTtester

• Upload the code and check the Serial Monitor for readings

DHT11 Limits and Usage Restrictions

Key Limitations

• Narrow temperature range (0–50°C)

• Lower accuracy compared to newer sensors

• No ability to measure barometric pressure

• Slow sampling rate

• Less accurate when the humidity goes above 90%

Avoid the DHT11 When

• Higher precision is needed

• The sensor will be placed outdoors

• Fast updates are important

• Humidity often rises above 90%

Different Applications of DHT11 Sensor

Home Temperature and Humidity Monitoring

The DHT11 helps check indoor conditions, making it easy to see if a room is warm, cool, dry, or humid.

Indoor Air Quality Tracking

It provides basic humidity data that can support simple air-quality checks in small indoor spaces.

Smart Home Automation Systems

The DHT11 can trigger actions such as turning devices on or off based on changing temperature or humidity.

Classroom and Learning Projects

Its simple wiring and clear digital output make it useful for school activities that teach basic sensing.

Basic Weather Station Builds

The sensor can track temperature and humidity indoors, helping create small and simple weather setups.

Greenhouse and Plant Area Monitoring

The DHT11 can monitor humidity and temperature levels in growing areas to help maintain a steady environment.

Simple IoT Data Logging Projects

It works well for sending or recording climate data in easy IoT setups.

HVAC Condition Checking

The sensor can detect small changes in temperature and humidity, helping to monitor basic indoor climate behavior.

Server and Equipment Room Monitoring

It can alert a system when the temperature or humidity rises too high in equipment spaces.

Enclosure Environmental Monitoring

The DHT11 can measure conditions inside small boxes or cases to ensure the environment stays within safe limits.

Conclusion

The DHT11 offers basic temperature and humidity readings through a simple digital interface. Its structure, sensing method, and electrical limits make it suitable for controlled indoor conditions. Knowing its pinout, timing process, setup needs, and accuracy range helps ensure correct operation. These details define when the DHT11 is appropriate for environmental monitoring tasks.

Frequently Asked Questions [FAQ]

Can the DHT11 detect sudden temperature or humidity changes?

No. The DHT11 updates once per second and reacts slowly, so it cannot capture fast changes.

Does cable length affect the DHT11’s accuracy?

Yes. Long wires can cause signal noise and timing errors. Keep the cable under 20–30 cm for stable readings.

How is the DHT11 calibrated at the factory?

The sensor stores calibration data inside its internal memory, and this data cannot be changed.

Is the DHT11 affected by condensation?

Yes. Condensation can cause incorrect readings or temporary sensor failure until the sensor dries.

Can the DHT11 run for years without drifting?

It can run continuously, but accuracy slowly decreases over time, especially in warm or humid environments.

Does the DHT11 use more power when sending data?

Yes. Current increases briefly during measurement and transmission, but it stays within its normal operating range.