The DHT11 Humidity / Temperature Sensor Module uses a 1-wire interface to report both humidity (20-90%) and temperature (0-50°C).
- DHT11 Humidity / Temperature Sensor Module
- Female / Female 3 x 8″ jumper cable for connecting the module to a microcontroller.
KEY FEATURES OF DHT11 HUMIDITY / TEMPERATURE MODULE:
- Reports humidity over range of 20% to 90%
- Reports temperature over range of 0°C to 50°C
- Uses 1-Wire interface
- 3.3 and 5V logic compatible
This module utilizes the DHT-11 which is a combined humidity and temperature sensor assembly. It includes a power LED that lights when power is applied as well as a 3-wire F/F cable for hooking it up.
The DHT11 sensor is capable of reading humidity over the range of 20-90% with an accuracy of +/- 5% and temperature over the range of 0 – 50°C with an accuracy of +/- 2°C.
The sensor is written and read via a single digital pin and requires the use of a library for the communications as the communication protocol itself is quite complex. With an Arduino, the DHTLib library can be downloaded from the Arduino site or GitHub.
The device does have a minimum sampling time of 1Sec so the sensor cannot be polled more often than once every second or bad data may be retrieved.
The module has a 3-pin header on the assembly.
1 x 3 Header
- Vcc = Connect to 3.3V to 5V.
- DATA = Digital sensor I/O – Connects to a digital pin on a microcontroller
- GND = Connect to system ground. This ground needs to be in common with the microcontroller.
OUR EVALUATION RESULTS:
This is a commonly used module for basic humidity and temperature measurement. Once up and running with a microcontroller, it is easy to test basic functionality of the module by breathing on the sensor. That will increase both humidity and temperature temporarily.
The DHT11 has a narrower measurement range and lower accuracy compared to the similar DHT22 sensor which is why it costs less. If you are looking for best accuracy, you may want to check out our DHT22 module below.
The sensor can not be polled faster than once every second, otherwise data errors may occur. If you get occasional bad readings (such as -999.00) try increasing the delay between reads. Our sample program below uses a 2 second delay just to be safe.
DHT11 Humidity / Temperature Sensor Test Program
DHT11 Temp / Humidity sensor module test
Basic code for exercising the module.
Requires DHT library to be installed
#include <dht.h> // Include the DHT library
dht DHT; // Create instance of DHT object
int const DHT11_PIN = 7; // Connects to sensor I/O, use any digital pin
int sensor; // Dummy variable for sensor read
Serial.begin(9600); // Initialize serial comm
sensor = DHT.read11(DHT11_PIN); // Read sensor
Serial.print("Temperature = "); // Printout returned results
Serial.print("Humidity = ");
delay(2000); // 1 sec min read time, so using 2 to be safe