After successful Completion of this project, you would be able to control your home appliances such as Tv, Fan, Bulb, Motor, Refrigerator, and door lock e.t.c. with the help of your smartphone from anywhere in the world. Esp8266 a wifi Module plays a vital role in this IOT Based Home Automation Project.
An Esp8266 Module will Receive commands from your smartphone wirelessly through the internet. To Encode those commands in a smartphone and send it to ESP8266, for doing this job we need an application to perform this task. There are numerous Applications Available but we are going to choose the best one and that is “Blynk” this application is Available for both platforms such as iOs OR Android. You can create Creative Projects with the Help of Blynk APP. I would Strongly Recommend this Article to beginners :
Learning How to Use Esp8266 in Combination with Blynk App | IoT
This Project requires a streamless internet connectivity as we already know that IOT is totally dependent on Internet Connectivity. Everything is clearly defined in the video Tutorial and one thing more don’t hesitate to ask any question related to this Project. We are always available to answer your Questions.
Components Required:
- Esp8266 (NodeMcu) — Click Here To Buy This Module Online from Our Official Store
- 4-Channel Relay Module — Click Here To Buy This Module Online from Our Official Store
- DC-DC Adjustable Step-Down Module Power Supply —Click Here To Buy This Module Online from Our Official Store
- Jumper Wire —Click Here To Buy now from Our Official Online Store
- Soldering Iron — Click Here To Buy now from Our Official Online Store
- Smartphone ( iOS OR Android)
- Blynk App —- Click here To Download This App from Google Play Store
Schematic Diagram:
Connection Pinout :
- Connect ESP8266 (NodeMcu) GPIO D0 Pin To IN1 Of Relay 1 in Board
- Connect ESP8266 (NodeMcu) GPIO D1 Pin To IN2 Of Relay 2 in Board
- Connect ESP8266 (NodeMcu) GPIO D2 Pin To IN3 Of Relay 3 in Board
- Connect ESP8266 (NodeMcu) GPIO D3 Pin To IN4 Of Relay 4 in Board
- Connect Power Source to ESP8266 and Realy Board
Source Code:
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "7c9d873ab07c49cd8de99675f1dbff2d";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "pcnet-386";
char pass[] = "3rdbencher3c";
int relay1 = 16; //GPIO16 D0 pin
int relay2 = 5; //GPIO5 D1 pin
int relay3 = 4; //GPIO4 D2 pin
int relay4 = 0; //GPIO0 D3 pin
void setup()
{
// Debug console
Serial.begin(115200);
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
digitalWrite(relay1, HIGH);
digitalWrite(relay2, HIGH);
digitalWrite(relay3, HIGH);
digitalWrite(relay4, HIGH);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
}
Video Tutorial :
Link to be paste inside Arduino IDE ( File–> Preference—> Additional Board Manager URL ) —> http://arduino.esp8266.com/versions/2.4.1/package_esp8266com_index.json
5 comments
hola junto con saludarte podrias compartir el proyecto en formato pdf en español me interesa mucho
Ca marche pas:
exit status 1
ESP8266WiFi.h : No such file or directory ?????
How to add COM for NodeMCU ?
Hi Abid, Assalamu alaikum.
You have used D0 pin to drive the electrical appliance. Actually D0 becomes High at boot which means appliance will get ON at boot. Please explain.
well worked..thanks
Comments are closed.