How to interface Arduino with DHT11 Humidity Sensor

Remote weather stations, home environment control systems, and agricultural/garden monitoring systems applications makes use of DHT11 sensor. DHT11 is a digital sensor for reading relative humidity and temperature.

    dht11 interfacing

DHT11 Technical Specifications

  • Humidity Range: 20-90% RH
  • Temperature Range: 0-50 °C
  • Humidity Accuracy: ±5% RH
  • Temperature Accuracy: ±2% °C
  • Operating Voltage: 3V to 5.5V

DHT11 calculates humidity by measuring resistance between the electrodes. A moisture holding substrate along with the electrodes makes the humidity sensing element. As the substrate absorbs the water vapor, ions are released and this increases the conductivity between the electrodes. Resistance change between the electrodes is proportional to the humidity. After converting the resistance measurement to humidity, the reading is transmitted to the Arduino. The temperature measurement is done by using NTC temperature sensor.

DHT11 & Arduino

The aim of the interfacing project is to measure the temperature and humidity value.

Components Required

Program

  • Arduino starts the data transmission after sending a Start signal.
  • Arduino makes the data line LOW for 18ms.
  • Then data line is made HIGH for 20-40 ms.
  • DHT11 responds to the Arduino “Start” signal by pulling the data line LOW for 80s followed by a HIGH for 80s.
  • Once the response signal from sensor is detected by the arduino, the arduino is ready to receive data from the sensor.
  • Sensor will be sending 40bits of data in the data line.
  • MSB is sent first.
  • First and third bytes of received data actually give the numeric values of the measured relative humidity (%) and temperature (°C). The last byte is the checksum byte which is used to make sure that the data transfer has happened without any error.
  • At the end of the last transmitted bit, the sensor pulls the data line low for 50 s and then releases it.
  • The DHT11 sensor requires an external pull-up resistor to be connected between its Vcc and the data line so that under idle condition, the data line is always pulled high.
  • After finishing the data transmission and releasing the data line, the DHT11 sensor goes to the low-power consumption mode until a new “Start” signal arrives from the MCU.

Program file is attached as PDF below...........

Output

output

Related Items