Spark Logic

AM2302 / DHT22 humidity and temperature sensor connection guide

AM2302 / DHT22 humidity and temperature sensor Four-position sensor interface wiring guide with power, signal assignments, and bench checks.

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.

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 humidity as an unsigned big-endian value in tenths of percent. Decode temperature as sign and magnitude in tenths of a degree Celsius.

Aosong / ASAIR AM2302 Technical Manual V1.0, pp. 4–6.

Four-position sensor interface wiring map

Highlighted contacts are used in the required step or selected circuit. Select a contact to inspect it.

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

3 · NC

None · NC / reserved

No internal connection. Leave electrically open unless the package notes specify otherwise.

Aosong / ASAIR AM2302 Technical Manual V1.0, pp. 4–6.

Electrical limits · Pin in the reference

Models and documents

Aosong also markets AM2302 as DHT22. This map shows the four positions in the manufacturer manual. Pin 3 carries no signal.

AM2302 / DHT22
Equivalent product names for the documented Aosong sensor.