Report Door Lock
Report Door Lock
on
OF THE DEGREE OF
BACHELOR OF TECHNOLOGY
JAN-MAY 2019
DHRUVA YADAV(1606962)
BHAVISHYA NIDHI(1606956)
i
GURU NANAK DEV ENGINEERING COLLEGE, LUDHIANA
CANDIDATE'S DECLARATION
I hereby certify that the work which is being presented in the Project entitled “DOOR LOCK
SECURITY SYSTEM” by “Avinash kumar, Dhruva yadav, Bhavishya nidhi ” in partial fulfilment
work carried out during a period from _________ to __________ . The matter presented in
this project has not been submitted by me or else in any other University/Institute for the award of
B.Tech Degree.
This is to certify that the above statement made by the candidate is correct to the best of my own
knowledge.
The Minor Project Viva-Voce Examination of______________ has been held on_____________
and accepted.
i
ABSTRACT
This project, is about programming on arduino IDE and burning it on NodeMCU. We have
worked on datasheet of NodeMCU almost as an engineer to the extent of our technical
capabilities. We have acquired a lot of knowledge about the microcontrollers, Arduino Board
and different components like , softwares (Arduino IDE),servo motor.
This project is the part of one of the most happening and common field of electronics i.e.
Embedded Systems and IOT and by integrating NodeMCU with BLYNK app we have
controlled servo motor to lock and unlock the door.Tasks involved in our project were:
Finally, fitting our servo in door lock latch has also given us insights about mechanical work
that can be sometimes dealt with while working in embedded system project.
3
ACKNOWLEDGEMENT
“It is not possible to prepare a project report without the assistance & encouragement of
other people. This one is certainly no exception.”
We would like to express our special thanks of gratitude to our project guide Prof. Harminder
Kaur as well as our HOD Ameeta Seehra , Project Head, Dr. Narwant Singh Grewal and
Principal Dr. Sehijpal Singh, who gave us the golden opportunity to do this wonderful project
on the topic” Door lock security system” , which also helped using doing a lot of Research
and we came to know about so many new things we are really thankful to them.
On the very outset of this report, we would like to extend our sincere & heartfelt obligation
towards all the personages who have helped us in this endeavor. Without their active
guidance, help, co-operation & encouragement, we would not have made headway in the
project..
We extend our gratitude to ECE department faculty of Guru Nanak Dev Engineering College
for their support to us.
Lastly we would also like to thank my parents and friends who helped me a lot in finalizing this
project within the limited time frame.
Any omission in this brief acknowledgement does not mean lack of gratitude.
Thanking You
4
LIST OF FIGURES
5
LIST OF TABLES
6
CONTENTS
Candidate’s Declaration ii
Abstract iii
Acknowledgement iv
List of Figures v
List of Tables vi
1.1 Overview 8
1.3 Applications 8
2.3 Methodology 10
3.3 Programming 16
References 20
7
CHAPTER 1
INTRODUCTION & PROJECT FORMULATION
1.1 Overview
a) Security is plying a vital role in our personal and professional life and with advent of IOT
everything is getting connected for more convenient way of living.
b) IOT is the new technology revolutinoising the world and this project represent the concept
of IOT. It is possible to transmit the data through the internet. We have wi-fi module to
connect to the internet.
c) We use NODE-MCU for the controlling operation of our door lock and it is controlled by
an app blink app.
Manual door lock: They have less compatibility with the comfort of society, as they can
only be unlocked from the very place it has been mounted.keys are additional liability to be
1.3 Applications
deadbolts are typically used for different buildings applications. The application is the type of
Low Cost
Easily programmable
8
Has mobility
Disadvantages
To be able to perform lock and unlock operations. As controlled by user the motor
To have mobility so that it could get lock and unlocked from around.
9
CHAPTER 2
PROJECT DESIGN
2.1 Project Functions.
. The main purpose of this system is to lock and unlock a door by a mobile phone and
matrix keypad, using a unique code entered through the matrix keypad and mobile phone.
Opening and closing of doors involves human to be physically involved in the task. The
authorized person can message the mobile phone stacked to the system which in turn is
connected to the door motor that can open/close the door. This method is very convenient
as one doesn’t have to get down of his door post to open the door physically. The cell phone
is set to understand the message been sent to it. For example, if I have a visitor waiting for
me at home and I am still in the office, I can open the door of my house from my office for
them by sending the authentic code and the door will be open automatically, I can do the
nodemcu
USB mini
Jumper wires
Servo Motor
2.3 Methodology
10
2.3.1 Basic Block Diagram:
Battery (4.8V)
SERV NODEMC
O U
BLYNK APP
NODEMCU:
the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12
module. The term "NodeMCU" by default refers to the firmware rather than the development
kits. The firmware uses the Lua scripting language. It is based on the eLua project, and built
on the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua-
Table-1:Specifications of NodeMCU
CPU ESP8266(LX106)
11
Memory 128kBytes
Storage 4MBytes
Power USB
Pins 3v3 is used for power,8 is used up by the Servo for signal.
We are using usb cable to power the nodemcu and it will power servo.
The app we are using is called BLYNK control available on play store for free. And each
0 – ‘V2’……BUTTON
90-‘V3’….BUTTON
0-180-‘V1’….SLIDER
13
CHAPTER 3
It’s syntax is based on C language and contains of two main functions namely ‘void setup()’
and ‘void loop()’. The void setup function is used for functions like initialising variables,
setting baud rate etc. Void loop contains instructions which are executed repeatedly.
The main function of the program is witten in this function.
Arduino programs are written in the Arduino Integrated Development Environment (IDE).
Arduino IDE is a special software running on your system that allows you to write sketches
(synonym for program in Arduino language) for different Arduino boards.
The Arduino programming language is based on a very simple hardware programming
language called processing, which is similar to the C language.
After the sketch is written in the Arduino IDE, it should be uploaded on the Arduino board
for executi
14
3.2 Flow of control
NodeMCU
SERVO
Fig-4:Flow Of Control
15
3.2.1 Control
3.3 Programming
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>
Servo servo;
void setup()
Serial.begin(9600);
16
void loop()
Blynk.run();
BLYNK_WRITE(V1)
servo.write(param.asInt());
BLYNK_WRITE(V2)
servo.write(0);
BLYNK_WRITE(V3)
servo.write(90);
#include< ESP8266WiFi.h > is the ESP8266 community library to operate the nodemcu
module and #include<Servo.h> is used to operate the servo using servo related
functions. And < BlynkSimpleEsp8266.h > is used to communijcate with blynk app.
Also we have initialized the initial positions of the servo in the variables pos1 ,pos2,
In void setup() we have set the baudrate to 9600 for serial communication with object
‘Serial’ and also we have set the pwm values for the DC motors to maximum as these
are connected to the PWM pins.
17
Then in void loop(), we write the initial positions of the servos.
if(serial.available()>0) is used to reject the garbage values <0.
Then we test for whether to enter in robotic arm mode or tank chassis mode.
When we enter the robotic arm mode then we check for input which will be related to
the movement of corresponding servos.
We have set some constraints for the ‘pos’ variables in the if loop because of some
mechanical limitations of the arm. These values were found by trial and error.
Then according to the condition we have called the appropriate functions and for the
movements we have incremented or decremented by 10.
We are using a do-while loop in the robotic arm mode so that it would remain in that
mode unless ‘1’ is pressed again on the app.
Similarly when we enter the tank chassis mode then we check for the input from app.
In the app when joystic comes back to initial position after being slided in a direction
then it returns a value ‘D’.
Accordingly the conditions are executed.
We have also used do-while loop in this mode as well so that the execution stays in
this mode until we press ‘2’ on the app.
First we pair the hotspot with nodemcu , after that by opening blynk app send desired
signal.
Then the LED of the nodemcu will start blinking slowly which represents that the
nodemcu device has been connected successfully.
Then we can operate the project as discussed in previous sections.
18
CHAPTER 4
CONCLUSION AND FUTURE SCOPE
4.1 CONCLUSION
The project has proposed the idea of smart homes that can support a lot of home
automation systems. A smart home contain a connection between wireless communications,
sensors, monitoring and tracking. Smart homes are a huge system that includes multiple
technologies and applications that can be used to provide security and control of the home
easily.
4.2FUTURE SCOPE
With the addition of object recognition using image processing and ultrasonic sensor, thislock
could be automated so that there won’t be any need of it to be manually controlled, it could
be programmed in such a way that it would be able to scan and recognize a certain object in
19
REFERENCES
https://www.youtube.com/watch?v=dKzCZhnLUyc&t=19s
20