Arduino Tutorial 52: Portable Temperature and Humidity Sensor with DHT11

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys this is Palma quarter from top tech boy comm and we are here today with lesson number 52 in our epic in our legendary new series of Arduino tutorials what I'm going to need you to do today is pour yourself a huge mug of iced coffee I'm going to need you to get out your e Lego super kit and if you don't have one you can pick up one in the description down below link in the description down below and what we're gonna do today is we are going to create a portable temperature and humidity sensor based on the dht11 sensor now we've done a lot of this work in lesson number 51 I think in lesson number 50 you in Lesson number 50 we got the DHT sensor connected and working then in Lesson number 51 we had the sensor working with the Arduino and an LCD display we were working our way to being able to untether and have a standalone unit that we could walk around with now in Lesson number 51 I gave you the homework assignment of creating a portable unit that you could walk around with empower yourself and I gave you a hint that you would have the components and your super starter kit to make this project mobile who was successful who was successful if you were successful leave a comment down here and don't cheat great don't cheat don't do this if you did it after I showed you how to do it but if you did it on your own before I showed you how to do the homework leave a comment below I am Legend okay I am Legend if you did this on your on your own let me show you how to do it again in this build I'd suggested in the last video that the time had come to go ahead and get an Arduino Nano because if you use the Nano instead of the uno which comes with the kit you can do a much neater build you see what a nice job we did on this build it doesn't have the loopy wires going everywhere it is pretty easy to get you know to keep it neat if you can plug an Arduino directly onto the breadboard all right now what do you need in order to make this mobile well let's go back to kind of where we left off in the last lesson we had this Arduino plugged in like this and plugged in like that hopefully this thing is still working hopefully yeah there it goes okay maybe you can't see it maybe I need to turn the brightness up a little bit okay there you go so you can see that this thing is working when we are tethered to the desktop but the only thing that this USB connector is doing for you now the only thing you're getting out of this is power and so what we want to do is we want to power it without that one option would be to plug the USB cable in and the other end of it plug to a USB power bank like one of the little phone charger power banks and you could walk around with that but what I'm going to show you is this amazing component which is the power supply which you can use to power a portable praat project what you can see if you look carefully let me see if I can go to a different view here maybe you could see this better hopefully yeah and we're getting pretty good focus today if you look up here it says that the VN needs to be less than 12 volts well what's convenient 9 volts is less than 12 volts as you see now in math class how they kept harping on you about the less than and greater than sign which is which why is that important because you need to know that this says that you want to voltage less than 12 volts because if you misread that and put 25 volts on very likely you're going to burn everything out but what is very convenient what is very convenient is a 9-volt battery is less than 12 volts and so you can power this with a 9-volt battery and then this can power your entire and I need to give you kind of a word of caution about what we're going to be doing here in this particular case what we're going to be doing is we're going to be not only powering our sensor in our LCD from this regulated power supply but we're also going to be powering the Arduino and we will be doing that by coming over here in getting the regulated five volts off of this regulated power supply through the five volt pen and for a simple project like this it's usually not going to be a problem but in general powering the Arduino from these external pins whether you're using V n or five volts or the USB it's something you want to be very careful about and what I'm telling you is on this one there's really not too much of a problem by powering the Arduino off of the 5 volt pin because this is regulated one word of caution though is you do not want to connect the USB if you have the v if you're powering through the 5 volts because then you're trying to power it through the USB and trying to power it here at the same time and it's like connecting two power supplies together and you don't want to do that for this particular case you can do it this way and probably not have a problem in general the safest way to power the Arduino is through the USB or if you do not have a USB and you want to power it with something other than regulated 5 volts if you go through this barrel connector that barrel connector will then go through the Arduino 5 volt regulator and then you will not have a problem what we're kind of doing here is we're relying on the fact that this power supply has a has its own regulator and therefore we are pre regulating the power and bringing it directly into the 5 hole pin so just a word of caution be really careful about powering the arduino z' from an external power supply may be something we need to do more of a lesson on later but for today just know that this is much not going to cause problems as long as you don't come in and plug in the USB it works just good enough that you sometimes wait for it okay so we're going to take this and we're going to plug the 9-volt battery in through the little cable that comes with the kit but now there's something very important and you need to look at there are two sets of outputs here there is a plus output and a minus output at the top and there is a minus output and any plus output at the bottom okay the thing that you have to see though is what you get out of this can either be five volts or three volts depending on where this jumper is set and if you remember on our build in the earlier lesson in lesson 51 that we were operating with power and ground at both the top and the bottom of the board so that we could just grab whichever one was convenient well what that means is that means that you've got to make sure that both of these jumpers are set to 5 volts in the way mine cane is one of them is to 3 volts so the one that's set to 3 volts I need to take that jumper off and I need to connect it where it says 5 volts okay so let's look you see that's set for 5 volts then we come over here this one's set for 5 volts now we are ready to plug this in ok and what would be very nice and very natural would be to just plug it in there like that ok and look at that I have all of the pins plugged in which makes it nice and secure nice and nice and mechanically secure but this is like I'm going to kind of give you a heads up here and these are the things that happen in real projects when you're building them if you look at this can somebody tell me the if you look at that can somebody tell me the problem all right or maybe look down here somebody tell me what my problem is okay if you see the problem I want you to put down below a comment I am Legend in troubleshooting ok I am Legend and troubleshooting do you see what the problem is is that this top row was labeled plus so we did our bill based on it being plus in this second row here was labeled minus the blue line was labeled - we made that - and similarly down here this bottom row was labeled - so we made it aground and then the second to the bottom row we made a plus what is wrong if you look at the polarity coming out of this power supply both there and there it's backwards okay so what options do we have well one option is I could come across and swap so this positive would need to go to ground because that's going to become the you know that's going to become our new positive and then all along here it looks like I would have one two three four five six seven eight nine that I would need to reverse nine connections that I would need to reverse and then down here 10 11 12 13 14 so I would need to go swap all of those so that this configuration would work all right now that's one way I could do it and I don't want to bore you with that but you could do that if you wanted to or what I can do is I can take this out and flip it this way and I can still get it plugged in like that okay and now let's look at it very carefully now if you can see now the positive is on the top which matches the negative is the row below it which matches and then here the positive is the second to the bottom row and the negative is the bottom row so by putting it in this way it's gonna work now why do I not like this as much well the reason I don't like it as much as I'm only getting one of the sets of pins in now that's okay because they both do the same thing but I'm only getting one of the sets of pins in and not the other and over here I'm getting similarly one set in and not the other but one set will work what it doesn't give me though is it just doesn't give me the mechanical stability that I had if everything was plugged in together so what's one of the things that we learn here we learn that you really kind of want to do all your layout at the same time and you want to avoid ending up with a precarious situation like this I also think that I would have liked to have had a little bit more room here so maybe in my build bringing this a little closer to here and this a little closer to here I think I could have squinched a little bit more room there to get this all working okay but now we talked about you've got to be very mindful about how you plug this in so that the voltages that you are getting out so that the voltages that you are getting out match your build on the breadboard as far as which rows you're using as a positive in which rows you're using as a negative and trying to get this to focus let's hold it this way I think it's gonna work right there that's a good that's a good focus okay so you can see you've got to make sure that you're aligned your build with your power supply and in this case plugging it in in this orientation it does work the other thing that you've got to make sure is is that you're using a suitable power to this and we can see that a 9-volt battery would work so let's see if we can hook this up so I'm going to come over here and I'm gonna plug the battery in okay and then what you can see is the battery will plug in here like this and now we have it all hooked up you don't see any signs of life because what I want you to see in this power supply you've got an on/off switch so let's turn the on/off switch let me see okay here you can see it all I'm gonna get further out of your way like this okay so we're gonna come in and we're gonna turn the switch on good we're seeing signs of life and boom boom did you see that look at that what is something that you notice about this if I back off what is the thing that you notice about this as I back off you have a completely stand-alone system do you see that it is standalone because you don't have any wires coming in at all no wires coming in at all and I want this thing to focus sometimes if I'll just do that okay now all right see see no wires no external connections at all we are at this point we are absolutely positively completely portable okay we are completely portable so like if I pick it up here look at that boom excellent okay now what else is nice what else is nice is I have an on/off switch okay I have an on/off switch so I can turn it off now you're probably wondering why this looks like it has a hole well that's because the wires are green and it is acting you know responding to the green screen software so ignore the apparent hole there I assure you there's not a hole in the in the project but let's say that I come up here and you can see it and I can turn it off and I can turn it on and it boots up in just a few seconds and then starts giving very nice readings so guys this is a huge step forward this is a huge step forward in our project because this is the first time that we've actually made anything that starts looking like something that you could really do something with so what would be the next step in a project like this the next step to me would be to get out your 3d printer go to fusion 360 and start printing out a little bit of a box for this and so you could make a box and put this in it I'm not going to do it because this last series of lessons is on the Arduino if you want to take the project to that step go over to my series of lessons on fusion 360 learn fusion 360 and really in an hour or so a couple of hours on those on those homeworks and you would be able to design a nice case for this a nice box for it the other thing that I think I would be doing would be I would be going to one of those perf boards and instead of using a PC board I would use a perf board and I would really pack this stuff in there as close as I possibly could and then I would wire wrap and if you guys have not wire wrapped go and look at the wire wrapping tutorial in my old set of Arduino lessons go back to the old set just search on you know YouTube my name and wire wrapping and I'll show you how to wire wrap wire wrapping would be the next place that you could go with this and then if you got it wire wrap the next thing that you would do after that is you can actually design your own little PC board and then you could solder these things in place and then have a case and you would have like a really fairly fairly advanced little working prototype what I really like about the e Lego kit I really like the power supply because it makes it so easy to make a project where you can just go you know you can just go go mobile fairly easy so this has been kind of a fun project I hope you guys have played along at home I would really like to hear your I would really like to hear your comments down below let me know if you did this let me know how it worked if it worked if it didn't work and you realize that I am going to go insane over this focus issue sometimes if you just take the focus off and then sometimes not okay okay so give me a comment down below about how this project went and I think this really opens up a new capability for us that we're not just spending our lives with these big you know loopy wires that go everywhere but we start getting things that look a little bit more like a prototype that you could actually use and use in the field I've had fun with these lessons if you guys have enjoyed them think about giving us a thumbs up also guys if you have not done it yet go in the link below and get yourself a nano because as we take projects to that final stage we can do the early work on the Arduino Uno but when we get to the point of wanting to build a little standalone unit like this we really want to have a nano that we can that we can use okay appreciate a thumbs up subscribe to the channel be sure to ring the bell click the little bell when you subscribe so that you'll get notifications when new material has come out on this channel share this with other people man if you're if you're learning and finding this useful spread the word Palma quarter from top tech boy comm I will talk to you guys later
Info
Channel: Paul McWhorter
Views: 24,669
Rating: undefined out of 5
Keywords: DHT11, Temperature and Humidity, Arduino, Portable
Id: NJW-v2mH7S4
Channel Id: undefined
Length: 19min 54sec (1194 seconds)
Published: Tue Mar 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.