Creative Commons License
.

Hello there! fellow Electronic enthusiast and hobbyists. so in this creative Arduino Tutorial, we are gonna learn about how to interface DHT11 Temperature and Humidity Sensor Module . and we will use it with our Arduino Board, which might be used for some future project.

and so let’s get started!

Step 1: Watch the Video

Step 2: Gather the Material

Step 3: What Is DHT11 Sesnor?

DHT11 module is a Temperature and humidity sensing module. which uses Digital Signal Acquisition, which converts the Temperature and Humidity to a digital Reading, which can be easily read by a Microcontroller. So the Operating range of DHT11 is 0 to 50 degree Celsius which is quite sufficient for Home or Hobby purposes. And as we can guess by its cost and nature of use. however this sensor module is not exactly accurate. but it works just fine for few simple Arduino projects. and it works on Negative Temperature Coefficient.

so it will basically change its resistance depending on the temperature.

and so for more details

http://wiki.sunfounder.cc/index.php?title=Humiture…

Step 4: Wiring

how to interface dht11. So The module that we have here has DHT11sensor, few complimentary 10 k ohm resistors and an LED light on board. henceforth you use the sensor standalone.

and also use the exact same module that we are using here in tutorial.

This module has 3 pins that are Vcc, Data and Ground pins.

And they are straight forward connections for Arduino.

Connections:

Vcc – 5V 

Ground – GND

Data – D2

Step 5: Coding

So For code, we will use the DHT library

steps:
  1. so Download the DHT sensor library.
  2. Install the DHT Library.
  3. so open Examples or download the .ino file attcahed in this step.
  4. and comment the Line which says #define DHTTYPE DHT22.
  5. and also uncomment the Line which says #define DHTTYPE DHT11.
  6. upload the code
  7. open your Serial Monitor.

Optional Steps (if you get an Message like “failed to read sensor data”)

  1. check wiring connections,
  2. and check selected DHT sensor type.

Step 6: (optional) LCD Example

how to interface dht11. let’s try to get the temperature and humidity readings on the LCD screen. but if you don’t know how to use LCD with Arduino. and also make sure you check out my Previous video on How to interface LCD with Arduino and How to create a custom Character.

Starting the code by adding the libraries. and defining the DHT data pin, DHT module type, lcd setup. and then we will define a custom character for Degree Celsius symbol. next in void setup, we will do the basic LCD configurations and in the Main loop. so here we will define two variables for temperature and Humidity which will store the value from dht sensor. and the Syntax here is dht.readHumidity and dht.readTemperature . where dht is the name that we assigned to this sensor in initialization steps. And next we simply print those values on LCD.

Step 7: Follow Mission Critical on Social Media!

so connect with Mission Critical

Twitter – https://twitter.com/AkshayMomaya1

and Instagram – https://www.instagram.com/officialmissioncritical/

and also Facebook – https://www.facebook.com/officialmissioncritical/

Write A Comment

Minov

A Market Place for your Innovations

0