IOT security system | IOT based Home Alarm system Programming

IOT Security System


IoT Security System-Using the Nodemcu ESP8266 Wifi unit, PIR Sensor, Infrared Sensor, and Blynk software, you can learn how to make your  own IoT based home/office security system. Every time a warning message is sent to the blynk application When the intruder is identified.

In this post, we will cover

  1. Complete circuit diagram and explanation
  2. Interfacing
  3. Nodemcu Programming and finally
  4. Testing

Let’s continue without any further delay!!!

The Amazon purchase links are given below:

Nodemcu esp8266 wifi module: Best price
LM7805 Voltage Regulator:
PIR Sensor best package:
IR infrared Sensor best package:

Arduino Uno:
Mega 2560:
lm7805 Voltage Regulator:
330-ohm resistors pack:
female DC power jack socket:
470uf capacitors:
5×7 cm Vero board:
female headers:
connection wires:
Super Starter kit for Beginners:
Jumper Wires:
Bread Board:
12v Adaptor:
PCB plate:
Variable Supply:
Digital Multimeter:
Vero Board / stripboard:
Soldering iron kit: “best” You guys should definitely purchase this:
Solder wire:
Wire Stripper:
PCB small portable drill machine:


Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Circuit Diagram:

IOT Security System

This scheme is built in version 9.1.0 of CadeSoft Eagle. 

Two power supplies are being used, as you can see in this project The left-hand power supply is used to power the Nodemcu ESP8266 wifi module while the right-hand power supply is used to power the PIR sensor.  As the PIR sensor module has a 3.3v voltage regulator, the voltage required to power up the PIR sensor is from 5 to 20 volts.So the Nodemcu system can’t power up the PIR Sensor module with 3.3 volts. That’s why use the PIR Sensor with separate 5v controlled power supply. All power supplies are essentially the same and can be powered by single 12v adapter.

J1 is the Female Power Jack and this is where we attach 12v converter, battery or solar panel. Two 470uf capacitors are attached to the input and output sides of the 7805 voltage regulator. 330 ohm resistor is connected to 2.5v LED series.This is an ongoing resistor restricting. The voltage regulator output is connected to the Nodemcu ESP8266 Wifi module’s Vin pin and the Nodemcu module ground is also connected to the power supply’s GND.

The IR Sensor’s out pin is connected to the infrared sensor’s digital pin D1, VCC pin is connected to the Nodemcu module’s 3v pin while the GND is connected to the GND. The PIR Sensor’s VCC pin is connected to the controlled power supply output. The out pin attaches to the digital pin D0 and links the ground pin to the ground.

IOT Security System

This is the final board that is already discussed in my previous tutorial after soldering, PCB layout, online order placement, and soldering.

IOT Security System

This is the IR Sensor will be using in this project. All the pins are clearly marked with OUT, GND, and VCC as you can see. The white wire is connected to the IR sensor’s OUT pin and this is connected to the Nodemcu module’s digital pin D1,The brown wire is attached to the IR sensor ground pin and is connected to the Nodemcu unit board. The Red cable, the VCC wire, is attached to the Nodemcu module’s 3.3v socket.

IOT Security System

This is the detector for PIR. The left pin is the “Red Wire” VCC. The middle one is the “Yellow Wire” and the right pin is the “Black Wire” surface. I have started a very comprehensive PIR sensor tutorial. So you should look at that tutorial to explain everything for the basic understanding.

IOT Security System


IOT Security System

As explained in the circuit diagram, all the components are interfaced. As you can see, this power supply’s output is connected to the PIR Sensor’s VCC pin, while the out pin is connected to the D0 and the input is connected to the ground.

The IR Sensor’s red wire is connected to the Nodemcu module’s 3.3v pin, the brown wire is connected to the ground while the IR sensor’s out pin is connected to the Nodemcu module’s D1 pin. Another thing is to make sure that you connect the 5v power supply ground with the Nodemcu Module ground. So the interfacing is all about that.

Blynk Application designing for IoT Security System:

  • Tap on the new project and type the project name as an IoT security system … 
  • Tap on the computer you have selected and pick Nodemcu … 
    Make sure you set the form of WIFI connection 
  • Finally, click the Create button to send an authentication token to your email ID, which is then used in the programming process. Just copy it and paste it into the programming…
  • Now click on the screen and search for the LED…
  • Click on the screen again and add another LED…
  • Click on the screen again and this time search for the terminal widget and add it…
  • Finally, add notification widget … 
  • Click the first LED to set the name and select the virtual pin V2 … 
  • Now click the 2nd LED to set the name and select the virtual pin V3 … 
  • Finally, click the terminal widget, set the name and select the virtual pin V4 … 
  • Set to add new line to yes and input line to off … 
  • so that’s all about designing the application.

IoT Security System Programming “Nodemcu”:

Watch Video Tutorial

Recommended For You

Leave a Reply

%d bloggers like this: