Controlling Lights from Internet NODE MCU ESP8266 IOT

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we are going to make a internet control bulb not only bulb you can control any device like TV refrigerator AC from Internet so to do this thing what is the requirement you should need so first we will see hardware then we will go for software so first we will see the hardware you can see this is the node MCU board so this is Wi-Fi development board means it is having a Wi-Fi module where it can connect to the local Wi-Fi after connecting to the local Wi-Fi it will get some IP address so by using that IP address we can access this module from anywhere in the world and also we can control the devices connected to the counter to this module so we will see what are the things present in the module so you can see this is the ESP a to double six shield it is having a microcontroller so we can directly program this module by using Arduino not only already know we can use a lua script and some other programming languages so using ordinary is very simple so the operating voltage of this board is 5 volts so from this USB port you can program the microcontroller present in the this node MCU board it is having a 32 bit microcontroller where it can execute data faster and also it is having 4 MB of storage memory and 120 KB of RAM so also it is having a voltage regulator 5 volts regulator so that we can give higher amount of voltages to the board so coming to the input and output ports it is having some input/output pins where you can connect our sensors and some other appliances to the pins so you can see the names here we can see from B 0 to B 4 or the digital pins where you can connect the digital devices or digital sensors again we can see here's from these B 6 DC on dates so it is having it is having some digital pins and analog pin so here you can see the analog pin it is having only one analog pin so that we can connect only one analog device so it is also having the facility of I to see pulse width modulation etc SP a so now by using this Wi-Fi module we are going to control the bulb so how we can control the bulb we cannot directly connect bulb to the microcontroller because the operating voltage of the bulb is to the tables in the operating voltage of the microcontroller is this node MCU bodies 5 volts so to turn on this to the tables by using this microcontroller we should use a relay switch so it is acting the mid acting as mediator between bulb in the Wi-Fi development board so it is having some input side and output side at the output side we have to connect the bulb so it is a simple switch which can be activated by taking the pulse from the microcontroller so whenever you want to turn on the bulb simply send a signal from the microcontroller to turn on it similarly if you send some more signal the bulb will get turned off so how we are going to send the signals from this microcontroller to relay simply we will host a small server in the Wi-Fi development board after hosting it will get some IP address by using that IP address we can access from the mobile browser of our laptop or a mobile phone after opening that web page we are going to control this bulb by using two buttons on and off buttons so I am going to connect the bulb to the relay so how we can connect bulb to the relay so first you have to connect whites to the holder this is how you will get to whites this to whites are power supplies which should be connected to the AC mains of play so to connect the relay simply cut off the white one of the wire and insert these two whites at the output side of the relay here you can see three terminals one is common and normally-closed are normally open so this is always sorted so you how to connect these two wires to common and normally open so whenever this relay get a signal from the microcontroller automatically these two whites will get shorted and bulb will get turned on so now I am going to insert these two whites in the relay so next we will see the software part so the good future of this board is it can accept the program coming from ordinal so audio is very easy to program this Wi-Fi development board so first download and install the Audino it can be downloaded it can be downloaded freely from the internet and after downloading the Audino here you have to go to tools and you have to check for the boats here we are having different types of boats like ordinal you know odd in omega Adnan Leonardo but this is a node M so ordinal Minnie Arduino Ethernet so the name of this board is no Dame is you the rodents you is not mentioned in the board menu so the thing is we have to download them name download the core for this board and we can program them both by using by selecting that particular board in the mode menu so to download the ESP code if you download that yes speaker automatically you will get the node MCU name here so how to download the ESP curve simply go to Google and search for ESP core select the first one github after opening this scroll down here you will find one link so simply copy the link and paste it in the file preference additional board manager so click on ok then go to tools and go to board and board manager here here you will get the list of boots so search for es PA - double 6 from the search box so you have to download this core so it is of some 200 MB so download the latest version and install it in your audio software here I have already installed the ESP core so after installing you will get additional boats like this if you scroll down you will get the boats related to ESP a to double six here my node MCU board is there so I have to select this node MCU after that he will upload a small program to blink the LED connected to the node MCU board by default there is one LED that is connected to one of the digital pin so we will see the pin diagram here so this is the pin diagram of load MCU board so here you can see D 0 D 1 D 2 are the names of node MCU board but if you are using these pins in audio software you have to mention D for GPA to 4 B 4 and 0 for B 3 so these are the digital pin numbers so by default there is one LED which is connected to d 4 so in the ordinary in audios program you how to mention second digital pin so we will see a small program to blink the LED connected to the digital pin 4 d 4 so here two LEDs output now we are going to bring that LED which will turn on the LED and we will give some delay and we will turn off with some delay so now we are going to upload this program to the modem seaboard so for that purpose and how to connect we have to connect the board to the PC or laptop by using the USB cable this is how we have to connect so after connecting the board the PC will allocate a comm named comport to them know Dempsey you boot so to check the comport go to Device Manager and check whether the board is connected successfully or not so here when wrote MCU is connected with company if it is not showing simply download the drivers USB to Silicon driver and install the drivers and after try to connect the board then you will get the comm port so now I am going to upload this program to the nor MCU so check board has nor MCU 1.0 n port s comport file and simply click on upload it will take some time to upload to the Wi-Fi development board so the program is compelling here you can see the status uploading so it will take some 30 seconds to upload the program to the microcontroller or Wi-Fi development board now we can see the output the LED is blinking with one second of delay so the main purpose of using these bodies to connect the board with the internet so now we are going to scan the available Wi-Fi networks in this region for the purpose go to file and examples so here we have to select board as node MCU then you will get some examples here related to ESPN 2 double 6 go to ESP a to level 6 Wi-Fi and open Wi-Fi scan program so upload this program to the Wi-Fi development board that is node MCU then it will print the available Wi-Fi networks in the serial monitor so I am going to upload below before uploading the program you have to check the comport and also the board so click on upload we can work this we can work with this board using eighty comments so if you are using 80 comments the program will become complex so that is why here I am going to use the functions related to the SPI to double six Wi-Fi here you can see Wi-Fi dot mode by fader disconnect all are all of these functions are included in this header file now the program is going to upload once uploaded open the serial monitor and then you can find the different Wi-Fi networks so I am going to open the serial monitor here you can see so these are the Wi-Fi networks available in this region so by using some other function we can connect to the one of the Wi-Fi after connecting this board will get some IP address by using the IP address we are going to access this board from anywhere in the world so now our project is here to control this bulb using the node MCU so this is the program you can download this program from the below link so first you know how to give them name of your Wi-Fi are SSID here my name is Indian servers and the password so after that by using the Wi-Fi dot begin this board is going to connect with to the Wi-Fi if it is connected you will get my farad connected after that it will print the local IP of this board then we are going to run a small server HTTP server where the server is going to print some buttons on the browser of point so this is a HTML code so when we exude this XHTML code we will get two buttons on the web browser by using that buttons we will control this bulb so here I connected my bulb to 2nd pin what means second incense be for off nor MCU so to connect delay to the node MC but we have to use female to female jumper voice so here I am going to use d4 and it is connected to VCC and this is connected to ground so the operating voltage the input voltage of this delay is 5 volts so I am going to give 5 volts here you can see the three terminals this is a single channel delay in the same way you can find some 4 channel relay 2 channel relay by using poor channel relay we can control four devices VCC is connected to VCC and ground is connected to ground and input is connected to input now we will upload the program to node MCU after uploading the program we will check the serial monitor we will get one IP address so by using that IP address we will access this board open serial monitor so if you are not getting any data to the serial monitor QP simply click on reset here we can see the reset button we sit on the modem see you board so now you will get data like this connecting to the Wi-Fi if it is connected successfully you will get one IP address so this is the IP of this server now I am going to use this IP in my web browser and I will access the light by using the buttons on the webpage so here we got two buttons and also the status so when I click on turn off the LEDs our light is going to turned off similarly when I click on turn off the light will get activated this is how we can control the devices connected to the node MC board here I am using only one bulb by using the same webpage we can create different different buttons and also we can connect different different acts devices to them no density important we can come to all the devices at a time
Info
Channel: Indian Servers University
Views: 106,732
Rating: undefined out of 5
Keywords: Indian Servers University, Latest Technological Tutorials, Tutorials, IOT, Android, Arduino, Raspberry pi, cotrolling lights from website, controlling lights from internet, Internet of Things, home automation, IOT Porjects, IOT Tutorials, HOME Automation projects
Id: lWWsWGM3HS8
Channel Id: undefined
Length: 19min 12sec (1152 seconds)
Published: Thu Mar 30 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.