User Tools

Site Tools


amc2022:grouph:dht22_humidity_temperature_sensor

This is an old revision of the document!


Table of Contents

DHT22

Figure # DHT22 Humidity sensing component. Source: https://howtomechatronics.com

Specifications

Table 2 Table describing DHT-22 Specifications
Description Value
Operating Voltage 3.5 to 5.5V
Data Protocol Serial Transmission
Operating Temperature -40 to 80 C
Temperature Accuracy ยฑ0.5ยฐC
Humidity Range 0 to 100 %
Humidity Accuracy ยฑ1%
Sampling Rate 0.5 Hz - Once every 2 sec
Humidity Accuracy ยฑ1%
Output Signal Digital Signal via 1 wire bus

Schematics

Data

Example of how data transmission and the binary system provides information on both Temperature and Humidity.

ESP-32 receives 40 bits from the sensor as follows:

16 bits for RHumidity 0000 0010 1000 1100
+
16 bits for Temperature 0000 0001 0101 1111
=
8 bits Check-sum 1110 11101)

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

The conversion from the humidity data is:

Binary system > Decimal System
0000 0010 1000 1100 > 652

\[RH = \frac{\mathrm{652}}{\mathrm{10}} = \mathrm{65.2\;\%}\] The conversion from the Temperatures data is:

Binary system > Decimal System
0000 0001 0101 1111 > 351

  1. \[T = \frac{\mathrm{351}}{\mathrm{10}} = \mathrm{35.1ยฐC}\]

If the highest bit of temperature is 1 as in: _1_000 0000 0110 0101, this means that the temperature is negative, therefore T = -10.1 ยฐC2).

amc2022/grouph/dht22_humidity_temperature_sensor.1661351198.txt.gz ยท Last modified: 2022/08/24 16:26 by gustavo001