Template: DHT11 Temperature-Humidity Sensor User Manual

From Waveshare Wiki
Jump to: navigation, search

Features

Sensor DHT11 (Temperature & humidity sensor)
Operating voltage 3.3V-5.5V
Humility measuring range 20%-95%(0℃-50℃)
Humility measuring error +-5%
Temperature measuring range 0℃-50℃
Temperature measuring error +-2℃
Dimensions 29.0mm*18.0mm
Fixing hole size 2.0mm
Table 1. Product features

Applications

This module can be applied to environmental temperature & humility measurement.

Interfaces

Pin No. Symbol Descriptions
1 DOUT Communication port
2 GND Power ground
3 VCC Positive power supply (3.3V-5.5V)
Table 2. Interface specification

How to use

We will illustrate the usage of the module with an example of temperature-humidity measurement by connecting a development board.

  • Download relative codes to the development board.
  • Connect the development board to a PC via a serial wire and the module to the development board. Then, power up the development board and start the serial debugging software. The configuration of the connection between the module and the development board are shown in Table 3 and Table 4.
Port STM32 MCU pin
DOUT GPIOA.0
GND GND
VCC 3.3V
Table 3. The connection between STM32 development board and DHT11
Port Arduino pin
DOUT D2
GND GND
VCC 5V
Table 4. The connection between Arduimo and DHT11

The configuration of the serial port is listed in Table 5.

Baud rate 115200
Data bits 8
Stop bit 1
Parity bit None
Table 5. Serial port configuration
  • Run the serial debugging software, then you can see relative data of humility and temperature are outputted. For example:
Humidity=33

Temperature=28