IoT Home Automation using Blynk & NodeMCU ESP8266
IoT Home Automation using Blynk & NodeMCU ESP8266.
About;
My name is Abel Mathews. I am a high school student.
I like to make electronics and robotics project.
Pleace support my project.
Overview: Home Automation using Blynk & ESP8266;
In this project we learn how to make IoT Based Home Automation Project using Blynk & NodeMCU ESP8266. One of the most common & popular hobby projects you will come across the internet is Smart Home Automation Project. By Home Automation we mean controlling lighting, climate, entertainment systems, and appliances without a manual switch. It may also include home security such as access control and alarm systems. When connected with the Internet, home devices are an important constituent of the Internet of Things (“IoT”).
In this Home Automation System, we will control 4 home appliances as Tv, Fan, Bulb, Motor, Refrigerator connected to Relay using Blynk Application. The Wifi Module NodeMCU ESP8266 will Receive commands from the smartphone wirelessly through the internet. To encode the ON/OFF signal and send it to Server and to ESP8266 Board we need the best IoT Platform. So we chose Blynk as no other application can be better than this one. This project requires internet connectivity & can’t work without Internet connection.
Bill of Materials
Following are the components required for making this project. All the components can be easily purchased from Amazon. The component purchase link is given below.
Circuit Diagram & Connection
The circuit diagram for Blynk Controlled Home Automation using ESP8266 is given below. Using this circuit diagram you can assemble the circuit on Breadboard using 4 channel Relay and NodeMCU Board.
Home Automation PCB & Gerber File
If you don’t want to assemble the circuit on breadboard and you want PCB for the project, then here is the PCB for you. The PCB Board for the Home Automation Project is designed using EasyEDA online Circuit Schematics & PCB designing tool. The front side and back side of the PCB is given below
.
The Gerber File for the PCB Board is given below. You can simply download the Gerber File for the project.
Setting up Blynk Application
Now let’s learn about the Blynk Application. In this project, all the control is done by the Blynk Application. Blynk is a Platform with IOS and Android apps to control Arduino, Raspberry Pi, and the likes over the Internet. It’s a digital dashboard where you can build a graphic interface for your project by simply dragging and dropping widgets.
You can download the Blynk Application from Playstore if you an Android User. You can also install the Blynk Application on IOS from App Store.
Now lets setup the Blynk App for IoT Home Automation Project. First, open the application and create a new account using your Email ID. Then click on “New Project“.
Now you can follow the images below for the complete setup guide.
From above when you click on “Email All”, an authentication token will be sent to your mail address. This token is very important as it is required in the program/code. So open your email ID & check for the token.
Source Code/Program
Here is a Blynk Based Home Automation Code, you can copy the code and paste it in your Arduino IDE. But before that, you need to add Blynk Library to Arduino IDE.
char auth[] = "pGE7Rb1n3v2SOd9CZvY6RlkeKItyalUR"; char ssid[] = "*****************"; char pass[] = "*****************";
Now you can upload the code to the NodeMCU Board.
#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[] = "pGE7Rb1n3v2SOd9CZvY6RlkeKItyalUR"; // Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "*****************"; char pass[] = "*****************"; int relay1 = 12; // D6 pin int relay2 = 14; // D2 pin int relay3 = 4; // D1 pin int relay4 = 5; // D5 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(); }
IoT Home Automation using Blynk & NodeMCU ESP8266
After uploading the code successfully to the NodeMCU Board, you can start controlling the Home Appliances using the Blynk App. All you need is to click on ON/OFF Button on Android App.
Thankyou.
- Comments(4)
- Likes(5)