Description
The DHT11 Humidity / Temperature Sensor Module uses a 1-wire interface to report both humidity (20-90%) and temperature (0-50°C).
PACKAGE INCLUDES:
- 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.
Module Connections
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.
Once the DHT library is installed, using the device is fairly simple as shown in the code below.
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 //=============================================================================== // Initialization //=============================================================================== void setup() { Serial.begin(9600); // Initialize serial comm } //=============================================================================== // Main //=============================================================================== void loop() { sensor = DHT.read11(DHT11_PIN); // Read sensor Serial.print("Temperature = "); // Printout returned results Serial.print(DHT.temperature); Serial.print(" C\t"); Serial.print("Humidity = "); Serial.print(DHT.humidity); Serial.println(" %"); delay(2000); // 1 sec min read time, so using 2 to be safe }
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- Sample inspected and tested per incoming shipment.
Notes:
- Wire colors may vary from the pics
Technical Specifications
Maximum Ratings | ||
Vcc | Range | 3.3 to 5.5V |
Vmax | < 5mA | |
Tmin | Minimum Sampling Period | 1 second |
Operating Ratings | ||
Humidity | Range | 20% to 90%RH (+/- 5%RH) |
Temperature | 0 – 50°C (+/- 2°C) | |
Dimensions | L x W (PCB) | 31mm x 14mm (1.2 x 0.6″) |
Datasheet | DHT11 |