Esp32 Projects

ESP32 DHT11 Temperature and Humidity Sensor

ESP32 with DHT11/DHT22 Temperature and Humidity Sensor using Arduino IDE

Introduction

In this article we interface the DHT11 sensor with the ESP32 Board and display reading in Serial monitor,16×2 LCD Display And Oled Display.

DHT11 Sensor Measures the temperature and humidity and is a digital sensor that’s why we conected the digital pin to the esp32 board.

In DHT11 Sensor is only 3 Pin first is VCC, Digital Output And GND.

DHT11 Sensor
DHT11 Sensor

We conected the VCC pin in 5v, the Data pin is conected to Pin Number D14 and GND is conected to the GND of the ESP32 Board.

Guide For How You Install ESP32 Board  In Arduino IDE softwareAAA

Bill Of Materials

S.N

Component's

Quantity

Link To Buy

1

ESP32 Board

1

2

DHT11 Sensor

1

3

Zero PCB

1

4

USB Cable

1

Component’s 

  • In ESP32 Board Is Integrated with Wi-Fi And Dual-Core, Low Power Bluetooth, Low  Power Consumption, and High performance.
  • ESP32 Is a small-size Size Board And Has Soo many pins available To Connect to the input and output Devices.
  • Compared to the Esp8266 Board Are so many Analog pins Available On the ESP32 Board and it Takes Low Power.

ESP32 Baord

The DHT11 and DHT22 both sensors measure temperature & humidity in analog format and are converted into digital signals by an internal analogue-to-digital converter (ADC) within the sensor chip.

DHT11 Sensor 1

Specifications of the DHT11 sensor

  • Temperature Range:  0°C to 50°C (32°F to 122°F).
  • Temperature Accuracy:  ±2°C.
  • Humidity Range: 20% to 90%.
  • Humidity Accuracy:  ±5%.
  • Resolution:  1°C for temperature measurements & 1% for humidity measurements.
  • Response Time: 2 seconds for temperature readings & 2-5 seconds for humidity readings.
  • Supply Voltage:  3.3V and 5V DC.
  • Current Consumption: 1.5mA
  • Communication:  single-wire (Digital Sensor).
  • Sampling Rate: 2 seconds.

Circuit Diagram 

In this circuit diagram we interface the DHT11 Sensor first pin is conected to the VIN pin RED Wire, the Middle pin is conected to the D14 pin number(Blue Wire) And the third pin is conected to the Ground (Black Wire).

ESP32 With MicroPython2

  • When is connection is done you open the Arduino IDE software copy the code paste it into Arduino IDE select the proper board and upload it.
  • when the code is successfully uploaded in the esp32 board then you just open the serial monitor and check the reading of the sensor.

Code 

With 16×2 LCD Display (I2C)

With OLED Display (I2C)

GitHub e1697076839430

Working Module 

Now we upload the code and check the reading in a serial monitor

ESP32 With DHT11 Sensor

Serial Monitor OUTPUT

ESP32 DHT11

I hope you understand how the DHT11 sensor interfaces with the ESP32 board if you have any problems then comment it we try to Solve your problem.

Conclusion

In the project, we learned all about how you used the dht11 sensor. if you try to interface the sensor in another microcontroller then also you use the same code but the pin will change in the code.

ESP32 Projects

918830584864

Prateek

Hi, Prateek Here I’m interested in Electronics That's why I Make Soo Many Projects, I’m currently Pursuing M Tech.. if you Relay Like To My Blog Plz Comment Below...Thanks To All Electronics Lover...❤️

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker