learn and build innovative projects

Weather Monitoring System using Arduino and DHT11 Humidity/Temperature Sensor

No comments :
Weather Monitoring System using Arduino and DHT11 Humidity/Temperature Sensor

This project involves connecting an Arduino with a Digital Humidity/Temperature (DHT11) sensor to display humidity and temperature values on the Arduino IDE serial monitor. It is a straightforward project suitable for applications such as remote weather stations, home environmental control systems, and monitoring systems for farms or gardens.

Components Required:
  • Arduino Uno with USB 2.0 Cable
  • Digital Humidity/Temperature (DHT11) sensor
  • Jumper Wires
  • Breadboard

Arduino Uno with USB 2.0 Cable:

Arduino is a user-friendly, open-source electronics platform comprising both hardware and software components. Its design is geared towards enabling individuals involved in creating interactive projects.


Arduino and Digital Humidity/Temperature (DHT11) sensor to display humidity and temperature values on Arduino IDE serial monitor. This project is really simple and perfect for remote weather stations, home environmental control systems, and farm/garden monitoring systems.


DHT11  Humidity/Temperature Sensor:

DHT11 measures Humidity and temperature with the help of internal circuit.



DHT11 measures Humidity and temperature with the help of internal circuit.


Specifications:

  • Humidity Range: 20-90% RH
  • Humidity Accuracy: ±5% RH
  • Temperature Range: 0-50 °C
  • Temperature Accuracy: ±2% °C
  • Operating Voltage: 3V to 5.5V

Jumper Wires:

A jumper wire is an electrical wire equipped with connectors or pins at each end. It is commonly employed to interconnect components without the need for soldering, providing a convenient method for establishing electrical connections between different parts of a circuit.

A jumper wire is an electrical wire with a connector or pin at each end, which is normally used to interconnect the components  each other without soldering.

Breadboard:

A breadboard is a solderless device for temporary prototyping of electronics. It is used to interconnection between sensors and hardware boards using jumper wires.

A breadboard is a solderless device for temporary prototyping of electronics. It is used to interconnection between sensors and hardware boards using jumper wires.

Connection Diagram:

Connect your components according to the provided diagram and link the USB cable from Arduino to your computer.


Connect your components using jumper wires

Adding the DHT library:

In this tutorial  important to add library to your Arduino ID. if you haven’t install Arduino IDE download latest IDE from  Arduino Software and install.

In the Arduino IDE, go to Sketch >> Include Library >> Add ZIP fileIn the Arduino IDE, go to Sketch >> Include Library >> Add ZIP file


When you click the 'Add .ZIP library', you will get a file window that pops up. Select a Zip file you’d like to add. 
Double click on DHT-snsor-library-master.zipDouble click on DHT-snsor-library-master.zip.

Arduino Code:

#include "DHT.h"
#define DHTPIN 7    // what pin we're connected to
#define DHTTYPE DHT11   // define type of sensor DHT 11
DHT dht (DHTPIN, DHTTYPE);

void setup()
{
Serial.begin(9600); //Serial monitor communication baud rate
Serial.println("DHT11 test!");
dht.begin();
}
 void loop()
{
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature(); 
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" *C ");
}

Upload Code:

Connect Arduino board to computer using USB cable and wait for few seconds then it will show you "Com port". 

Check your Com Port and Board Selection before upload arduino code and upload.

Connect Arduino board to computer using USB cable and wait for few seconds then it will show you "Com port".



Output:


Humidity and Temperature values in serial monitor




Additional Projects:


No comments :

Post a Comment

Internet of Things

What is Internet of Things?

What is IoT? The Internet of Things (IoT) is the network of physical objects/things are embedded with software, sensors, and hardw...