Skip to content

Humidity and temperature sensor

Ihor Sobianin edited this page Jun 23, 2023 · 2 revisions

Hardware overview

This board is compatible with both DHT11 and DHT22 humidity and temperature sensors. The output is serial data. A comprehensive overview of both sensors and their application with ESP32: https://randomnerdtutorials.com/esp32-dht11-dht22-temperature-humidity-sensor-arduino-ide/

A comparison table taken from randomnerdtutorials.com (full link above)

DHT11 DHT22
Temperature range 0 to 50 ºC +/-2 ºC -40 to 80 ºC +/-0.5ºC
Humidity range 20 to 90% +/-5% 0 to 100% +/-2%
Resolution Humidity: 1%
Temperature: 1ºC
Humidity: 0.1%
Temperature: 0.1ºC
Operating voltage 3 – 5.5 V DC 3 – 6 V DC
Current supply 0.5 – 2.5 mA 1 – 1.5 mA
Sampling period 1 second 2 seconds

Programming module

To work with either sensor, the following libraries should be installed:
https://github.com/adafruit/Adafruit_Sensor - It is needed to install the DHT library
https://github.com/adafruit/DHT-sensor-library - DHT library from Adafruit

Safety

Do not connect or disconnect connectors while power is ON. All adjustments must be done ONLY when power is OFF.
Check the temperature sensor before using it in an experiment.
If temperature readings during an experiment differ slightly from theoretical data, consider stopping the experiment and looking into this issue.
If temperature readings during an experiment differ highly from theoretical data, consider stopping the experiment straight away and informing your safety officer about the incident.

3D model

Humidity and temperature sensor

Clone this wiki locally