Temperature and Humidity Sensor Module With Arduino
by Webotricks in Circuits > Arduino
46 Views, 1 Favorites, 0 Comments
Temperature and Humidity Sensor Module With Arduino
.png)
This project uses an Arduino Uno and a DHT11 sensor to measure temperature and humidity, calculate the heat index, and display the data on the serial monitor.
In this lesson, you’ll learn how to measure temperature and humidity, as well as calculate the heat index using a DHT11 sensor with an Arduino Uno. We’ll cover reading and interpreting data from the DHT11 sensor, and displaying these values along with the heat index in both Celsius and Fahrenheit on the serial monitor. This project is perfect for Arduino beginners, providing hands-on experience with sensors and data handling in a simple yet engaging way.
Supplies
Gather the Required Components
Before starting, make sure you have the following components:
Arduino Uno – The microcontroller board used for processing sensor dataDHT11
Temperature & Humidity Sensor – The sensor that measures temperature and humidity
Breadboard – Used for circuit prototyping
Jumper Wires (Male-to-Male) – For making connections
USB Cable – To connect the Arduino to the computer for programming and power
Circuit Connections
.png)
Now, let’s wire the DHT11 sensor to the Arduino Uno as shown in the diagram below.
Connect the VCC pin of the DHT11 sensor to the 5V pin on the Arduino Uno. Next, connect the Data Out pin of the sensor to Digital Pin 2 on the Arduino. Finally, connect the GND pin of the sensor to the GND pin on the Arduino.
Important: Some DHT11 modules have four pins. If yours includes an NC (Not Connected) pin, simply ignore it.
Install the DHT11 Library in Arduino IDE
Before writing the code, we need to install the DHT11 library in Arduino IDE.
Steps to Install the Library:
Open Arduino IDE.
Go to Sketch → Include Library → Manage Libraries.
In the search bar, type “DHT sensor library”.
Install "DHT sensor library by Adafruit".
Code
Code: