DHT22 (AM2302) Digital Humidity and Temperature Sensor Proteus Simulation




Like the DHT11, the DHT22 is a digital humidity and temperature sensor which has more benefits than DHT11 like: High precision and range.
If we want to understand this topic we have to read the DHT22 datasheet and see how this device works and its characteristics.
Note that the DHT22 is available only on Proteus version 8.1 or higher, version 8.0 or later will not work therefore you have to update your version.
From the datasheet:
1-wire bus is used for communication between MCU and DHT22, which means that the sensor communicates over only one-wire with the master device (microprocessor or microcontroller), by this wire the DHT22 sends/receives data to/from the master device.
Illustration of our 1-wire bus:DHT22 (AM2302) Digital Humidity and Temperature Sensor Proteus Simulation

DATA=16 bits RH data+16 bits Temperature data+8 bits check-sum
Example: MCU has received 40 bits data from AM2302 as
0000 0010 1000 1100 0000 0001 0101 1111 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
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℃
When highest bit of temperature is 1, it means the temperature is below 0 degree Celsius.
Example: 1000 0000 0110 0101, T= minus 10.1℃
16 bits T data
Sum=0000 0010+1000 1100+0000 0001+0101 1111=1110 1110
Check-sum=the last 8 bits of Sum=1110 1110
When MCU send start signal, DHT22 change from standby-status to running-status. When MCU finishes sendingthe start signal, DHT22 will send response signal of 40-bit data that reflect the relative humidity and temperatureto MCU. Without start signal from MCU, DHT22 will not give response signal to MCU. One start signal for one
response data from DHT22 that reflect the relative humidity and temperature. DHT22 will change to standby status when data collecting finished if it don’t receive start signal from MCU again.
Interfacing PIC18F4550 with DHT22 (AM2302) Proteus simulation:
The picture below shows a Proteus circuit diagram of the simulation:
Internal oscillator is used at 8MHz and MCLR pin is disabled.Schematic DHT22 (AM2302) Digital Humidity and Temperature Sensor Proteus Simulation




Current Project / Post can also be found using:

  • weather monitoring system with data logger pic 7 seg display
  • dht22 proteus library download
  • temperature measurement project report
  • which device to measure temp in micro controller

Leave a Comment

*
= 4 + 8

Read previous post:
weather station with multiple sensors
Easy IoT weather station with multiple sensors

A weather station is a fun project that teaches you a ton about electronics with the added benefit being an...

Close
Scroll to top