0% found this document useful (0 votes)
73 views5 pages

DHT Series Temperature & Humidity Sensor On Arduino

This document provides a tutorial on how to read temperature and humidity data from DHT series sensors using an Arduino. It discusses the different DHT sensor models, the circuit connections between the sensor and Arduino, installing the DHT library, and includes example code to display the temperature and humidity readings in serial monitor.

Uploaded by

fetene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views5 pages

DHT Series Temperature & Humidity Sensor On Arduino

This document provides a tutorial on how to read temperature and humidity data from DHT series sensors using an Arduino. It discusses the different DHT sensor models, the circuit connections between the sensor and Arduino, installing the DHT library, and includes example code to display the temperature and humidity readings in serial monitor.

Uploaded by

fetene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

DHT series Temperature & Humidity sensor on Arduino

Robo India presents tutorial on how to read temperature and humidity data through
DHT series sensor Arduino platform.

Detailed Tutorial

1. Introduction:

This tutorial explains how to read temperature and humidity data through DHT series sensor on
Arduino platform.

DHT series sensors have their other names too -

 DHT11 = RHT01
 DHT21 = RHT02= AM2301 = HM2301
 DHT22 = RHT03= AM2302
 DHT33 = RHT04 = AM2303
 DHT44 = RHT05

DHT library included here in this tutorial supports following sensor of DHT series

1. DHT11
2. DHT22
3. AM2302
4. RHT03

This library automatically detects if any one of the above mentioned sensor is connected to
Arduino.

2. Understanding DHT11 sensor

DHT11 sensor gives humidity and temperature data. It has got following pin interface.
3. Circuit

Make following connections of DHT sensor to Arduino in the following manner.


4. DHT Library

Download DHT library from here. Install the same.

5. Programming

You may download following code from here.

// Robo India Tutorial for DHT series sensors.


// This library supports DHT11, DHT22, AM2302 and RHT03 sensors
// Auto detects sensor model/type

#include "DHT.h"

DHT dht;

void setup()
{
Serial.begin(9600);
Serial.println();
Serial.println("Status\tHumidity (%)\tTemperature (C)\t(F)");

dht.setup(2); // data pin 2


}
void loop()
{
delay(dht.getMinimumSamplingPeriod());

float humidity = dht.getHumidity();


float temperature = dht.getTemperature();

Serial.print(dht.getStatusString());
Serial.print("\t");
Serial.print(humidity, 1);
Serial.print("\t\t");
Serial.print(temperature, 1);
Serial.print("\t\t");
Serial.println(dht.toFahrenheit(temperature), 1);
}

6. Output

Run the following code and you will get the following output.

This is how to use DHT series sensors on Arduino.

If you have any query please write us at [email protected]

Thanks and Regards


Content Development Team
Robo India
http://roboindia.com

You might also like