Runo:- Security Motion Detector

 

Hello everyone,

I am Amey, welcome to my channel.

Today, I am building a Project based on IOT, which is Simple security motion detector using PIR sensor and ESP-01 WIFI Module.

This project is quite helpful to detect motion outside your house you can implement it outside window or front door/back door and turn it ON when you are outside of your home.

So, lets' make it


COMPONENTS

1 x Arduino UNO (any Arduino)

1 x ESP-01(or any WIFI module)

1 x PIR Sensor (Can use more)

1 x 9v/12v power supply



WORKING 

Now days security is important, So I made a simple motion detector which can detect the motion outside or inside your home it is cheap and use to build.

As it is using PIR sensor which is proximity Infra-red sensor, it can detect motion up to 10 meter in his circumference and its really cheap.

As I am using ESP-01 WIFI module so it connected to the cloud by Blynk (it is an open source IOT platform for small Diy project go to this link for more about the blynk)

So, as it connected to cloud you can access it from around the globe.

Working is simple, As PIR sensor detect motion it send signal to your Blynk app through cloud (Internet connection is required at ESP-01 WIFI module side) and you get notification (if your internet is ON) “someone outside!!!!!!!!” it can be modified which is given in coding part.


Setting Up Blynk and Esp-01





Install Blynk App and follow the instruction given in the images above

In Blynk app create new project and Select Arduino and WIFI

Then you get a AUTH token At registered Gmail address simple put in code and Add your wifi credentials

and upload it to Arduino

(you will need Blynk library for this project all files and library is given in files section down bellow)


CODE


#define BLYNK_PRINT Serial

#include <ESP8266_Lib.h>

#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "Auth token ";

// Your WiFi credentials.

// Set password to "" for open networks.

char ssid[] = "wifi_name";

char pass[] = "pass_word";


// Hardware Serial on Mega, Leonardo, Micro...

//#define EspSerial Serial1


// or Software Serial on Uno, Nano...

#include <SoftwareSerial.h>

SoftwareSerial EspSerial(3, 2 ); // RX, TX


// Your ESP8266 baud rate:

#define ESP8266_BAUD 9600


ESP8266 wifi(&EspSerial);


int sensorPin = 8;   // Input pin for the Flame Sensor

int sensorValue = 0;  // Variable to store the value coming from the flame sensor


void setup()

{

  // Debug console

  Serial.begin(9600);

  delay(10);

  // Set ESP8266 baud rate

  EspSerial.begin(ESP8266_BAUD);

  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);

}

void loop()

{

  Blynk.run();

  sensorValue = digitalRead(sensorPin);

  if (sensorValue == HIGH) {

    //Notification Broad cast you can chnage it.

  Blynk.notify("SomeOne Outside!!!!!!!!!");

  } 

}

Files

1) Blynk Library (click on the text)

How to install library :- http://help.blynk.cc/getting-started-library-auth-token-code-examples/how-to-install-blynk-library-for-arduino


Video link!!!!

This video link. 

My Channel link.






Comments