ESP8266 Part1 WiFi Basics, AT Commands, Wiring & 'TRAPS'

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to another video so today Saturday 23:59 in the evening and I'm doing this video because could I'll get this thing to work now I couldn't fell into a trap so I thought I'll do this video and show you what I was doing wrong so you may not have seen these these are a Wi-Fi module this is a flash EEPROM this is a 32-bit microcontroller this controls all the Wi-Fi functions so all you have to do is put in a cup of 80 commands get yourself connected to your router and to the internet there's a little red LED up here right the blue LED here and there's a lot of Miss information on the internet which didn't help I tried to test my nonno UART terminal which I'll show you and I was just getting an echo back nothing seemed to work so there is no good trying to plug it into a microcontroller trying to get it connected to the internet if I can't test the simple functions now this device draws approximately a couple of hundred milliamps so 200 milliamps when it's running and connected to a computer you probably seen my TTL 2 USB converter now although more converter did run this module I understand the actual converter chip on the board I'll show the circuit drawing it's only meant to supply sort of 20 milliamps and this draws 200 so I've I've got another one of these running and I've got the power coming from a battery pack with a 3.3 volt regulator and then the standard UART transmit/receive pins are connected to the device that's my TTL to USB converter and this particular models got a jumper on it so the output power is either 3.3 or 5 volts and as I say this did run this Wi-Fi module but then I looked at the spec of this and it's rated for between 8 and 20 milliamps this is my expressive Wi-Fi module connected and powered up I'll get various lead and I'll show you on the draw what I'm doing with them I've got to slowly it's connected to the transmitted and received lights and I'll show you why it took me over a day to get this running that's just gone midnight now but Sunday 27 to feb 15 one of these Wi-Fi modules this system currently picks up the time from an MSF receiver which is actually in an upstairs bedroom and I have two Bluetooth modules one picks up the time from the clock upstairs which picks up the time from the MSF receiver so that's transmitted down here and this picks up the time and then this other all is picking up solar panel car now you might have seen my video on these you simply connect them to the TTL the USB converter go to the UART terminal in microelectronic ER for example run a cup of checks and then run it to your program try this with the microelectronic ER software and just echoed what i send to it so for confirmation this is the TTL to USB converter chip I'm using it cost about a dollar or two from Jonah it's the prolific I see a 5 flick to page 20 here is one other tables I saw 20 million somewhere else but this particular bait driving capability typical 8 MIDI amps and as I say these Wi-Fi modules I meant to draw in excess of 200 milliamps so or so I'm not running a Wi-Fi on my USB adapter so I've done a quick sketch of the Wi-Fi module so you can see you see esp8266 I've actually got the e^x but I understand they're all the same so the pins if we do the simple ones first sonal volts here power supply over here 3.3 volts this corner you also connect that to the CHP deep in which is this one here so that has to be permanently fed with 3.3 volts now I got worried because my TTL 2 USB adapter was actually putting out three point four volts and this board does get warm so I thought over three point four volts are blown it up but now I haven't I looked at the spec on these chips this one can go up to three point six volts but I would recommend keep it down to three point three it already gets warm running at 3.3 volts so any more than three point six you'll blow it up so four volts three point three supply can it let permanently fat pin this is the transmitted pin over here in this corner and you connect let your rx pin on your TTL to USB converter this is the receive pin so you can take that to your TX on the converter this pin here is a reset and this pin is the GPIO zero I've measured these pins with a meter this has got a weak pull-up a very weak pull-up putting your multimeter on the ground and here is enough to actually reset it but after resetting it comes back up to 3.3 volts so you don't need any connection to here you don't need any connection to here on this GPIO this also has a pull-up this is GPIO 2 or GPIO 1 that's not really used in the normal application and this GPIO 0 if you actually want to flash this firmware put the later firmware or different firmware on it you have to connect this to ground so you connect these two together while your flash isn't the chip this reset is negative low so that means when it's not connected to anything it's 3.0 evolves you have to ground this reset to reset the device but now I've actually got mine going you can actually reset the device in software so hopefully that makes sense so what I'm going to try and do is explain why it took me a day to get this going so I'm not unfamiliar with 80 commands or you may know if you see my video I've worked with these Bluetooth modules you simply connect their TX and rx to their TTL converter 3.3 volts and communicate with 80 commands and you can set the address and pin that sort of stuff so I did the same with this and I'll show you what happened so in case you're new to block electronica on all their compilers just open the compiler after tools and then down to UART terminal let's I hope you use this hundreds of times before so because I've already used this today it's defaulting to come through up here I've already set it to 9600 baud rate one stop bit numb that defaults to those values I've got carriage return line feed if I connect so like the Bluetooth module you type in 80 to get a response on the module so I'm now connected to the Wi-Fi model so type in 80 that's what I've typed and the module responded with 80 and that's it it's been doing that for 12 hours send it again send it again no matter what I do kept them repeating 80 like echo kept them echoing what I was sending so there's a command on the Wi-Fi module and you can turn the echo on and off but no matter what I did it's still echoed what I've sent I just could not get this terminal to work I saw some information about moderate wagwan carriage return and line feed there the hexadecimal values for those functions so assumed they were being transmitted I then try and reset the module is 80-plus is case-sensitive so it's got to be capitals so 80-plus rst should reset the module so if I clear this clear that and then transmit this send let's just echoed that back that it was running around for a day so this will reset the device in software so while it's connected of disconnect one of the batteries which will manually reset it so for clear these screens so I won't reset anything up here I'll just disconnect the battery and that's what I got so well it's working I've just rican it to the power supply and it's coming back on so vendor wwa I think accom version zero nine to four abort two of these modules Thursday who are delivered by Friday afternoon because I couldn't get a response using the eighty I actually flashed the device upgraded the firmware or certainly change the pheromone so I'm not sure what firmware these had but needless to say when reconnecting the battery this comes up go ready although well it's really now so type in eighty send and it still echoes the eighty command so I searched hundreds of web pages and look on YouTube couldn't find any definitive answers or this was happening so this is what I'm doing a video well I have actually found this page on the internet so they are called electro dragon calm and their /w and then the esp8266 module found most of the information here that are needed if I scroll down if you scroll down the page you can find the eighty instruction set for the commands various examples or pin definition this is a what should be high and what shouldn't be high but if you look at myself you're on this a bit easier and then down near the bottom expressive have got their own firmware source update us bulletin board but they give you some software here and there's another piece of software here on github so this node MCU it's converting the Wi-Fi module and actually programming the flash to make the Wi-Fi module into like a standalone server so you would need just power to this and access this via a search engine you get this to switch a port on and off that sort of stuff but what I'm interested in is keeping this standard so you want this software there's hundreds and hundreds of pages out there so you want to start just copying software go to this node into you other people have set these devices up to ten things on and off via the internet I just wanted to get the original firmware back so I clicked on this link here then in these two folders this has a tea bin files so they've been files are where the software resides so if you click on the old I'm not sure about this one that's the page that this changed the view over here it's a list view so if you look at mmediately you can see two bin files solver I believe this is a newer one 21st to gem this year presumably I tried this but I've gone back to this this is the flasher program the piece of software that will update your firmware flash your device so you need this and you need this bin file so you download those save them to the folder and your way so what I also found on the internet this terminal the version 1.9 3b and it's abbreviated but by we are at what US plus wherever that is so if I open the about I strongly recommend you have a look at this guy software that's the address I might be able to put a link at the bottom of the video now he supplies this terminal free of charge but obviously like most other software you're allowed to make donations so I did and there's proof that's a clip of the information copied from the paper receipt so I made my donation to this guy but because this software takes up the whole screen it might be difficult for you to see some of the items so well zoom you in down to the bottom first so remembering the software after the 80 command wants a carriage return and line feed to tick this box here over on the right it's a bit small but I can't do anything just in this corner so tick this box so plus carriage return so whatever you type in here this is what's being sent while the rs-232 USB converter so you can see I've got an 80 they're ready and again because I've used this software today it's defaulted to come free your PC might be different so connect up here I've got nine six baud rate data bits eight parity bits non-stop it's warm and shaking none so just you can leave all these alone leave them at the default value so connect up the top left so now if I type in 80 here click send there are 80 ok so then the next simple command 80 plus r st hit Send so that's just reset the device using the software so now let's out Armando a winner so day later I've now got some results so looking at the table of contents the datasheet for this device scroll down and it gives you some basics just at the top here so now let's look at my software revision so 80 plus G M R I T plus G M R it's end so you can see that's what I've sent and that's the software revision so that's the basics now let's say let's tie pins 80 plus CW mode equals three but this CW mode equals three is the motive a level one two or three one sets the device up as a station to set it up as an access point and three does access point and the station so now we've initialized this device as an access point and station we can now do some more it's a five type in CW and then list access points so L ap click I'll clear this first so click send what that's what I've typed in a t + CW list access points and these are the available access points this is all the Wi-Fi around this area so some nearby with sky this is actually mine I've got a BT Home Hub for that someone near voice got a BT Home Hub - as you should get on the beauty you get this renewed in the Wi-Fi phone and open zone and that form mer they're actually the free Wi-Fi for BT uses someone stopped outside the house they could pick up my Wi-Fi and then someone else they have at home up to and that's it so that's the available Wi-Fi access points and there they MAC addresses so that's it I'm up and running next thing for me to do is start typing some of these codes into a microcontroller and get more in microcontroller to control this Wi-Fi they're not and connect to the internet and start doing something more positive well so now you've seen some of the basics I wanted to know why this program that I did donating and I hopefully some of you will too or I did this program work a more electronic this program did not so I set my scope up on the TX and rx pin I'm using my trusty keysight technologies nope it's MSO and Co decode enabled I've got one time trigger looking for this PT command others then there we are sir 80 CR so carriage return line feed so this program sending those two items in the 80 you saw I'll get the response back from the Wi-Fi module so why didn't the microelectronic ascend it so I'll disconnect this count terminal and reopen the microelectronic a terminal so if I clear this well so now I'm on the microelectronic return or and I'll now send the 80 and bit bizarre but so I've got the a there but where's the T so if I close a time base up a small bit so call the time base on one release happened I'll close this up let's go 50 milliseconds capture it again what's in the eighty again right now you can see that the a is there with T is there massive gap in the middle was a 2 milliseconds of division 2 4 6 8 10 12 14 milliseconds only Mike electronically I can tell me why the a is separated from the T by that much but if I close this up there's no other characters no carriage return line feed so back to the microelectronic or software so you can see I checked this box carriage return line feed sent the 80 and it just came back 80 echoes everything else end so I'll keep on filling 80 that's what kept happening so knowing the other program worked and knowing my Wi-Fi module does work I thought like a play about with this program find out why it's not working to see if I can get it to work but support ASCII up here still nothing so look I you to E Plus as a reset just echoes everything back so yeah there clear there and nothing so now I thought so send is tiding I know I don't want the sender's typing but what is append new line try that send write it this time let's come up error to ignore the error plus end that again hello we've got something happening so Cynthia the second time says 80-plus reset okay give me the software version and it says ready so now if I type in a T and it's now working on this terminal so if using microelectronic this terminal that append new line isn't ticked it will cost you a day on this Wi-Fi module so now this is maybe a bit easier to see because it's not over the whole screen for clear this clear this it's a tea bus so now we've reset it we want the mode again so CW mode equals three send hopefully you can see this coming up also it says no change so we were already in that mode so CW list access points la P this is a bit slower I think that's the buffer in this software and with this software you could actually set up a text file on your hard drive and have it append this file and add a time if you want but now all of sudden I've got a Wi-Fi hotspots or Wi-Fi access points and a MAC addresses so this was working all the time I just didn't have the append new line there checked that cost me a day but I learnt a lot of the software trying to get it to go so the only other thing I want to add about this program so far clear this clear this so I'll send the 80 again no we know is working well let's have a look at that on the scope send 80 expand this out we've got the a but no T scroll along R up the 5 10 15 20 milliseconds there's the tea and another 20 milliseconds is the carriage return and not quite 20 milliseconds or as this so whether you use the mock electronica terminal for this terminal here which seems very responsive I think it's more comprehensive but and it's free so it's up to you either give this software dry or use more electronica software you can now see both are working so it's up to you which termly use but make sure you've got the carriage return line feed running yeah I'll get this cynic of this guy looking have located software is free to download it through to you but you should really make a donation can't take everything for nothing you've paid bug oil for your Wi-Fi turn also give this guy some money for his help so if you've been struggling with the basics as I had hopefully this demo who will have helped thank you for watching you
Info
Channel: John B
Views: 100,963
Rating: undefined out of 5
Keywords: Wi-Fi (Invention), wifi, ESP8266, wifi module, wifi module wiring, uart terminal, MikroC, ttl to usb, AT Commands, tutorial, internet of things, putty, Pic16F, Pic18F, Pic32, uC, electronics
Id: trWT7VDBEyg
Channel Id: undefined
Length: 26min 54sec (1614 seconds)
Published: Sun Feb 22 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.