In this tutorial we are interfacing DHT11 or DHT22 Humidity temperature sensor withESP32 DevKit.
The DHT11 (or DHT22 and similar) are cheap temperature and humidity sensors. The communicate with a ESP32 is over a single wire, but unfortunately it is not compatible with the 1-Wire protocol defined by Dallas Semiconductors.
The electric connection to the ESP32 DevKit is very simple, as the DHT series can be powered direct with 3.3V. Only 3 wires are needed: VCC, GND and the data line. Data Line is connected to GPIO15 (D15).
In this tutorial we are interfacing DHT11 or DHT22 Humidity temperature sensor withESP8266 NodeMCU. We are making complete Humidity and Temperature data logger with DHT11 and NodeMCU. Data logger web server with real time graphs and tables, mostly seen on thingspeak. But this time we are putting complete graphs and tables all inside NodeMCU without using thingspeak. For this we need graphs library that we are using from chartsjs.org an open source Chart drawing library and Knowledge of alax, html and javascript.
In this tutorial we are interfacing DHT11 or DHT22 Humidity temperature sensor withNodeMCU.
The DHT11 (or DHT22 and similar) are cheap temperature and humidity sensors. The communicate with a ESP8266 is over a single wire, but unfortunately it is not compatible with the 1-Wire protocol defined by Dallas Semiconductors.
The electric connection to the NodeMCU is very simple, as the DHT series can be powered direct with 3.3V. Only 3 wires are needed: VCC, GND and the data line.
Humidity is the amount of water vapor in the air. Water vapor is the gaseous state of water and is invisible. Humidity indicates the likelihood of precipitation, dew, or fog. Higher humidity reduces the effectiveness of sweating in cooling the body by reducing the rate of evaporation of moisture from the skin.
DHT11 Humidity Temperature Sensor
The DHT11 humidity and temperature sensor measures relative humidity (RH) and temperature. Relative humidity is the ratio of water vapor in air vs. the saturation point of water vapor in air. The saturation point of water vapor in air changes with temperature. Cold air can hold less water vapor before it is saturated, and hot air can hold more water vapor before it is saturated. The formula for relative humidity is as follows:
Relative Humidity = (density of water vapor / density of water vapor at saturation) x 100%
Basically, relative humidity is the amount of water in the air compared to the amount of water that air can hold before condensation occurs. It’s expressed as a percentage. For example, at 100% RH condensation (or rain) occurs, and at 0% RH, the air is completely dry.
Components Used
DHT11
Arduino Uno
Connecting Wires
DHT11 Sensor Pinout
DHT11 Arduino Circuit Diagram
Arduino Code for DHT11 Humidity Temperature Measurement