Adafruit AM2302 393 User Manual

Product codes
393
Page of 5
Y
Y
Y
Y
our specialist in innovating humidity & temperature sensors
Thomas Liu (Sales Manager)
Email: thomasliu198518@aliyun.com
- 3 -
DATA=
DATA=
DATA=
DATA=16
16
16
16 bits
bits
bits
bits RH
RH
RH
RH data+
data+
data+
data+16
16
16
16 bits
bits
bits
bits Temperature
Temperature
Temperature
Temperature data+8
data+8
data+8
data+8 bit
bit
bit
bitssss check-sum
check-sum
check-sum
check-sum
Example: MCU has received 40 bits data from AM2302 as
0000
0000
0000
0000 0010
0010
0010
0010 1000
1000
1000
1000 1100
1100
1100
1100
0000
0000
0000
0000 0001
0001
0001
0001 0101
0101
0101
0101 1111
1111
1111
1111
1110
1110
1110
1110 1110
1110
1110
1110
16 bits RH data
16 bits T data
check sum
Here we convert 16 bits RH data from binary system to decimal system,
0000 0010 1000 1100
652
Binary system
Decimal system
RH=652/10=65.2%RH
RH=652/10=65.2%RH
RH=652/10=65.2%RH
RH=652/10=65.2%RH
Here we convert 16 bits T data from binary system to decimal system,
0000 0001 0101 1111
351
Binary system
Decimal system
T=351/10=35.1
T=351/10=35.1
T=351/10=35.1
T=351/10=35.1
When highest bit of temperature is 1, it means the temperature is below 0 degree Celsius.
Example:
1
1
1
1
000 0000 0110 0101, T= minus 10.1℃
16 bits T data
Sum=0000 0010+1000 1100+0000 0001+0101 1111=1110 1110
Check-sum
Check-sum
Check-sum
Check-sum=the last 8 bits of Sum=1110 1110
When MCU send start signal, AM2302 change from standby-status to running-status. When MCU finishs sending
the start signal, AM2302 will send response signal of 40-bit data that reflect the relative humidity and temperature
to MCU. Without start signal from MCU, AM2302 will not give response signal to MCU. One start signal for one
response data from AM2302 that reflect the relative humidity and temperature. AM2302 will change to standby
status when data collecting finished if it don't receive start signal from MCU again.
See below figure for overall communication process, the
the
the
the interval
interval
interval
interval of
of
of
of whole
whole
whole
whole process
process
process
process must
must
must
must beyond
beyond
beyond
beyond 2
2
2
2 seconds.
seconds.
seconds.
seconds.
------------------------------------------------------------------------------------------------------------------------------------
1) Step 1: MCU send out start signal to AM2302 and AM2302 send response signal to MCU