Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

IOMP LAB - Project Report

Roll Number: 16241A0412

Project: IOT Home Security

Components Required:

 NodeMcu
 Ultrasonic Sensor
 Buzzer
 Jumper Wires
 PCB
 5V charger
 100uF-2
 Regulator

Software used:

 Ardunio IDE

Application used:

 Blynk App.

Explanation:

This project uses an electronic device( Ultrasonic Sensor ) that can detect the human activity
and switch on the buzzer to alert the user. The system will also be connected to the internet
and can send the data to the cloud spontaneously and notifies the user with the mobile
application. The main intention to develop this project to provide a security to the house.

Connections:

NodeMcu D1 connected to Trig pin of ultrasonic sensor .

NodeMcu D2 connected to Echo pin of ultrasonic sensor .

NodeMcu Gnd connected to Gnd of ultrasonic sensor .

PCB 5V supply connected to VCC pin of ultrasonic sensor .

NodeMcu 3.3V pin connected to VCC pin of Buzzer .

NodeMcu D3 connected to I/O pin of Buzzer .

NodeMcu Gnd connected to Gnd pin of Buzzer .

Capacitors and Regulator are connected to PCB .


IOMP LAB - Project Report
PCB:

Schematic:
IOMP LAB - Project Report
APP (BLYNK):

Program:
#define BLYNK_PRINT Serial

#include <SoftwareSerial.h>

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#define TRIGGERPIN D4

#define ECHOPIN D5

#define buzzPin D6

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

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

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx";


IOMP LAB - Project Report
// Your WiFi credentials.

// Set password to "" for open networks.

char ssid[] = "xxxxxxxxxxxxxxxxxx";

char pass[] = "xxxxxxxxxxxxxxxxx";

WidgetLCD lcd(V1);

void setup()

// Debug console

Serial.begin(9600);

pinMode(TRIGGERPIN, OUTPUT);

pinMode(ECHOPIN, INPUT);

pinMode(buzzPin, OUTPUT);

Blynk.begin(auth, ssid, pass);

// You can also specify server:

//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8444);

//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8444);

lcd.clear(); //Use it to clear the LCD Widget

// Please use timed events when LCD printintg in void loop to avoid sending too many
commands

// It will cause a FLOOD Error, and connection will be dropped

}
IOMP LAB - Project Report

void loop()

lcd.clear();

long duration, distance;

digitalWrite(TRIGGERPIN, LOW);

delayMicroseconds(3);

digitalWrite(TRIGGERPIN, HIGH);

delayMicroseconds(12);

digitalWrite(TRIGGERPIN, LOW);

duration = pulseIn(ECHOPIN, HIGH);

distance = (duration/2) / 29.1;

if (distance <= 10) {

// Buzz

digitalWrite(buzzPin, HIGH);

lcd.print(4, 0, "Alert!!!"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print")

Blynk.notify("Alert! Someone has entered your house");

Blynk.email("pavanmuralimanohara@gmail.com", "Home Security", "Alert! Someone has


entered your house");

delay(2000);

} else {

// Don't buzz

digitalWrite(buzzPin, LOW);

lcd.print(0, 0, "Distance in cm"); // use: (position X: 0-15, position Y: 0-1, "Message you want
to print")
IOMP LAB - Project Report
}

Serial.print(distance);

Serial.println("Cm");

lcd.print(7, 1, distance);

Blynk.run();

delay(60);

THANK YOU

You might also like