DHT11 Humidity and Temperature Sensor Module
The DHT11 Humidity and Temperature Sensor Module provides calibrated readings using a single digital pin on your microcontroller.
The DHT11 sensor provides 8 bits of precision for both humidity and temperature.
It uses a single line for bidirectional serial communications.
An Arduino library is available to simplify operation.
It can measure temperatures from 0° to 50° Celsius (32° to 122° Fahrenheit) and humidity from 20% to 95% Relative Humidity.
This sensor works with both 3.3V and 5V microcontroller systems.
The interesting thing in this module is the protocol that uses to transfer data.
All the sensor readings are sent using a single wire bus which reduces the cost and extends the distance.
In order to send data over a bus you have to describe the way the data will be transferred, so that transmitter and receiver can understand what says each other. This is what a protocol does. It describes the way the data are transmitted.
To make the DHT-
What comes after the request is the DHT-
What will come after the response is the sensor data. The data will be packed in a packet of 5 segments of 8-
First two segments are Humidity read, integral & decimal. Following two are Temperature read in Celsius, integral & decimal and the
last segment is the Check Sum which is the sum of the 4 first segments.
If Check Sum's value isn't the same as the sum of the first 4 segments that means that data received isn't correct.
Each bit sent is a follow of ~54uS Low in the bus and ~24uS to 70uS High depending on the value of the bit.
Bit '0' : ~54uS Low and ~24uS High
Bit '1' : ~54uS Low and ~70uS High
End Of Frame:
At the end of packet DHT sends a ~54uS Low level, pulls the bus to High and goes to sleep mode.
All the above protocol methods are provided in Arduino DHT11 Library .Just copy the library to libraries folder of Arduino & try the sample code.
DATASHEET FROM ITEAD
DHT11 ARDUINO LIBRARY WITH DEMO CODE