Professional Documents
Culture Documents
How To Make A Home Security System Using Nodemcu ESP8266 and Blynk App
How To Make A Home Security System Using Nodemcu ESP8266 and Blynk App
How To Make A Home Security System Using Nodemcu ESP8266 and Blynk App
0
How to make a home security system using Nodemcu ESP8266 and Blynk app
Hello, welcome back to another tutorial from the SriTu Hobby. In this tutorial, we will learn how to make a
home security system using the Nodemcu ESP8266 board and the Blynk application. Also, the PIR sensor is
mainly used for this project. We have done this project using the Telegram app in a previous article. You
can study it from this link. Also, this project can be used for our home, place of business, shops. So this
tutorial will cover how to make this project at a low cost. Keep reading.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 1/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
ESP8266 NodeMCU Web Server Using Arduino IDE: Control components from your M…
CrowdStrike® Open
When this security system is powered on, The Nodemcu board connects to the Blynk cloud via the internet.
Then we can turn ON and OFF this system using the button on the interface set up in the Blynk app. After,
when a motion is captured by the PIR sensor, the buzzer and the red LED are activated. Then, the mobile
x
phone also receives a push notification via the Blynk app. Afterward. this system will return to normal after
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 2/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
a short time. Also, this time can be changed by the preset in the PIR sensor. The green LED bulb turns ON
when the system is operating normally.
OK, let’s do this project step by step. The required components are given below.
Step 1
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 3/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
PIR sensor
LED bulb x 2
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 4/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
180-ohm resistor x 2
5v buzzer
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 5/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Jumper wires
Foamboard
Step 2
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 6/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Ads by
Stop seeing this ad Why this ad?
Ads by
Stop seeing this ad Why this ad?
Step 3 x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 7/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Thirdly, solder the jumper wires for the buzzer and LEDs.
Ads by
Stop seeing this ad Why this ad?
AltiFi Open
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 8/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 4
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 9/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Next, connect all the components to the Nodemcu board. To do this, use the circuit diagram below.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 10/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 11/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 5
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 12/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Then, adjust a 1.5 x 3.5-inch piece to fit the Nodemcu board and glue it on.
Step 6
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 13/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Next, set a 2.5 x 3.5-inch piece to fit the PIR sensor and the two LEDs.After, glue them.
Open
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 14/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 15/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 7
Then, take a 1.5 x 3.5-inch piece and adjust it to fit the buzzer. After, glue it on.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 16/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 8
Now, connect the piece that holds the Nodemcu board to the 3.5 x 2.5-inch piece.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 17/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 9
Then, glue the 1.5 x 2.5-inch piece to the base foam board piece. Also, glue the buzzer-connected piece to
the base piece.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 18/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 19/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 10
Next, glue the 1.5 x 2.5-inch piece to the main foam board piece. Also, glue the PIR sensor attachment
piece to the top as follows.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 20/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 11
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 21/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
First, download and install the Blynk app from your mobile phone. Then, sign up for this app using your
Gmail. Next, click the new project button.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 22/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Then, enter the project name as you like. Also, select the device and connection type. After. Click the
“Confirm” button.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 23/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Now, we can see the project interface. Then, click the “+” icon and add one button and notification widget.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 24/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 25/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 26/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 27/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 28/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Then, click the button and enter the name of your choice. Next, change the pin to A0 and the mode as the
switch. Afterward, click the Notification Widget and change the priority to HIGH.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 29/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 30/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Open
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 31/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 12
OK, the Blynk app is ready. Now, connect this project to the computer. After that, let’s create the program for
this project. It is as follows.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 32/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Code Explanation
Secondly, enter your Blynk app token and WIFI connection details.
char auth[] = “BMFz-z1357p65VVCAcsWTPfg_K-Jcuwj”;
char ssid[] = “Dialog 4G 025”;
char pass[] = “12345”;
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 34/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
In the void setup, the LEDs, buzzer and sensor pins are set as output. Also, the Blynk library starts using the
Auth token, WIFI name, and WIFI password. Later, the notification function is called. The notification
function is described below.
void setup() {
Serial.begin(9600);
pinMode(D0, OUTPUT);
pinMode(D1, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D6, INPUT);
void notifiaction() {
First, values are obtained from the PIR sensor and these values are entered into the boolean variable. Also,
these values are printed on the serial monitor
bool sensor = digitalRead(D3);
Serial.println(sensor);
If the Blynk app button value is 1, the system is activated. Also, it is printed on the serial monitor.
if (pinValue == 1) {
Serial.println(“System is ON”);
Then, PIR sensor values are checked using the IF condition. If the value is 1, a push notification is sent to
your phone and the red LED and buzzer are activated. x
if (sensor == 1) {
Blynk.notify(“WARNING! Please check your security system”);
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 35/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, LOW);
If the Blink application button value is 0, the system deactivates. Also, it is printed on the serial monitor.
} else if (pinValue == 0) {
Serial.println(“System is OFF”);
}
}
In the loop function, the blink library and timer are activated.
void loop() {
Blynk.run();
timer.run();
}
Step 13
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 36/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
OK, now select the board and port. Then, upload this code to the Nodemcu board.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 37/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Step 14
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 38/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Now, run the Blynk app interface and enjoy this project. The full video guide is given below. So, we will meet
in the next tutorial.
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 39/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
How to make a home security system using Nodemcu ESP8266 and Blynk app
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 40/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Related Posts
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 41/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Leave a Comment
x
Your email address will not be published. Required fields are marked *
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 42/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Type here..
Name*
Email*
Website
Save my name, email, and website in this browser for the next time I comment.
Post Comment »
Search
Search
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 43/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
report this ad
Home
Arduino
Arduino Tutorials
Arduino Projects
IoT
Nodemcu ESP8266
ESP32
Electronic
Raspberry Pi
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 44/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Products
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 45/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Arduino obstacle avoiding + voice control + Bluetooth control Robot | DIY Arduino Robot
GenSwin
Halloween...
$14.99
Shop now
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 46/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
ELEGOO UNO
R3 Project...
$79.99
Shop now
SriTu Hobby
Create your dream electronic hobby project step by step with SriTu Hobby - the world's No. 1 hobby electronic
website. Get access to tutorials, and products for beginners and experienced hobbyists
Links
Privacy Policy
Disclaimer
Terms And Conditions
Contact Us
Refund and Returns Policy
Shipping
Read
Read
Arduino
Arduino Tutorials
Arduino Projects
IoT
Nodemcu ESP8266
ESP32
Raspberry Pi
Electronic
x
Buy
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 47/48
3/27/23, 9:00 AM How to make a home security system using Nodemcu ESP8266 and Blynk app - SriTu Hobby
Development Boards
Displays
Modules
Motors
Related components
Semiconductors
Sensors
x
https://srituhobby.com/how-to-make-a-home-security-system-using-nodemcu-esp8266-and-blynk-app/ 48/48