DIY weather station kit - tinkering and homebrew code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today i'm trying out monarchy english  brown ale from little brown jug   they say this is a limited edition so i'm kind  of happy i got to taste it while it existed   the tasting notes on the label claim malt  flavors of toffee chocolate and dark fruits   with a toffee and toast aroma and medium body  so today i'm going to be looking at this kit   that i got from banggood a while ago in this  kit we have a lowland nodemcu uh esp8266 board with one pin banding out to straighten that out a  little bit this is sort of an older version of uh   esp8266 board there's nothing wrong  with it but it's uh sort of predates the   d1 mini and that generation of boards which are  much smaller but also break out a lot fewer pins   so that's probably why they included this in  the kit because you can do a little bit more   with it if you choose to so we're gonna need  that obviously there's two breadboards always   handy to have breadboards there's  a bunch of breadboard jumper wires   um although i don't know if i'm going to  use these particular ones just because   they're very long and they're going to  get in in the way oh we'll see there is a   dht11 temperature and humidity sensor  comes with its own female jumper wires   which i don't think i'm going to need for what i'm  gonna do but those are good for if you just want   to go straight onto the pins there but i think i'm  just going to plug it straight into the breadboard   uh what we got here is a usb cable that is almost  three quarters of a meter they're about 700   millimeter something like that that's gonna  come in handy we have the display board   it doesn't have pins with it i'm  gonna have to solder my own pins on   oh and the peel no i'm not gonna put the music  on this time i'm just gonna do a quick peel so that can go on there now these  ones i've already pulled out just to   see what they are and i've soldered  the pins on them that is a gy30   which is a light intensity sensor not sure  what that has to do with weather other than   until i guess you could tell you uh have  your program decide if it's day or night   let's throw that guy onto the breadboard and  the last one which also came with header pins   that i soldered on earlier just because  is a bmp180 uh barometric pressure sensor so there we go i'm gonna go find me some pins  to solder onto that guy i'm sure most of you   have seen this trick before but when you're  soldering header pins onto these modules it's   not a bad idea just plug it into a breadboard  so everything stays nice and straight now i'll   just put away some of this extraneous crud and get  this wired up onto the breadboard so we can play   with it also i'm gonna have to come up with some  software that will take a little bit longer but uh   not for you because it will just be the blink  of an edit oh yeah right i gotta straighten   that peanut don't i that often happens in  shipping it's not the end of the world just   gotta be aware of it so you don't jam and  damage anything all right i'll wire that up   and uh come back when i've got some code for you  so here's the demonstration circuit that i've   come up with first of all these node mcu boards  and a lot of the larger boards don't fit on one   breadboard fortunately they did include two in the  kit so i was able to bridge across them like this   that gives me access to all  the pins the other thing that i   the thing that i didn't use from the kit  is i didn't use their wires just because   they're really long so i used  some jumper wires from my own   supply just to make it a little bit neater for  this other than that it's everything from the kit   so we have the display over here connected to i  squared c that's sda and scl pins then we have the   bmp 180 barometric pressure sensor also connected  to sda and scl next to it we have the gy30   light sensor also connected to sdn scl each one  of those three has a different address that's   how come they can all be connected in parallel  to the same control pins and then way back here   we have the dht11 temperature and humidity  sensor that one talks over its own protocol   and it just gets power ground and one pin that  being that one there and i've got it connected   i've just picked arbitrarily it's physically  d4 here but you see later in software the   physical pins and the arduino labeling  of the pins is different which can cause   some confusion when you're working with these  boards so just watch out for and be aware of it   and that's basically it and then power to  everything all these modules will run on 3.3 volts   some of them require it i think that  display board uh if it doesn't get 3.3   volts there's some software trickery you  can use to make it generated internally   but the esp8266 requires 3.3 volts maximum so the  5 volts coming in from the usb goes through this   regulator here to generate 3.3 volts that powers  the rest of the circuit but that was the easy   part the hard part at least for me was coming  up with software because banggood didn't supply   any and i couldn't find any written for this  specific kit so i pulled together some demos and   which are basically the demo sketches for each  of these modules and i put something together   here so there you can see through the shutter  scroll that it is displaying all the parameters   and i'm just refreshing the screen  every five seconds in software   so right now it's showing temperature  and humidity off the dht11   it's not quite that humid in my basement right  now but it is fairly humid my dehumidifier   says it's about 51 right now and i've had to shut  it off while i'm recording the video because it's   noisy um the barometric pressure and what is  coming off the bmp80 and the light level is   coming off that gy30 so if i hold my hand over  the light sensor and wait for it to refresh   see it gets much darker and if i just mechanically  squeeze the pressure sensor you see it changed and   when i lift off it should go back to where it was  more or less i suppose i could lean in there and   warm up the temperature sensor but you get  the idea that is about the temperature that   it is on my workbench so that's one of  the pieces of software the other one   doesn't use the screen and just and uses the  wi-fi capabilities the esp8266 and i will   probably demonstrate that best at the computer so  to load these sketches onto this nodemcu board i   just had to choose the correct board and i found  generic esp8266 module worked just fine on this so i'm going to upload the second sketch that  i came up with the wi-fi one i'm going to make   both of these available for download they're not  stunning examples of programming skill because   i'm not a stunning example of a programmer but  they will be both available it's not going to look   quite the same i'm going to clean it up afterwards  but once it's uploaded we'll just go over here   to the serial window and it'll  show us that it's connected to my   experimental workshop wi-fi and it  has started so we'll click on that   and there it is your basic weather station  showing that it's 23 degrees 56 percent humidity   there's the pressure there's the light and  when i cover up the light sensor and refresh   the page it should show as darker there it  is refresh the page that's the basics of it   now the boring part that i'll try and make  interesting going through the hacky code   that i put together so here's the one  that uses the display on on the board   it's just standard arduino code that as i said  i stripped most of this out of the library   demos for the various libraries that power the  different modules so spi and wire and adafruit   fruit graphics and that uh it fruit sd 1306  for the display the dht11 bmp yeah it's   that's all just straightforward includes  and if you're going to use this just make   sure you've got those libraries installed  on your system using the usual methods   and then defines and again these are all  stripped straight out of the demo sketches   that come with the libraries i've just  separated them all out for easy finding setup define stuff blah blah begin the  different libraries and then the loop   simply enough we read the sensors read  everything out of them that we need and then we print them on the uh on the little  tft module um set the cursor to different lines   uh and positions print out the information carry  on to the next one bang bang bang wait for five   seconds then refresh the screen and carry on it's  as simple as that and here's the almost identical   stuff for the wi-fi version basically i just  added in wi-fi stuff and stripped out the the   display stuff because i figured if you're going to  be running this thing on wi-fi you're probably not   going to want the local display on it you could  glue them together if you want i'm not stopping   you what the various library includes again  just got to make sure that they're all installed   and the include for the weather the web server  stuff uh just the standard esp8266 wi-fi library   uh oh yeah i forgot to mention this earlier so  even though the dht11 is connected to physical pin   4 on the board logically in arduino software it  refers to it as digital pin 2 so we just defined   that there and the other library hit exactly the  same thing and then setting up the web server of   course put your own ssid and your own password  in there i'm not about to show you mine create   the web server instance and then all this is the  same that's for the various different sensors   and here is more web server stuff just start  starting up the serial monitor so you can   find out what you're connected to and what  the ip address is because that's important   you could also in the library example you  can set it up with a static ip address   but you just need to know what's available  on your network if you're going to do that   and then the loop is the same until we get back  down to the web server stuff where it creates   the basics of a web page and there might actually  be some extra crap in there that i forgot to pull   out but it's not strictly necessary um there is  some the demo that i pulled this out of had push   buttons and window decorations and stuff like  that which i don't need for what i'm doing if   you're uh wanting a fancy web page feel free but  anyway it just prints out the uh the name the   labels and the variables super simple even  a hack like me can understand it so this   i think would be not a bad kit for somebody  starting to get into the hardware side   of uh of microcontrollers and arduino if  you're coming from the software side since   it doesn't come with any of its own software  and you've got to come up with it on your own it's not a bad little assortment of parts just  to have as parts if you want to expand your   your collection slash accumulation of arduino  related things you could build it up into a   onto a perf board or a circuit board to make  it more permanent if you wanted to without the   breadboards and jumper wires and stuff you  could park you know that side of it in a   ventilated box someplace and just wi-fi to it  to uh get temperature and sensor information   lots of things you could do with it i think it's  kind of neat and for what was it 20-ish dollars   not uh not a horrible value i think i'm going to  be absorbing these modules and everything else   into my general inventory rather than  keeping it together as a weather station kit   but for what it is it's good for experimenting  with the environmental sensors here is this kit   uh i got it from banggood oh it's currently  on sale uh i'll have a link down below and   i used to have a big good discount code for this  thing if i can find it if it's still valid i'll   put it down in the description regardless  i'll put a link to this down there anyway   there is a link down here to a manual which isn't  very useful it tells you how to connect it up   using software that it doesn't provide  to connect to several web-based platforms   i couldn't find this documentation and again  neither could the person that i talked to it   uh at banggood i hope you found that  interesting uh hope somebody finds my code   useful if not amusing or horrifying um let me  know what you think down in the comments section   like i said i will have a link to this kit and  to the hacky code that i wrote down in in the   description so if you want to take a look feel  free uh thanks for watching i'll talk to you later
Info
Channel: pileofstuff
Views: 13,143
Rating: undefined out of 5
Keywords:
Id: G_dTu2_HSjk
Channel Id: undefined
Length: 15min 14sec (914 seconds)
Published: Fri Jun 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.