20 Dollar 20 Minute Wifi Weather Station with ESP8266 & Thingspeak

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey youtube today we had a great project for you we're going to build a $15 15-minute Wi-Fi weather station that uses things beak and the esp8266 along with the ESP ez firmware so here we've got the star of the show the BM e2 80 temperature humidity pressure sensor we've got a point nine six inch OLED I squared C display the BM e 2a is also I squared C and a a SPL one of the a I think er 1024 K variety I've got a few other items here take a look at our materials got some hookup wire we've got a slide switch a press button switch to 10k resistors don't worry about that I've got a USB TTL cable here with some jumpers on it and a 3 volt power supply the USB cable is in fact 3 volt compatible but it does not put out enough power so don't even mess around with it some people say oh yeah just hook up one of these things and everything's great sugar great no don't do it don't mess with it silly doesn't make sense get the right power supply do it right the first time so we've only got 15 minutes here as I said let's dive right in I'm going to drop these items into the breadboard let's take a look at well first going to accomplish here our first goal is going to be load up the espec framework we've got a few connections we're going to make chip enable is going to be pulled up to VCC reset pulled up to VCC as well as adding a switch that will pull to ground GPIO 0 is going to have a switch that pulls to ground and this is used for telling the boot loader to load into flash mode so you can write the firmware let's get started so I've already got my ESP connected to one of these DuPont cables and I've got it laid out here so it matches these pull them all out here so first thing we'll do is a pull on our pull up on to chip and able we're not going to take any shortcuts here today I'm going to show you step by step anyone can do this this is so simple any one two three four one two three four so you're going to get to watch me play with the breadboard a little bit so we've got chip and Abel we're good on that let's wire up reset is going to be our push-button switch we're going to take this to ground next we're going to do our flesh switch again to ground up to GPIO zero which is in this case the third pin our green one so the cost on this I'm going to assume you already have a few things laying around and I'm not going to include stuff like the USB TTL cable obviously I'm not going to include the hookup wire and resistors the ESP you can even get it on eBay for like 4 bucks or something so the cost here is kind of whatever you want it to be with regard to extra coupons you can switch out the OLED for a typical LCD type display whatever you want to do so now we've got our USB cable hooked up this is a prolific PL 2303 style let's go ahead and hook that up to the computer and I'm going to hook up my power now so I've got this 3 volt Center million power supply put that right up your power bus and with any luck VCC and ground on my TSP we'll be in business first I'll do ground and then VCC look at that you can't see that look at that we got our red light so everything looks good here if I press my reset button I should see the little blue light blink and what's happening there is the blue light indicates you are to traffic and so in this case it's actually the bootloader responding with a little message hey I'm here so now we can proceed with flipping the switch so we're in flash mode reset at one time and let's head over to the computer to write some firmware so no shortcuts here I do not even have the serial cable driver installed shoutout to a taproot here if you need this cable you should buy from Adafruit it's only ten bucks what a deal they're just a great company a lot of contributions to their github for how to set the stuff up amazing articles and we can use them right now just to get this little driver so why not it's awesome these guys are great ten bucks do it well we're waiting for that we're also going to go ahead and download ESP easy framework firmware rather so that's this website esp8266 nu it's a wiki we want to go to the main page down at the bottom is where you can download it I'm going to talk fast cuz I really want to do this in 15 minutes so I apologize for that this is going to be awesome though so we now have the serial driver install I'm going to pull out and plug in the USB one time let's go ahead and take a look at computer manager right click a computer go to manage and we can see in the device manager what our comport is comp three there we go prolific field 2303 so now we have our ESP firmware here let's go ahead and extract that I'm also going to download putty putty can be used for a serial terminal and ESP easy framework outputs all kinds of really useful debugging messages and it just tells you what's going on so you really get a good idea of just what's happening throughout this process we'll come back to that so I've got my ESP easy framework extracted here I just got to go ahead and run this little flash batch file and so it wants to know what comport number three flash size in this case we have the black model it's five it's a 1024 if you have the blue one it's a 512 here's the big ESP twelve model that's going to be the 4096 so the build is the file we just download in this case it's r1 20s for input 120 and no dice y no dice I'm go ahead and click the reset button try it again port 3 1024 120 now really nothing really it looks good nothing looks so great here do I am receiving transmit properly crust TX should go to RX RX to TX okay good good good there am I in from our boot mode do I have my pins correct on the switch maybe I do not maybe I do let's try this again 4:3 1024 build 120 there we go beautiful always watch your connections and you can see the UART lights going crazy because firmware is being transferred I'm going to go ahead and get putty ready here because as soon as this reboots it starts doing some stuff that's worth seen mmm these bees he has some kind of like a initial boot process that will erase the flash and also there's a bug to be aware of let's just give them a minute so I did not connect the I squared C connections for anything okay now it's done let's go ahead and open putty we got here anything anything okay maybe you won't get the bug I think I already loaded the firmware on you but I'm going to go ahead and click I'm going to turn off flash mode hit reboot let's take a look at our comport here it looks good no SSID I squared C boot okay so no SSID means we're now broadcasting and we are ready to connect up with our Wi-Fi so if you go to back to the ESP easy website there's a section here on tutorials on flashing the firmware good stuff and then down at the bottom it says ESP easy setup so this tells you it's going to be broadcasting on ESP 0 and the password your key to the Wi-Fi network is configures P so let's take a look at the Hat got my iPad here go ahead and go to the Wi-Fi section ESP 0 there it is password come fig ESP John okay so now there's something weird that's going to happen it's detecting that it doesn't have an internet and it's saying hey I'm pretty sure you want Internet we're going to take care of that for you we don't want to do that so we're going to cancel we're going to say use without internet you'll see why in just a second to click the information here we can see the ESP has the IP address 1 i2 168 4 1 and we cannot type that into a browser and look at that now we're connected to the ESP device and it's listing the local Wi-Fi networks for connection so the first thing we're going to do is go ahead and select my two com1 with the logical password of two's on rocks and go ahead and connect so right now the ESP is attempting to connect to that Network if we go back to our putty we can see yep it's connecting it's connected this is still counting down but we've pretty much know it's connected but this will tell us now what IP address it just received and that's the main reason that I don't like using the other little captive portal pop-up because it doesn't give you this IP and then this is a link to take you right to that thing so if I switch back to my to my settings it's no longer broadcasting on ESP 0 so I'm connected back to my normal Wi-Fi network and we can switch back to the browser and click on this link and sometimes I found that it gets a little flaky here and you do need to just go ahead and reboot the ESP again because we're in a bit of a time crunch here I'm going to go ahead and do that and click my red button again so we can see on the putty terminal again Wi-Fi is connecting Wi-Fi is connected great now I'm going to stop this click on my link again there we go so the reboot kind of kicked it into gear okay now we're ready to wire up our devices I'm going to go to the hardware tab here and just go ahead and pre configure our I squared C to use GPIO 0 SD a GPIO 2 or SEL and submit that if you look back at our terminal it says settings are saved so let's go back to the breadboard and wire those up so we've got ground we've got one two three four is GPIO too it is SEL SEL so easy to do this stuff I'm going to match them up people that make these models are freakin geniuses here is our shared one 4d back what am I doing here right reset this one help sta sta just on the BM e then let's bring down some power let's carry over our power and ground let's color mixing up all my colors it's no good okay bcc on here ground on here we should be in good shape ground ground but never ground I do and it shorts come together great ok that looks good so we now have all of our I squared C connections available and we just need to go back to our ESP easy see what's going on so I'm going to just do this on the computer this time we have 1089 the 2.55 if you go to the tools tab and click on ice - hi squirt z-scan no I squared C device is found again reboot click the button why I don't know who cares it works ok normal boot I squared C refresh boom we see our devices amazing let's go ahead and configure on so we can throw something on the screen right away and if you go to the espec website it shows all kinds of things you can show on the screen with these little sort of macros and stuff so you could do up time system time IP really cool stuff so I like to see the IP % IP and then how about just a little special message great let's update the screen every 5 seconds just for immediacy submit that we take a look we could see the screen rebooting I always forget this we want to do rotation - I kind of set it up that you're going to probably want to rotate it there we go it's flipped over great give it a second here and let's see if our message shows up I'm gonna just keep going configure BM e 280 so I'll just go another device you do have to put it in index here I've noticed you have to give it a name I like a lot of precision I'm going to add a decimal I'm going to rename its temp you brush press to admit it if I go back to devices you should see the readings show up here delay I think this is the frequency of how often you read the censors let's dial this down to again like five just for the sake of our demo here yeah nothing yet let's go ahead and say send data while we're in here this means we're going to send the data to things speak we'll get there still no okay well on our screen we do have our IP address now let's go ahead and say what we want to do for the other stuff temp I want to show time temp and that's in degree C humidity so you put sensor name hash the field ID whatever it was called it's in millibar so this is beating me today okay let's see what happens back to devices do we have a reading yet hey like that we have a reading just in time to display it on the screen very cool so this is currently located in America so we need to show that American temperature let's let's be honest here celcius is for weirdos the very awesome thing of this frame of firmware I keep saying framework you can put in formulas in here so we can go ahead and put the translation to degrees Fahrenheit and then go update the label on our screen it's just amazing how simple this is they did an amazing job on this framework degrees F beautiful now we're ready to send some data to things speak let's go ahead and sign out I don't really validate which is nice so in things peak we create a channel that's why did really quick there I clicked new channel button let's give it a name and for whatever reason field one always comes over blank so we're going to do these three or temp humidity pressure but save it go to API keys and this is what we're looking for back to our ESP easy config and that's where protocol here is what we wants on the data to generic HTTP is also really cool so we want things speak we're going to use a host name the page kind of reloads so API that thing speak comm put in our API key that's right API dot singing speak calm I'm gonna copy and paste did I messed up no great let's dial down our frequency here just for the demo purposes to make it six a reasonable number screen is now showing degrees Fahrenheit by the by very cool and if we go to our private view look at that we already have a data point coming through how awesome is that not quite 15 minutes could have been 15 minutes but I think we did pretty good here and there's another data point so for 15 bucks and if you got 15 minutes you can throw together one of these amazingly powerful esp8266 devices with a BM e 280 Bosch sensor thanks for watching
Info
Channel: FirstName LastName
Views: 135,222
Rating: undefined out of 5
Keywords:
Id: 07XukAPV20E
Channel Id: undefined
Length: 24min 9sec (1449 seconds)
Published: Thu Sep 15 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.