Documente Academic
Documente Profesional
Documente Cultură
! Introduction
! ! The DHT11 digital temperature and humidity sensor is a
composite Sensor contains a calibrated digital signal output of the
temperature and humidity. The sensor includes a resistive sense of wet
components and an NTC temperature measurement devices, and connected
with a high-performance 8-bit microcontroller.
- Data format:
! The 8 bit humidity integer data : 8 bit the Humidity fractional data : 8 bit
temperature interger data : 8 bit temperature fractional data : 8 bit parity bit
(8 bit checksum ).
Fig. 7.2
- MCU read steps
! Communication between the Host (MCU) and slave can be done
through the following steps .
Step 1:
! After power on the DHT11 (DHT11 on after power to wait 1s across the
unstable state during this period can not send any instruction), the I/O pin
pulled by pull-up resistor has been to maintain high. The DHT11 is in the input
state, the moment of detection of external signals from MCU.
Step 2:
! MCU I/O set to output at the same time output low, and low hold time
can not be less than 18ms, then the MCU I/O is set to input state, due to the
pull-up resistor, the DHT11 the I/O pin also will be high, waiting DHT11 to
answer signal. The start signal as shown: (Figure 7.3)
Step 3:
! Once DHT11 detects the Start Signal, it will send out a low voltage level
response signal, which lasts 80us. Then it sets the voltage level from low to
high and keeps it for 80us. The DHT11 response signal as shown: (Figure
7.4)
Step 4:
! When DHT11 is sending data to MCU, every bit of data begins with the
50us low-voltage-level and the length of the following high-voltage-level
signal determines whether data bit is "0" or "1" (see Figures 7.5 and 7.6
below).
! When the last bit data is transmitted, DHT11 pulls down the voltage
level and keeps it for 50us, then it leaves the line pulled-up and goes back in
the stand-by mode.
Microprocessor and Embedded Computer Systems! Sem.2 / 2013 ECE page 4 of 12
Lab7: DHT11 Temperature and Humidity Sensor with Arduino
Fig. 7.7 Show DHT11 module connect to Arduino UNO for this LAB .
Procedure I.
! 1. Use Arduino UNO Board and Electronic parts from Arduino lab
box set build a real circuit from a figure 7.7.
! 2. Write a C program follow figure 7.8a-7.8c in Atmel studio. Then
build the hex file for this program and upload to Arduino board that
connected with DHT11 module (figure 7.7).
! 3. Use digital Oscilloscope channel I measure signal on pin DATA of
DHT11 module.Find the start signal and sample of data bit 0 and 1
then save the result and show the result to staff of LAB.(the start signal and
sample data 0 and 1 should be like figure 7.9a-7.9c)
! 4. Use Logics Analyzer save the signal data from pin DATA of DHT11
module(should be like figure 7.10). Find 40 bit data that send from DHT11
and read data in binary number(by your eyes).Show how to checksum and
convert data to decimal number of temperature and relative humidity.
Fig. 7.8a) Test source code part I (Part II -Fig. 7.8b cont.)
Fig. 7.8b) Test source code part II (Part III -Fig. 7.8c cont.)
Procedure II.
! 1. Design and Modify the C program source code from procedure I to
the new program that can show 40 bit data , show temperature , and humidity
on LCD display (the result should be like Figure 11a-11c).
! 2. Send the short report, flowchart, and source code of the new
program.Show the result to staff of LAB.