Introduction to DHT11,DHT11 pinout, DHT11 Arduino, DHT11, DHT11 specifications, DHT11 applicationsHello Friends, I hope you all are fine and will be doing well in your life. In today’s tutorial, I am going to give you a detailed Introduction to DHT11. It is an embedded sensor used to measure temperature & humidity in the surroundings and gives calibrated digital output. It can measure temperature in the range of 0°C to 50°C with ±2°C accuracy. Its humidity range is from 20% to 80% with ±5% accuracy. It is a small, low cost and easy to interface embedded sensor.

In this tutorial, I will explain its working, pinout, protocol and interfacing with other microcontrollers in detail. I will also post some tutorial links where I have interfaced DHT11 with other microcontrollers. If you have any queries about it, ask in the comments and I will resolve it.

  • Here are few important features of DHT11, given in the below table:
DHT11 Features & Specs
No.ParameterValue
1MeasuresHumidity & Temperature
2Sensors IncludedCapacitive Humidity Sensor & Thermistor
3Humidity Range20% to 80% with ±5% accuracy
4Temperature Range0°C to 50°C with ±2°C accuracy
5Package4 Pins in a single row
6Operating Voltage3.0V to 5.5V
7Operating Current0.3mA(measuring), 60uA(idle)
8Resolution1°C, 1%RH (8-Bit)
9Response Time6s-15s
10Repeatability±1°C, ±1%RH
11Sampling Frequency1Hz
12Dimensions27mm x 59mm x 13.5mm (1.05″ x 2.32″ x 0.53″)

So, let’s start with the Introduction to DHT11:

Introduction to DHT11

  • DHT11 is a low-cost, small-sized & easy-to-operate embedded sensor, consists of 4 pins, used to measure Temperature(0°C to 50°C with ±2°C accuracy) & Relative Humidity(20% to 80% with ±5% accuracy) and provides calibrated digital output.
  • DHT11 Pinout consists of 4 Pins in total, listed below from left to right:
    1. Vcc: Need to provide +5V at this pinout.
    2. Data: It’s the digital output pin, gives either 0V or 5V.
    3. NC: Not Connected. (It’s left open for future design)
    4. GND: Need to provide Ground at this pinout.
  • DHT11 has a Capacitive Sensor for measuring humidity & NTC Thermistor for temperature sensing. (We will cover them in detail below)
  • It comes in a single package comprising of 4 pins with 0.1″ spacing between them and a special package can be provided according to user demand.
  • DHT11 updates the output value once every 2 seconds.
  • Small-size, low cost, precise & calibrated output, small-size and up to 20 meters signal transmission stand it out from other sensors.
  • DHT11 uses a single-wire serial interface for data processing.
  • It calibrates the humidity using humidity coefficients, which are stored in the OTP program memory of the built-in controller.
  • Its operating voltage is 3V to 5.5V, so it works with both 3.3V and 5V microcontroller systems.
  • It has a sampling frequency of 1Hz, so it samples the data after every 1sec.
  • DHT11 has a dimension of 27mm x 59mm x 13.5mm (1.05″ x 2.32″ x 0.53″), so its very small and can easily be placed in autonomous embedded projects.
  • It is quite accurate & precise in its readings as compared to other expensive sensors i.e. SHT10, DS18B20 etc.

Introduction to DHT11,DHT11 pinout, DHT11 Arduino, DHT11, DHT11 specifications, DHT11 applicationsWe have discussed the basic features of our Moisture sensor DHT11. Now, let’s have a look at DHT11 Pinout and description:

DHT11 Pinout & Description

  • DHT11 Pinout consists of 4 Pins in total, which are shown in below table:
Pin#Type                                        Parameters
Pin#1VccProvide 3.3V to 5V at this pin.
Pin#2DataThis pin provides a digital output.
Pin#3N/C Not Connected.
Pin#4GroundThis pin is used for Ground ( Connected to 0V or GND ).
  • For better understanding lets check its picture, given below:

Introduction to DHT11,DHT11 pinout, DHT11 Arduino, DHT11, DHT11 specifications, DHT11 applications

Now, we will discuss the DHT11 working principle in detail:

DHT11 Working Principle

  • Now, let’s understand the working principle of the DHT11 temperature & humidity sensor.
  • As we have discussed earlier, it has two sensors inside it, so let’s have a look at both of them separately:

DHT11 Temperature Sensing

  • For temperature sensing, it has an NTC(Negative Temperature Coefficient) temperature sensor(also called a thermistor) mounted on the surface inside the plastic casing.
  • NTC temperature sensors are variable resistive sensors and their resistance decreases with an increase in the surrounding temperature.
  • Thermistors are designed with sintering of semiconductors materials, such as ceramic or polymers and they provide a large change in resistor with a small change in temperature.
  • Here’s the graph showing the relation between temperature and resistance for the DHT11 sensor:

Introduction to DHT11,DHT11 pinout, DHT11 Arduino, DHT11, DHT11 specifications, DHT11 applications

Now, let’s discuss the Humidity Measurement of DHT11:

DHT11 Humidity Measurement

  • For Humidity Measurement, it uses a capacitive humidity sensor, which has two electrodes and a substrate material in between.
  • The substrate material is used for holding the moisture on its surface.
  • As moisture content changes in our environment, they are get saturated on the substrate material, which in turn changes the resistance between electrodes.
  • This change in electrode resistivity is then calibrated using the humidity coefficient(saved in OTP memory) and the final relative humidity value is released.
  • Here’s the image showing the internal structure of DHT11 humidity sensor:

Introduction to DHT11,DHT11 pinout, DHT11 Arduino, DHT11, DHT11 specifications, DHT11 applications

Now let’s discuss the communication Protocol of DHT11 temperature & humidity sensor:

DHT11 Communication Protocol

  • DHT11 sensor uses a single-wire, two-way Serial Protocol for communicating with third-party peripherals normally microcontrollers.
  • We call it single-wire because the communication is performed through a single pin.
  • It’s two-way because DHT11 receives commands from the microcontroller and then responses back required data.
  • Data sent by the DHT11 sensor is 40bits and it sends Higher Data Bits first.
  • Data contains both Integral and decimal values of temperature and relative humidity along with a checksum value.

DHT11 Data Format

  • DHT11 sends the 40Bit serial data in the below format:
    1. 8-Bit Humidity(Integral)
    2. 8-Bit Humidity(Decimal)
    3. 8-Bit Temperature(Integral)
    4. 8-Bit Temperature(Decimal)
    5. 8-Bit Checksum
  • If DHT11 is sending the correct data, then it must send an 8-Bit Checksum data at the end.

DHT11 Communication with Microcontroller

  • The circuit diagram to interface DHT11 with microcontroller is shown in the below figure:

DHT11 Communication with Microcontroller

  • Pull-up resistance of 5k ohm is recommended to place at the Data Pin of DHT11 sensor.
  • At normal conditions, the data pin of DHT11 remains at the HIGH voltage level and the sensor remains in low power consumption mode.
  • In order to receive data from the DHT11 sensor, the microcontroller should make the Data Pin low for at least 18us, so that the sensor could sense it.
  • Once the DHT11 sensor senses the low signal at the Data Pin, it changes its state from low power consumption mode to running mode and waits for the Data Pin to get HIGH.
  • As the Data Pin gets HIGH again by the microcontroller, DHT11 sends out the 40-Bit calibrated output value serially.
  • After sending the data, DHT11 goes back to low power consumption mode and waits for the next command from the microcontroller.
  • The microcontroller has to wait for 20-40us for getting a response from the DHT11 sensor.

Applications of DHT11

Because of its small size, low cost and ability to sense two values, DHT11 has a wide range of applications:

  • DHT11 is used in Home Automation Projects to maintain constant atmospheric values by controlling the appliances(i.e. AC, Fan etc.) based on the sensor’s readings.
  • It is also used at weather stations for temperature & humidity sensing.
  • It is also used in automatic climate control appliances.
  • Environment monitoring devices also utilize this sensor.
  • Garden Monitoring Systems also use DHT11 sensors.

So, that was all about the DHT11 temperature and humidity sensor. I have tried to cover this sensor from all angles. Let me know about your experience with the DHT11 sensor in the comments. Take care!!!

2 Comments

  1. Hello. I work in a tea factory and am really interested in controlling the temperature and humidity for the “fermentation” process. I have to measure and control “continuously” the temperature of the tea (very wet solid matter). In addition, I have to control the humidity of the ambient air of the room.
    Questions:
    1. Is the component you are introducing there compatible to measure the temperature of the tea dhool? If not, could you offer me a combination with another sensor?
    2. For my application, I understand that I have to use two sensors (tea temperature and ambient humidity). On the other hand, the microcontroller will be unique because there must be correlation between the two controlled quantities. Could you offer me a microcontroller adapted to situation?
    Thank you for the advice you will give me

    • Hi,

      DHT11 will work fine here, you can easily interface it with Arduino UNO. IF you are new to embedded then you should select Arduino UNO as its quite easy to learn. DHT11 is used for measuring temperature & humidity but in order to control the temperature of your tea pot, you have to use relay which will turn ON or OFF the heater ( I don’t know what type of heater you are using ).

      Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment