Spark Logic

DHT11 humidity and temperature sensor connection guide

DHT11 humidity and temperature sensor (Four-position sensor interface) connection guide. Read humidity and temperature.

Four-position sensor interface

4 contacts Current package

Aosong / ASAIR·

Read humidity and temperature

Required

Use a short cable and a 5 V host with a GPIO that can switch between driving low and high impedance. Pull the data wire up to the same 5 V supply. For a cable shorter than 20 m, pull DATA up to VDD through 5.1 kΩ. At 3.5 V, keep the cable at 20 cm or less to limit voltage drop.

  • +5 V
    • Host 5 V
    • R1.1
  • Ground
    • Host ground
  • Data line
    • ↔
    • Host GPIO
    • R1.2
R1 5.1 kΩ between +5 V and Data line+5 VR1 5.1 kΩData line

Bench checks

  • Wait more than two seconds after power-up. Pull the data line low for the documented start time. Then release the line and look for the sensor response.
  • Check that the low eight bits of the sum of the first four bytes equal the fifth byte before decoding.
  • Decode the separate integer and fractional fields according to the manual for the specific device revision.

Aosong DHT11 Product Manual, printed pp. 2–5, including §6 (PDF p. 4).

Four-position sensor interface wiring map

External wiring example · Read humidity and temperature

Highlighted contacts are used in this circuit. Select a contact to highlight its wiring nets.

Four-position sensor interface
Front view with the vented face toward you and leads below. Pin 1 is at the left.
Selected pin details

1 · VDD

Supply input · Power

Device supply. Place the bypass capacitor close to this pin.

Wiring requirements

Aosong DHT11 Product Manual, printed pp. 2–5, including §6 (PDF p. 4).

Electrical limits · Pin in the reference

Models and documents

The map applies to the four-pin bare DHT11 described in the linked manual. Three-pin breakout headers vary.

DHT11
Aosong four-pin sensor.