Step 1: Watch the Video
Step 2: Gather the Material
1. DHT11 sensor module
2. and Arduino UNO
3. I2C LCD display (OPTIONAL)
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
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.
Vcc – 5V
Ground – GND
Data – D2
Step 5: Coding
So For code, we will use the DHT library
- so Download the DHT sensor library.
- Install the DHT Library.
- so open Examples or download the .ino file attcahed in this step.
- and comment the Line which says #define DHTTYPE DHT22.
- and also uncomment the Line which says #define DHTTYPE DHT11.
- upload the code
- open your Serial Monitor.
Optional Steps (if you get an Message like “failed to read sensor data”)
- check wiring connections,
- 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/