How to Set Up the DHT11 Humidity and Temperature Sensor on an Arduino

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you hey welcome back in this video I'm going to show you how to set up the dht11 humidity and temperature sensor using an Arduino this is a great sensor that's one of my favorites it's a digital humidity and temperature sensor it's very easy to set up and they're really inexpensive I think I got this one for like three dollars on Amazon they're really good for weather station projects or environmental monitoring projects I've also seen abhi use for monitoring the level of moisture in the soil for house clients so there's lots of stuff you can do with them so with that let's get started I take it and insert it into the breadboard this particular one has three pins and it's mounted to a small little PCB some of them have four pins and if you go to the blog post I'm going to link to in the description I'll show you both versions the three pin and the four pin and what each pin is used for but for this video I'll just show you the three pin version then I'm going to take a jumper wire and connect the negative pin of the dht11 to the ground pin of the Arduino now I'm going to take another jumper wire and connect the middle positive pin of the dht11 and connect that to the 5 volt pin of the Arduino then I'm going to take another jumper wire and connect the signal pin of the dht11 to digital pin 7 of the Arduino and that's all we need just three wires so now we're ready to upload some code that Arduino go to the blog post and I go pretty in-depth into how the dht11 works how it senses humidity and temperature I've got the technical specifications and a data sheet that you can download so the dht11 measures relative humidity that's basically just the percentage of moisture in the air 100 percent humidity being rain and zero percent humidity means absolutely dry air and here's an image of the three pin version and the four pin version pin outs here's a diagram of the circuit we just connected so in order to use the dht11 on the arduino we have to have a special library installed on our computer this is the DHT Lib library there's a couple other ones but I just chose this one because it's the simplest all you have to do is download the zip file then you open up your arduino ide and then in the drop-down then you sketch select include library and then add library and then you search for where you download the zip file and click on that and it will install the library for you it's really simple after you have the library installed we can run some code on it so i just have a basic program here i'm going to copy this open up the card to an ID paste it in there and upload it once that's uploaded just open up the serial monitor and your temperature and humidity readings will be displayed so temperature is in Celsius and humidity is in relative humidity and to demonstrate I've got a wet paper towel I'll put that in front of the dht11 and you can see the humidity increase all right also in this article I have a program if you want to output the temperature and humidity readings to an LCD display just check out my other tutorial on how to setup a LCD display on an Arduino to connect the LCD I won't go step by step here on setting up the LCD because I have another video on that too you can check out but we'll connect the dht11 negative pin of the dht11 to the negative rail of the breadboard positive pin of the dht11 to the positive rail and the signal pin of the dht11 to digital pin 7 of the arduino it's the same setup as without the LCD display but the code is different we have to include the liquid crystal library we'll copy that and paste it and then upload and there we go temperature and humidity output to the LCD display here's our white paper towel so you'll notice that changes in humidity take a little bit longer to register than changes in temperature that's because the humidity sensor portion of the dht11 actually absorbs moisture onto a substrate which changes the resistance between two electrodes you can do a lot with the dht11 not just output the temperature and humidity readings to a display you can use the DHT dye temperature or DHT humidity variable in other functions you can use them to turn on or off a 5 volt relay when the humidity reaches below a certain value in the case of a soil moisture monitoring project you can use it to turn on or off a water pump when the humidity reaches below a certain value in my next video I'll show you how to control a power outlet with the dht11 and the Arduino alright well that's about it I hope you found this helpful and if you like it please like it and share it if you know anybody else that would enjoy it as well alright we'll talk to you later have a good day
Info
Channel: Circuit Basics
Views: 503,060
Rating: undefined out of 5
Keywords: arduino, circuit projects, electronics projects, circuits, circuit basics, dht11, dht11 humidity sensor, dht11 humidity sensor arduino, how to set up dht11 on arduino, dht11 humidity and temperature sensor, arduino dht11 tutorial, arduino humidity sensor, ardunio humidity sensor set up, arduino dht11 set up, arduino digital temperature sensor, arduino digital temp sensor, arduino dht11, fun arduino project, cool arduino project, environmental monitoring, soil moisture monitor
Id: oZ-oFY6TiPw
Channel Id: undefined
Length: 7min 50sec (470 seconds)
Published: Fri Nov 13 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.