Simple Room Temperature and Humidity Monitoring

Simple Room Temperature and Humidity Monitoring

Simple Room Temperature and Humidity Monitoring

1,120.00 (949.15 + GST)

Out of stock

1,120.00 (949.15 + GST)

DHT11 and DHT22 are used to measure Temperature and Humidity in the environment. These two sensors are very popular in DIY Hobbyists and Makers. We will see how to use this Temperature and Humidity Sensors with Arduino.

Availability: Out of stock SKU: 2559 Category:

Description

DHT11 and DHT22 are used to measure Temperature and Humidity in the environment. These two sensors are very popular in DIY Hobbyists and Makers. We will see how to use this Temperature and Humidity Sensors with Arduino.

The DHT Sensors has two electrodes for moisture measurement and a Thermistor for Temperature Measurement. For Humidity the sensor is also called as Hygrometer. Both are integrated into this DHT11/DHT22 Sensors. Inside the Sensor, there is an Analog to Digital Converter to convert these two values in digital. Hence it can be easily used with any microcontrollers and also in Raspberry Pi.

Note: Featured product image is for reference only. Not the actual product.

Components Required:

1 x Uno Compatible with Arduino

1 x USB A to B Cable for UNO

1 x DHT11 Temperature and Humidity Sensor Module

1 x LCD Display 16×2 with I2C Soldered

1 x MB102 Breadboard

Jumper Wires Set

1 x ERD 9V Power Adapter

 

The DHT11 Module that has 3 Pins called as S, V, G

DHT PinDescription
SSignal
VVCC
GGround

 

Circuit Diagram:

Simple Room Temperature and Humidity Monitoring Simple Room Temperature and Humidity Monitoring Simple Room Temperature and Humidity MonitoringInstalling Required Libraries:

We need 3 libraries for this code, 2 for DHT and 1 for LCD with I2C.

You can install DHT and unified Sensor Library in the Arduino IDE. Go to Sketch Include Library > Manage Libraries. Search for DHT Sensor Library and Install. Similarly search for Adafruit Unified Sensor and Install.

Now to install Liquid_Crystal_I2C visit the url here. Download the Zip File. Now Open Arduino IDE and Go to Sketch> Include Library> Add .ZIP Library. Now navigate to the downloaded file location and double click. It will be added.

Now we can proceed with the Code.

Code:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 or Some I2C has 3F
//Use I2C Scanner Code if address not works
LiquidCrystal_I2C lcd(0x27, 16, 2); // Replace 0x27 to 3F if I2C Address is different
#include <dht.h>
#define dhtPin 8

dht DHT;    // Create a DHT object

void setup() {
  lcd.begin(); // Initialize the LCD
  // Turn on the blacklight and print a message.
  lcd.backlight();
  lcd.print("Simple Room Temperature Monitoring");
  delay(1000);
}

void loop() {

  int readData = DHT.read11(dhtPin); //Reads data from Sensor Pin
  float t = DHT.temperature; //Read Temperature
  float h = DHT.humidity;// Read Humidity

  lcd.setCursor(0, 0);
  lcd.print("Temp.: ");
  lcd.print(t);
  lcd.print((char)223);//shows degrees character
  lcd.print("C");

  lcd.setCursor(0, 1);
  lcd.print("Humidity: ");
  lcd.print(h);
  lcd.print("%");
  delay(2000);

}

 

After uploading the code, you can able to see the temperature and Humidity of your current environment. You can use your hand to check te temperature and humidity variations or any heating element like soldering iron or near your Laptop Fan to see the temperature variations (don’t place soldering iron directly on sensor).

Reviews

There are no reviews yet.


Only logged in customers who have purchased this product may leave a review.