Earn Maker Points on Every Order! Learn More!

DHT11 Temperature and Humidity Sensor with Arduino

Back to Blog
DHT11 Temperature and Humidity Sensor with Arduino - DHT11 Temperature and Humidity Sensor with Arduino - DHT11 Temperature and Humidity Sensor with Arduino - DHT11 Temperature and Humidity Sensor with Arduino

DHT11 Temperature and Humidity Sensor with Arduino

DHT11 is one of the most used Temperature and Humidity Sensor. It is cheap, compact and provides a reliable data, it is the best for a DIY electronics project.

The DHT11 can measure Temperature between 0 to 50° C with ±2 °C accuracy. It can measure Humidity between 20 to 80% with ±5% accuracy. The sampling rate of DHT11 is 1 HZ which is 1 reading per second. The Operating Voltage of DHT11 is 3 to 5V and uses a 2.5 mA of maximum current while operating.

The DHT11 Temperature and Humidity Sensor consists of 3 main components. A resistive type humidity sensor, an NTC (negative temperature coefficient) thermistor (to measure the temperature) and an 8-bit microcontroller, which converts the analog signals from both the sensors and sends out single digital signal.

Distance up to 20 m**

How DHT11 Measures Temperature?

For measuring Temperature the sensor uses an NTC Thermistor. A Thermistor is a variable resistor that changes its resistance to the change in temperature. The NTC means Negative Temperature Coefficient which means resistance decreases as temperature rises.

A thermistor is made of metallic oxides which is pressed into a bead, disk, or cylindrical shape and then encapsulated with an impermeable material such as epoxy or glass.

How DHT11 Measures Humidity?

The Humidity is measured by the electrical resistance between two electrodes. The humidity sensing component of the DHT11 is a moisture holding substrate (usually a salt or conductive plastic polymer) with the electrodes applied to the surface. The ions are released by the substrate as water vapor is absorbed by it, which in turn increases the conductivity between the electrodes. The change in resistance between the two electrodes is proportional to the relative humidity.

Connections:

DHT11

Arduino

VCC

5 V

DATA

4

GND

GND

 

DHT11 with Arduino

Buy DHT11

Basic Code:

#include <dht.h>
#define dhtpin 4

dht DHT;

void setup()
{
  Serial.begin(9600);
  Serial.println("DHT11 Temperature and Humidity Sensor");
}

void loop()
{
  DHT.read11(dhtpin);

  float T = DHT.temperature;
  float H = DHT.humidity;

  Serial.print("Temperature = ");
  Serial.print(T);
  Serial.print(" °C ");
  Serial.print("Humidity = ");
  Serial.print(H);
  Serial.println(" % ");

  delay(1000);
}

Share this post

Leave a Reply

Back to Blog