So for this project you will need an esp8266 board. Four channel relay module breadboard and some wires now follow this circuit diagram. If you are using this off the shelf components: Music, Music, foreign – as i have my own home automation pcbs, so i will not be using this breadboard connections. So here is my pcb so to make this first. I have designed this pcb on egda and then i have downloaded the gerber file of this pcb to order this pcb, i am visiting jlcpcb.com, who is also the sponsor of this project Music so over here. First, we will sign in with our id and then well upload the giver file after uploading. The file well select the quantity and the color of our pcbs and straight away place the order. So after placing the order, i quickly received my pcb in 7 days. So first i arranged all the components over this pcb and start the soldering process Music. So after soldering i am connecting my nodemcu board Music. So after connecting the esp8266 board, well connect it with our computer Music, now search for arduino, iot cloud open. This first link. Create.Arduino.Cc and it will ask you to sign in first ive used my google id to sign in over here and now. Well, click on create thing Music, so on this dashboard first well, rename this thing so im giving something like smart home automation or we can say smart home now – well add the device, so click on device and as we are using esp8266 node mcu board so well Set up a third party device, well select it and over here well select nodemcu 12e, module, Music and well click on continue here.

Well, add the device name so im giving esp8266 Music smart home then well proceed here. They will provide your device id and secret key. So kindly note this keys, so it will be required in the later part of the video. So i am pasting each and everything in my notepad. So after saving this credentials will check this checkbox and click on continue. So after this congratulations, you are all set. Well, click on done and now well set variables, so we click on add variable will give the name switch. One then well select the variable type as boolean. It will be in the basic types and then select the boolean and it will create a declaration. Boolean switch 1 and then well add this variable similarly well create two more variables for switch 2 and switch 3, so same process, click on add variable and give the name select the basic types boolean and add button. So, after adding all the three variables now well proceed further to network configurations in this network configurations, you have to enter your wi fi name, that is the ssid, enter the wi fi password and enter the secret key, which we noted before now. All these credentials will be added in our code automatically. So after doing the network configurations, click on sketch button, so here is our code generated in this code. Well need to add some pin definitions for our relays, so im using d0 d1 and d2 pin and im setting it as an output pin for our relay.

So i will add all these three lines in the word setup loop then well go to void loop and in this function well add lines to turn on and off the relay when switch is turned on so well write if switch, one is turned on then well Set digital write d0 to hive else: digital write, d0 to low so now well copy this same block and paste it in other switches as well, and well change the pin number and the switch name. So after adding these lines in all the functions, our code is ready to upload, so we can directly upload this code from this web. Only so for this you will need one application that is arduino create agent, so i have already installed it so well open the full editor. So over this we need to select uh the board and the port in this drop down list. So its already selected for me, as ive, already used this before and just hit the upload button as we do in the arduino application and the code will be uploaded so after successfully uploading. The code well create our dashboard, so go in the dashboard menu. And here click on build dashboard, then over here you will find an add button, click on it and go to things, tab and select our thing that is smartphone and create widgets. So this will automatically click create all the variables which we added. That is which one switch to switch 3 and well also rename this.

If you want you can manually, add these switches as well, so now well connect our ac appliances to this relay modules. So this is a bulk connection, so cut one of the end of the bulk circuit and connect those two pins in our relay be very careful while doing this, as we are using very high voltage over this part of the circuit board. So similarly, i have connected three bulbs and our system is ready to be tested. If you want to control this project from your smartphone, just download this arduino iot cloud, remote and sign in with the same account which we used before and here you will find your thing – that is smart home and all the widgets will be appeared over here. So, as you can see, three switches are available on my smartphone, as well as on my laptop, and all the devices are synchronized. If you click switch on your smartphone, it will be reflected on your web link as well, and vice versa. So in this way you can control your appliances with arduino iot cloud system.

https://www.youtube.com/watch?v=yJ6_xiIBsv8