0% found this document useful (0 votes)
56 views

Poorv

This document is a project report on a password-based door lock system using Arduino. It was submitted by 4 students to fulfill their degree requirements in electrical engineering. The report includes chapters on the Arduino UNO microcontroller, components used in the system like a 4x4 keypad, LCD display, servo motor, and their working. It also discusses the working of the password-based door lock, its connection diagram, advantages and disadvantages. The system allows opening a door lock by entering a password on the keypad and closing it by pressing a button.

Uploaded by

krishna kant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Poorv

This document is a project report on a password-based door lock system using Arduino. It was submitted by 4 students to fulfill their degree requirements in electrical engineering. The report includes chapters on the Arduino UNO microcontroller, components used in the system like a 4x4 keypad, LCD display, servo motor, and their working. It also discusses the working of the password-based door lock, its connection diagram, advantages and disadvantages. The system allows opening a door lock by entering a password on the keypad and closing it by pressing a button.

Uploaded by

krishna kant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

A Project Report

On
PASSWORD BASED DOOR LOCK USING ARDUINO
Submitted
In partial fulfillment of requirement for the degree of
BACHELOR OF TECHNOLOGY
In
ELECTRICAL ENGINEERING

Submitted by

Deepika Prajapati (1907150200006) Shivani Sahu (1907150200026)

Varsha Yadav (1907150200029) Tanya Dubey (200715029007)

Under the guidance of


Prof. (Dr.) V. K. Singh
Head of Department
Department of Electrical Engineering

S R Group of Institution (CEMT), Jhansi (UP)


Dr. APJ ABDUL KALAM TECHNICAL UNIVERSITY, LUCKNOW
2022-23

i
CANDIDATES DECLARATION
Hereby declare that the work, which is being presented in this thesis Report, entitled “Password
control door lock using arduino” in the partial fulfillment for the award of degree of “Bachelor
of Technology” of Electrical Engineering and submitted to the Department of Electrical
Engineering, S R Group of Institution (CEMT), Jhansi (Affiliated to AKTU Lucknow) is our
own work carried out with in the period from 2021-22, under the guidance of, Prof.(Dr.)V.K.
Singh sir Head of department of Electrical Engineering, S R Group of Institution (CEMT),
Jhansi (U.P.).

Date-

PLACE-Jhansi

TEAM MEMBER:
Deepika Prajapati (1907150200006)

Varsha Yadav (1907150200029)

Shivani Sahu (1907150200026)

Tanya Dubey (2007150209007)

ii
THESIS REPORT APPROVAL SHEET
Following team has done appropriate work related to “Password control door lock using arduino”
A partial fulfillment of the Bachelor of Technology in Electrical Engineering affiliated by
AKTU Lucknow” and is being submitted to S R Group of Institutions (CEMT), Jhansi.

TEAM MEMBER:

Deepika Prajapati (1907150200006)

Varsha Yadav (1907150200029)

Shivani Sahu (1907150200026)

Tanya Dubey (2007150209007)

Head of Department and Project Guide:-


Name: Prof. (Dr.) V.K. Singh
Date & Sign-……………….
Place-S R Group of Institutions (CEMT), Jhansi.

iii
ACKNOWLEDGEMENT
It gives us a sense of fulfillment and satisfaction while writing the report of our project Report
“Password control door lock using arduino” which has come out successfully of the untiring
efforts of the teachers, staff and our friends.
First of all, we are greatly indebted to our parents for their blessings. Also we are sincerely
grateful to Prof. (Dr.) V. K. Singh, HOD and guide for his kind help, guidance and support for
providing us all necessary facilities in accomplishing this work. We would like to express our
sincere gratitude to all the faculty members & staff of Electrical Engineering Dept. and our
friends for their support, without which, task would have been much more daunting.

TEAM MEMBER:

Deepika Prajapati (1907150200006)

Varsha Yadav (1907150200029)

Shivani Sahu (1907150200026)

Tanya Dubey (2007150209007)

iv
ABSTRACT

Through in this project, we will operate the door lock with the help of keypad. That is, we will
type three numbers in our keypad and then our door lock will open. And then we type # in our
keypad then our door lock will be closed. Password based Door lock system using arduino with
keypad. In this Project we are using a keypad as we have to enter the pass code so that the
system grants us access. It can be used this project in your homes and offices. This is a very good
and strong security system. We are sharing all the details like the circuit with the images of this
project for your convenience.

v
Table of Contents
S. No. Particular Page No.
1 Declaration ii
2 Thesis approval sheet iii
3 Acknowledgement iv
4 Abstract v
5 Chapter :1 Introduction 1
1.1 Introduction 1
1.2 List of Components 2
6 Chapter:2 Arduino UNO 5
2.1 Introduction of arduino 5
2.2 Types of arduino 5
2.3 How Arduino works 6
2.4 Components required 6
2.5 Working of arduino 7
2.6 The Arduino UNO components 8
2.7 Coding using in arduino 9
2.8 ATmega3268 12
2.9 16 MHZ crystal oscillator 14
7 Chapter:3 Components using in password based door lock 15
system using arduino
3.1 4*4 Keypad 15
3.2 Interfacing the 4*4 mechanical keypad with a 16
microcontroller
3.3 LCD display 17
3.4 Servomotor 20
3.5 Push switch 22
3.6 Preset 22
3.7 Power Connector 23
3.8 Switch 23
3.9 Chatakani 24
3.10 9 Volt Battery Cap 24
3.11 9 volt Battery 24
3.12 AC Adapter 25
3.13 Advantages of AC Adapter 27
3.14 Jumper wire 27
3.15 wires 29
8 Chapter:4 Working of Password based door lock system 30
4.1 Working 30
4.2 Connection table 32

vi
4.3 How does the keypad Arduino lock works?/ working 33
9 Chapter:5 Advantages and Disadvantages of Password based 35
door lock system using arduino
5.1 Advantages 35
5.2 Disadvantages 36
5.3 Development 36
10 Chapter:6 Conclusion and Reference 37
6.1 Conclusion 37
6.2 Future Scope 37
6.3 Reference 38

vii
List of Figures
Figure No. Particular Page no.
Figure 2.1 Types of Arduino 5
Figure 2.2 Arduino UNO 7
Figure 2.3 Circuit diagram of arduino 7
Figure 2.4 Connection 7
Figure 2.5(a) Microcontroller 9
Figure 2.5(b) Microcontroller 9
Figure 2.6 ATmega328 10
Figure 2.7 16MHZ crystal oscillator 11
Figure 3.1 4*4 Keypad 12
Figure 3.2 LCD 14
Figure 3.3 LCD 15
Figure 3.4 Servomotor 18
Figure 3.5 Push switch 19
Figure 3.6 Preset 19
Figure 3.7 Power connector 20
Figure 3.8 Switch 20
Figure 3.9 Chatakani 21
Figure 3.10 9 Volt battery cap 21
Figure 3.11 Battery 22
Figure 3.12 AC Adapter 23
Figure 3.13 Jumper wire 24
Figure 3.14 Wire 26
Figure 4.1 Circuit diagram of password based door lock system using 27
arduino

viii
CHAPTER – 1
INTRODUCTION
Often times, we need to secure a room at our home or office. So that no one can access the
room without our permission and ensure protection against theft or loss of our important
accessories and assets. There are so many types of security systems present today but behind the
scene, for authentication they all relay on fingerprint, retina scanner, iris scanner, face id, tongue
scanner, RFID reader, password, pin, patterns, etc. Off all the solutions the low-cost one is to use
a password or pin-based system. So, in this project, I have built an Arduino Keypad Door
Lock which can be mounted to any of your existing doors to secure them with a digital password.
In this project, we will learn how to make the Password-Based Security System Using Arduino
& Keypad. As thefts are increasing day by day security is becoming a major concern nowadays.
So a digital code lock can secure your home or locker easily. It will open your door only when
the right password is entered. In this project, we will operate the door lock with the help of
keypad. That is, we will type four numbers in our keypad and then our door lock will open. And
then we type # in our keypad then our door lock will be closed.
The circuit of this project is very simple which contains Arduino, keypad module, buzzer, Servo
Motor, and LCD. Arduino controls the complete processes like taking a password from the
keypad module, comparing passwords, driving buzzer, rotating servo motor, and sending status
to the LCD display. The keypad is used for taking the password. The buzzer is used for
indications. Servo motor is used for opening the gate while rotating and LCD is used for
displaying status or messages on it.
Before building our password door locking project, first, we need to collect the required
components and then go ahead and follow the step by step building process.

1.2 List of components

1. Arduino Uno/Pro/Mini or Custom board using Atmega328p Microcontroller


2. 16 x 2 LCD (Liquid Crystal Display)
3. 4 x 4 matrix keypad for Arduino
4. Servo motor
5. 3D printed door locker/customized door locker
6. Additional components for power supply of 1 Amp 5 Volt mobile charger
7. Plastics boxes, jumper wires, nuts bolts, plastic casing, etc.

The biggest advantage is convenience. It eliminates the necessity of keys. There's no need to
carry them around, keep track of copies and spares, or change the door lock when a key is stolen
or misplaced. Children, guests and service providers can be given their own code or a temporary
code, rather than a key. The system includes an electronic control assembly that controls the
output load via a numerical password. Once the correct code or password has been entered, the

1
door opens and the person is allowed to enter. If the password is incorrect, the door will be
locked, denying access to the person.
The Arduino board is connected to an LCD and a servo motor. The servo motor is used to push
(lock) or pull (unlock) the latch on the door. A 16 x 2 LCD is required to display the message by
Arduino, 16 x 2 means it has 16 numbers of columns and 2 numbers of rows.
The Arduino Uno, Servo motor, 4*4 keypad module, and jumper wires comprise the password-
based door lock system. In this project, we will use the keypad to enter a password and then use
the servo motor to open the door lock. The Arduino is the program's brain, controlling the entire
system.
First of all, we start from the brain of this project which is the Arduino UNO board. The Arduino
board is connected to an LCD and a servo motor. The servo motor is used to push (lock) or pull
(unlock) the latch on the door. A 16 x 2 LCD is required to display the message by Arduino, 16 x
2 means it has 16 numbers of columns and 2 number of rows. If you are completely new to 16x2
LCD Display Modules, you can check this Arduino LCD Interfacing tutorial to learn more about
In this project, We have used a 4 x 4 matrix keypad (but the 4 x 4 keypad part is not available in
fritzing for making this graphical representation), but don’t worry as 4 x 3 Matrix keypad also
works fine with my coding. We need a keypad for password input and manually lock our
customized door locker. It consists of 16 keys (soft switch) 4 keys in Rows (R1, R2, R3, R4) and
4 keys in Columns (C1, C2, C3, C4) when a key pressed, it establishes a connection in between
the corresponding rows and columns.

In this project, we have defined the default password “888” in the Arduino. You can change it
via coding. When we enter a password, it will match it with the password stored in the Arduino.
If it is correct, then it will show ‘Access Granted, Welcome’ and then rotate the servo motor to
180 doors as the door is opened. It will then give 5 seconds time for entering via the door. Once
5 seconds is completed, the door will get locked automatically.
As you can see from the above circuit diagram we connected 8 pins of 4×4 keypad to Arduino
UNO digital pins from pin9 to pin2. 4×4 keypad has total of 8 pins, first 4 pins for rows control
and another 4 pins for column control which we mentioned in the above image.
Here we are using 16X2 LCD display with adapter to reduce the connecting cables as it takes
only 4 connecting wires. It is connected to Arduino as Vcc and GND power pins of LCD display
are connected to 5V and GND pins of Arduino. I2C pins SDA and SCL of LCD display are
connected to A4 and A5 respectively.
A 5v relay module is connected as the power pins VCC and GND are connected to 5v pin and
GND pins of Arduino, and the IN pin from relay is connected to digital pin 11 of Arduino.
And as we are using a for Arduino we need to get a separate 12volts power supply either from
the 12 volts battery of from any 12volts adapter. Connect the solenoid lock in series with relay
module through Normally Open (NO) connection as shown in the circuit diagram.
And finally we are connecting a push button as the bottom legs are connected to 5v and GND, as
5v is high for it we are using a 10Kohm resistor connected in series to reduce the current flow
and the upper right leg is connected to pin 10 of Arduino.
The Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various
expansion boards (shields) and other circuits. The board has 14 Digital pins, 6 Analog pins, and
programmable with the Arduino IDE (Integrated Development Environment) via a type B USB

2
cable. It can be powered by a USB cable or by an external 9 volt battery, though it accepts
voltages between 7 and 20 volts. It is also similar to the Arduino Nano and Leonardo. The
hardware reference design is distributed under a Creative Commons Attribution Share-Alike 2.5
license and is available on the Arduino website. Layout and production files for some versions of
the hardware are also available. "Uno" means one in Italian and was chosen to mark the release
of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were
the reference versions of Arduino, now evolved to newer releases.
The 4*4 matrix keypad usually is used as input in a project. It has 16 keys in total, which means
the same input values. The SunFouner 4*4 Matrix Keypad Module is a matrix non- encoded
keypad consisting of 16 key sin parallel.
We come across LCD displays everywhere around us. Computers, calculators, television sets,
mobile phones, digital watches use some kind of display to display the time. An LCD is an
electronic display module which uses liquid crystal to produce a visible image. The 16×2 LCD
display is a very basic module commonly used in DIYs and circuits. The 16×2
translates o a display 16 characters per line in 2 such lines. In this LCD each character is
displayed in a 5×7 pixel matrix.
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical
device that uses the light-modulating properties of liquid crystals. Liquid crystals do not emit
light directly, instead using a backlight or reflector to produce images in color or monochrome.
LCDs are available to display arbitrary images (as in a general-purpose computer display) or
fixed images with low information content, which can be displayed or hidden, such as preset
words, digits, and seven-segment displays, as in a digital clock. LCDs are used in a wide range
of applications, including LCD televisions, computer monitors, instrument panels, aircraft cockpit
displays, and indoor and outdoor signage.
When you manually lock the door by pressing the “#” key, it first shows Door is closed for 1
second and then it displays Enter Password. On the other hand, when the door is unlocked by
entering the correct password, it shows Door is Open.
A servomotor is a rotary actuator or linear actuator that allows for precise control of angular or
linear position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for
position feedback. It also requires a relatively sophisticated controller, often a dedicated module
designed specifically for use with servomotors. Servomotors are not a specific class of motor
although the term servomotor is often used to refer to a motor suitable for use in a closed-loop
control system. Servomotors are used in applications such as robotics, CNC machinery or
automated manufacturing.
The type of motor is not critical to a servomotor and different types may be used. At the simplest,
brushed permanent magnet DC motors are used, owing to their simplicity and low cost. Small
industrial servomotors are typically electronically commutated brushless motors. For large
industrial servomotors, AC induction motors are typically used, often with variable frequency
drives to allow control of their speed. For ultimate performance in a compact package, brushless
AC motors with permanent magnet fields are used, effectively large versions of Brushless
DC electric motors.

3
Simple password authentication offers an easy way of authenticating users. In password
authentication, the user must supply a password for each server, and the administrator must keep
track of the name and password for each user, typically on separate servers.
• The system contents three devices. Input process, and output device. The input device is the
keypad.
• Which will send all the input data to the next device which is Arduino.
• Arduino works here as a processing device.
• There is a matrix of 4×4 inside the keypad.
• There are the 16 circuits when we press any key then anyone of the circuit will turn on. If we
press the A key then the circuit below the button will activate and send this information to the
Arduino.
Before the keypress, all the circuit is turned off. The row and column make the circuit with the
combination in a password-based door lock system using Arduino.
When we press the key then the Arduino gets notified that which circuit is activated right now.
and there is a character assigned with the circuit which can be shown on the serial monitor
If you have some basic knowledge then you can easily observe the character into the serial
monitor.
And there may be errors occurred sometimes to get the right character which you can easily sort
out.
This is basically a user-defined password-based circuit breaker in the Arduino project where you
need to make your own password now how you can enter the password.
First, it will ask you the password to enroll then enter the password and now you can make your
own password and the process is given here.
When we press the key Arduino gets the character now and then the character will save into the
Arduino memory and then you need to enter another three characters to enroll the password into
the system. And then you can make this password the current password. This is pretty easy if you
have any confusion to make the password we will give you the video in the last section of the
post. An Arduino Based Door Lock System is a project where you can secure your doors with a
password. Traditional lock systems which are using mechanical locks are replaced by modern
technologies. These techniques are electrical and highly intelligent. These systems are also very
efficient than older locks. We can use the door unlocking system as an automated room
appliance. Like we open the door and the light and fan of the room turn on.
In this project, we are going to build an Arduino based door lock system with a password feature.
This project also provides the control to actuating the load. This system is very easy to use like
only with a keypad you can operate it.
In this present day, this system is used to protect secure areas. Where those people can only enter
who have passwords or permission to enter. After anyone enters the room the doors locked
again. When any other arrives, the system asks for a password. If this person enters the wrong
password the doors remain closed.

4
CHAPTER -2

ARDUINO UNO
2.1 INTRODCTION:
The Arduino UNO is an open source microcontroller board based on the microchip ATmega
328p microcontroller and developed by arduino.c.c. The board is equipped with sets of digital
and analog input/output (I/O) pin that may be interfaced to various expansion boards (shields)
and other circuits. The board developed by them is termed as Arduino boards that are capable of
reading input like –dept info using radar, light or a sensor, press of a button, etc. Can be converts
them into an output like activating the led light, motor buzzers, etc. There are different variants
of the arduino board available in the markets – Nano, Uno, Atmega, etc. Each one of them is
very simple in shape and size. It also provides software IDE for their boards, which helps the
developer to program the board in language this IDE for their boards which helps the developer
to program the liberty to the user to provide input instruction directly from the system.

2.2 TYPES OF ARDUINO


Let’s see a few different types of the board provided by them itself.

Figure 2.1 Types of Arduino


Arduino software uses arduino programming language which is C based to write the code
since the programming language is C based , the difficulty of writing the program in
assembly language is removed . As the software coverts the C based program into assembly
code internally and then uploads it to the board . Along with the code editor the software
also consists of a compiler , an up loader, libraries for the peripheral devices

5
the Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various
expansion boards (shields) and other circuits. The board has 14 Digital pins, 6 Analog pins, and
programmable with the Arduino IDE (Integrated Development Environment) via a type B USB
cable. It can be powered by a USB cable or by an external 9 volt battery, though it accepts
voltages between 7 and 20 volts. It is also similar to the Arduino Nano and Leonardo. The
hardware reference design is distributed under a Creative Commons Attribution Share-Alike 2.5
license and is available on the Arduino website. Layout and production files for some versions of
the hardware are also available. "Uno" means one in Italian and was chosen to mark the release
of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were
the reference versions of Arduino, now evolved to newer releases. The Uno board is the first in a
series of USB Arduino boards, and the reference model for the Arduino platform. The
ATmega328 on the Arduino Uno comes preprogrammed with a boot loader that allows
uploading new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol. The Uno also differs from all preceding boards in that it
does not use the FTDI USB-to-serial driver chip. Instead, it uses the Atmega16U2 (Atmega8U2
up to version R2) programmed as a USB-to-serial converter.

2.3 HOW ARDUINO WORKS


General Pin functions
 LED: There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is
on, when the pin is LOW, it's off.
 VIN: The input voltage to the Arduino/Genuine board when it's using an external power source
(as opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through this
pin.
 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
with power either from the DC power jack (7 - 20V), the USB connector (5V), or the VIN pin of
the board (7-20V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage the board.
 3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
 GND: Ground pins.
IO-REF: This pin on the Arduino/Genuine board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and
select the appropriate power source or enable voltage translators on the outputs to work with the
5V-3.3V.

We will see the working by blinking a small LED.


2.4 Components required:
Arduino UNO, LED, Jumper wire, Breadboard and 1K resistor

6
Figure 2.2 Arduino UNO
2.5 WORKING OF ARDUINO
Following are the steps involved in the blinking of the LED’s using Arduino.

Step 1 - Connect the components as per the circuit diagram and then connect Arduino UNO to
the system using the USB cable.

Figure 2.3 circuit diagram of arduino

Figure 2.4 connection

7
Step-2
Coding the logic; implementing the LED code of arduino consists of majorly two functions.
Step-3 6
Setup Arduino IDE:open IDE and go to Tools -> Boards and select Arduino UNO. Then go to
Tools -> ports and select the port at which UNO is connected.
Code
Void set put () {

Void loop () {

}
Void setup is called when the arduino starts and the void loop keeps on iterating in an
infinite loop until the power is turned off.
Features
* It is open source both in term of hardware and software
* It can perform serial communication with the computer using USB.
* It can work with digital and analog signals, sensors and actuators
* It only needs 5V to power up
2.6 The Arduino UNO Components
Looking at the board from the top down this is an outline of what you will see (parts of the board
you might interact with in the course of normal use are highlighted).
*Analog reference pin (orange)
*Digital ground (light green)

*Digital pin 2- 13 (green)

*Digital pin 0-1/ serial In/Out

* Reset button-S1

* In – circuit serial programmer

* Analog In pin 0-5

*Power and Ground pins

*External power supply in (9-12VDC)

*Toggles external power and USB power

* USB

8
2.7 Coding using in arduino
#include <Servo.h>

#include <Keypad.h>

#include <LiquidCrystal.h>

// initialize the liquid crystal library & interface lcd pin to arduino digital pins

LiquidCrystal lcd(13,12,11,10,9,8);

Servo ServoMotor;

char* password = "888"; // change the password here, just pick any 3 numbers

int position = 0;

const byte ROWS = 4;

const byte COLS = 4;

char keys[ROWS][COLS] = {

{'1','2','3','A'},

{'4','5','6','B'},

{'7','8','9','C'},

{'*','0','#','D'}

};

byte rowPins[ROWS] = { 0, 1, 2, 3 };

byte colPins[COLS] = { 4, 5, 6, 7 };

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

int RedpinLock = A1;

int GreenpinUnlock = A2;

void setup()

9
lcd.begin(16, 2);

Serial.begin(9600);

ServoMotor.attach(A5);

LockedPosition(true);

void loop()

char key = keypad.getKey();

if (key == '*' || key == '#')

position = 0;

LockedPosition(true);

if (key == password[position])

position ++;

if (position == 3)

LockedPosition(false);

delay(100);

void LockedPosition(int locked)

10
{

if (locked)

digitalWrite(RedpinLock, HIGH);

digitalWrite(GreenpinUnlock, LOW);

ServoMotor.write(11);

lcd.setCursor(0,0);

lcd.print("Door Locked");

lcd.setCursor(0,1);

lcd.print("Enter Password.");

else

digitalWrite(RedpinLock, LOW);

digitalWrite(GreenpinUnlock, HIGH);

ServoMotor.write(90);

lcd.setCursor(0,0);

lcd.print("Door UnLock");

lcd.setCursor(0,1);

lcd.print("Please Welcome");

11
Figure 2.5(a) microcontroller

Figure 2.5(b) Microcontroller

2. ATmega328P
The ATmega328p is a single chip microcontroller created by Atmel in the mega AVR family. It
has a modified Harvard architecture 8-bit RISC processor core.
Specification
The Atmel 8-bit AVR RISC based microcontroller combines 32 KB ISP flash memory with
read-while- write capabilities , 1KB EEPROM , 2 KB SRAM , 32 general purpose I/O Lines
, 32 general purpose working registers , three flexible timer / counters with compare modes ,
internal and external interrupts , serial programmable USART , a byte oriented 2-wire serial

12
interface , SPI serial port , 6 – channel 10-bit A/D Converter ( 8 channels In TQFP and QFN /
MLF packages) , programmable watchdog timer with internal oscillator , and five software
selectable power saving modes. The device operates between 1.8-5.5 volts. The devisees
throughout approaching 1 MIPS per MHZ. The Atmel 8-bit AVR RISC-based microcontroller
combines 32 KB ISP flash memory with read-while-write capabilities, 1 KB EEPROM,
2 KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible
timer/counters with compare modes, internal and external interrupts, serial
programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, 6-channel 10-
bit A/D converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog
timer with internal oscillator, and five software selectable power saving modes. The device
operates between 1.8-5.5 volts. The device achieves throughput approaching 1 MIPS per MHZ.

Figure 2.6 ATmega328

Family
A common alternative to the ATmega328 is the "picoPower" ATmega328P. A comprehensive
list of all other members of the mega AVR series can be found on the Atmel website.
 ATmega328
 ATmega328P and ATmega328P-AUTOMOTIVE
 ATmega328PB and ATmega328PB-AUTOMOTIVE (superset of ATmega328P) - has more
UART, I2C, and SPI peripherals than ATmega328P
Applications
As of 2013 the ATmega328 is commonly used in many projects and autonomous systems where
a simple, low-powered, low-cost micro-controller is needed. Perhaps the most common
implementation of this chip is on the popular Arduino development platform, namely
the Arduino Uno and Arduino Nano.

13
2.9 16MHz Crystal Oscillator

Fi
Figure 2.7 16 MHZ Crystal Oscillators

A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a
vibrating crystal of precise frequency. This frequency is often used to keep track of time, as
in quartz wristwatches, to provide a stable clock signal for digital integrated circuits, and to
stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric
resonator used is the quartz crystal, so oscillator circuits incorporating them became known as
crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are used in
similar circuits.
Useful pins of arduino
1 .Digital pin
2. Analog pins
3. Power pins
4. Other pins

14
CHAPTER-3

COMPONENTS USING IN PASSWORD BASED DOOR LOCK

3.1 4*4 KEYPAD


The 4*4 Matrix Keypad usually is used as input in a project. It has 16 keys in total, which means
the same input values. The sunfouncer 4*4 keypad is a matrix non-encoded keypad consisting of
16 keys in parallel.

Figure-3.1 4*4 Keypad

The Basics of a 4x4 Matrix Keypad


The 4x4 matrix keypad is a simple mechanism that resembles the numeric input on your
computer keyboard, except that it has an additional ‘*,’ ‘#’ and 4 other auxiliary buttons that can
be used for various functions in the application. The keypad is usually made of plastic materials
and is relatively cheap compared to touch screen displays. A 4x4 matrix keypad can be
implemented separately or within the physical product itself, such as a security access controller,
where it is used for PIN identifications. Either way, the mechanism of the mechanical keypad
remains the same when hardware and firmware designers are concerned. If you’ve never
designed with a 4x4 mechanical keypad, the best way to visualize the internal mechanism is a
matrix of push-button switches. A 4x4 keypad has a total of 8 connections, where 4 of them are
connected to the column and the remaining rows of the matrix of switches. When an individual
button is pressed, a connection is established between one of the rows and columns.

15
The microcontroller then deciphers the physical button based on the index of the row and column
that is activated.
3.2 Interfacing the 4x4 Mechanical Keypad with a Microcontroller
The easiest way for a microcontroller to interface with a 4x4 mechanical keypad is to directly
control the rows and columns with the general purpose input and output pins. Each of the rows is
connected to an output pin of the microcontroller while the columns are connected to the inputs.
The microcontroller then scans the presence of a ‘key pressed’ event by setting the logic high on
one of the outputs to the row while keeping other outputs on a low. This process is repeated for
the next output continuously and ultimately loops back to the first output. Simultaneously, the
microcontroller checks for the input values that are connected to the columns. If there is at least
one button being pressed, one of the column inputs changes from its default logic state. When an
input is detected, the firmware refers to an internal input map to determine the exact physical
button that is being pressed. Designing with a 4 x 4 mechanical keypad isn’t rocket science.
The hardware schematics require almost no other external components while the firmware
follows a simple algorithm that every beginner should pick up pretty easily. There are two finer
aspects of the design if you’re serious about ensuring users have a great experience with the
keypad. One of the common issues with a mechanical keypad is the additional pulse that a button
can send to the input as it's released. This is due to the spring-like mechanism of the button. This
will often result in multiple values of the same button being logged by the firmware. To prevent
the incorrect reading of the keypad, a method called denouncing is being applied. This can be
done in the hardware, where a capacitor is in place to filter off the mini pulses that are triggered
after the button is released.

How does a 4*4 keypad work?


This 4x4 matrix keypad has 16 built-in pushbutton contacts connected to row and column lines.
A microcontroller can scan these lines for a button-pressed state. In the keypad library, the
Propeller sets all the column lines to input, and all the row lines to input.

What is the function of keypad?

The keypad is a section on most computer keyboards and allows an individual to quickly
input numeric values into a computer. For example, the keypad is often used for anyone who
deals with numbers frequently or has to perform calculations with a software calculator.

16
What is 4*4 membrane keypad?
This 4*4 Matrix Membrane Keypad provides an easy interface for embedded systems such as an
Arduino. The 4*4 keypad has a total of 16 buttons in Matrix form, and it's made of a thin,
flexible membrane material with an adhesive backing (just remove the paper) so you can attach it
to nearly anything.

How many pins are there in a 4*4 keypad *?


8 PINS
As given in above table, a 4X4 KEYPAD will have EIGHT TERMINALS. In them four are
ROWS of MATRIX and four are COLUMNS of MATRIX. These 8 PINS are driven out from 16
buttons present in the MODULE.

How does 4*4 keypad work Arduino?


In the code, the keys of the 4×4 Matrix keypad are mapped with digits from 0 to 9, symbols *
and # and alphabets A, B, C and D. So, whenever a key is pressed, Arduino will detect the key
using the “Keypad” library and display the same on the 16×2 LCD Display.

3.3 LCD Display


We come across LCD displays everywhere around us. Computers, calculators, television sets,
mobile phones, digital watches use some kind of display to display the time. An LCD is an
electronic display module which uses liquid crystal to produce a visible image. The 16×2 LCD
display is a very basic module commonly used in DIYs and circuits. The 16×2 translates o a
display 16 characters per line in 2 such lines. In this LCD each character is displayed in a 5×7
pixel matrix.

Figure 3.2 LCD


17
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical
device that uses the light-modulating properties of liquid crystals. Liquid crystals do not emit
light directly, instead using a backlight or reflector to produce images in color or monochrome.
LCDs are available to display arbitrary images (as in a general-purpose computer display) or
fixed images with low information content, which can be displayed or hidden, such as preset
words, digits, and seven-segment displays, as in a digital clock. They use the same basic
technology, except that arbitrary images are made up of a large number of small pixels, while
other displays have larger elements. LCDs can either be normally on (positive) or off (negative),
depending on the polarizer arrangement. For example, a character positive LCD with a backlight
will have black lettering on a background that is the color of the backlight, and a character
negative LCD will have a black background with the letters being of the same color as the
backlight. Optical filters are added to white on blue LCDs to give them their characteristic
appearance.

Figure 3.3 LCD

LCDs are used in a wide range of applications, including LCD televisions, computer
monitors, instrument panels, aircraft cockpit displays, and indoor and outdoor signage. Small
LCD screens are common in portable consumer devices such as digital
cameras, watches, calculators, and mobile telephones, including smart phones. LCD screens are
also used on consumer electronics products such as DVD players, video game devices
and clocks. LCD screens have replaced heavy, bulky cathode ray tube (CRT) displays in nearly
all applications. LCD screens are available in a wider range of screen sizes than CRT and plasma
displays, with LCD screens available in sizes ranging from tiny digital watches to very
large television receivers. LCDs are slowly being replaced by OLEDs, which can be easily made
into different shapes, and have a lower response time, wider color gamut, virtually infinite color
contrast and viewing angles, lower weight for a given display size and a slimmer profile (because
OLEDs use a single glass or plastic panel whereas LCDs use two glass panels; the thickness of
the panels increases with size but the increase is more noticeable on LCDs) and potentially lower

18
power consumption (as the display is only "on" where needed and there is no backlight). OLEDs,
however, are more expensive for a given display size due to the very expensive
electroluminescent materials or phosphors that they use. Also due to the use of phosphors,
OLEDs suffer from screen burn-in and there is currently no way to recycle OLED displays,
whereas LCD panels can be recycled, although the technology required recycling LCDs is not
yet widespread. Attempts to increase the lifespan of LCDs are quantum dot displays, which offer
similar performance as an OLED display, but the Quantum dot sheet that gives these displays
their characteristics cannot yet be recycled.
Since LCD screens do not use phosphors, they rarely suffer image burn-in when a static image is
displayed on a screen for a long time, e.g., the table frame for an airline flight schedule on an
indoor sign. LCDs are, however, susceptible to image persistence. The LCD screen is more
energy-efficient and can be disposed of more safely than a CRT can. Its low electrical power
consumption enables it to be used in battery-powered electronic equipment more efficiently than
CRTs can be. By 2008, annual sales of televisions with LCD screens exceeded sales of CRT
units worldwide, and the CRT became obsolete for most purposes.
Each pixel of an LCD typically consists of a layer of molecules aligned between
two transparent electrodes, often made of Indium-Tin oxide (ITO) and
two polarizing filters (parallel and perpendicular polarizer), the axes of transmission of which are
(in most of the cases) perpendicular to each other. Without the liquid crystal between the
polarizing filters, light passing through the first filter would be blocked by the second (crossed)
polarizer. Before an electric field is applied, the orientation of the liquid-crystal molecules is
determined by the alignment at the surfaces of electrodes. In a twisted nomadic (TN) device, the
surface alignment directions at the two electrodes are perpendicular to each other, and so the
molecules arrange themselves in a helical structure, or twist. This induces the rotation of the
polarization of the incident light, and the device appears gray. If the applied voltage is large
enough, the liquid crystal molecules in the center of the layer are almost completely untwisted
and the polarization of the incident light is not rotated as it passes through the liquid crystal
layer. This light will then be mainly polarized perpendicular to the second filter, and thus be
blocked and the pixel will appear black. By controlling the voltage applied across the liquid
crystal layer in each pixel, light can be allowed to pass through in varying amounts thus
constituting different levels of gray.
The chemical formula of the liquid crystals used in LCDs may vary. Formulas may be
patented. An example is a mixture of 2-(4-alkoxyphenyl)-5-alkylpyrimidine with cyan biphenyl,
patented by Merck and Sharp Corporation. The patent that covered that specific mixture expired.
Most color LCD systems use the same technique, with color filters used to generate red, green,
and blue sub pixels. The LCD color filters are made with a photolithography process on large
glass sheets that are later glued with other glass sheets containing a TFT array, spacers and liquid
crystal, creating several color LCDs that are then cut from one another and laminated with
polarizer sheets. Red, green, blue and black photoresists (resists) are used. All resists contain a
finely ground powdered pigment, with particles being just 40 nanometers across. The black resist
is the first to be applied; this will create a black grid (known in the industry as a black matrix)
that will separate red, green and blue sub pixels from one another, increasing contrast ratios and
preventing light from leaking from one sub pixel onto other surrounding sub pixels. After the
black resist has been dried in an oven and exposed to UV light through a photo mask, the
unexposed areas are washed away, creating a black grid. Then the same process is repeated with

19
the remaining resists. This fills the holes in the black grid with their corresponding colored
resists. Another color-generation method used in early color PDAs and some calculators was
done by varying the voltage in a Super-twisted nematic LCD, where the variable twist between
tighter-spaced plates causes a varying double refraction birefringence, thus changing the hue.
They were typically restricted to 3 colors per pixel: orange, green, and blue.
The optical effect of a TN device in the voltage-on state is far less dependent on variations in the
device thickness than that in the voltage-off state. Because of this, TN displays with low
information content and no backlighting are usually operated between crossed polarizer’s such
that they appear bright with no voltage (the eye is much more sensitive to variations in the dark
state than the bright state). As most of 2010-era LCDs are used in television sets, monitors and
smart phones, they have high-resolution matrix arrays of pixels to display arbitrary images using
backlighting with a dark background. When no image is displayed, different arrangements are
used. For this purpose, TN LCDs are operated between parallel polarizer’s, whereas IPS
LCDs feature crossed polarizer’s. In many applications IPS LCDs have replaced TN LCDs,
particularly in smart phones. Both the liquid crystal material and the alignment layer material
contain ionic compounds. If an electric field of one particular polarity is applied for a long period
of time, this ionic material is attracted to the surfaces and degrades the device performance. This
is avoided either by applying an alternating current or by reversing the polarity of the electric
field as the device is addressed (the response of the liquid crystal layer is identical, regardless of
the polarity of the applied field).
Displays for a small number of individual digits or fixed symbols (as in digital
watches and pocket calculators) can be implemented with independent electrodes for each
segment. In contrast, full alphanumeric or variable graphics displays are usually implemented
with pixels arranged as a matrix consisting of electrically connected rows on one side of the LC
layer and columns on the other side, which makes it possible to address each pixel at the
intersections. The general method of matrix addressing consists of sequentially addressing one
side of the matrix, for example by selecting the rows one-by-one and applying the picture
information on the other side at the columns row-by-row. For passive-matrix and active-matrix
addressed LCDs.
LCDs are manufactured in cleanrooms borrowing techniques from semiconductor manufacturing
and using large sheets of glass whose size has increased over time. Several displays are
manufactured at the same time, and then cut from the sheet of glass, also known as the mother
glass or LCD glass substrate. The increase in size allows more displays or larger displays to be
made, just like with increasing wafer sizes in semiconductor manufacturing.

3.4 SERVO MOTOR


A servomotor is a rotary actuator or linear actuator that allows for precise control of angular or
linear position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for
position feedback. It also requires a relatively sophisticated controller, often a dedicated module
designed specifically for use with servomotors. Servomotors are not a specific class of motor
although the term servomotor is often used to refer to a motor suitable for use in a closed-loop
control system.
Servomotors are used in applications such as robotics, CNC machinery or automated
manufacturing

20
Figure 3.4 Servomotor
Encoders
The first servomotors were developed with synchronous as their encoders. Much work was done
with these systems in the development of radar and anti-aircraft artillery during World War II
Simple servomotors may use resistive potentiometers as their position encoder. These are only
used at the very simplest and cheapest level, and are in close competition with stepper motors.
They suffer from wear and electrical noise in the potentiometer track. Although it would be
possible to electrically differentiate their position signal to obtain a speed signal, PID
controllers that can make use of such a speed signal generally warrant a more precise encoder.
Motors
The type of motor is not critical to a servomotor and different types may be used. At the simplest,
brushed permanent magnet DC motors are used, owing to their simplicity and low cost. Small
industrial servomotors are typically electronically commutated brushless motors. For large
industrial servomotors, AC induction motors are typically used, often with variable frequency
drives to allow control of their speed. For ultimate performance in a compact package, brushless
AC motors with permanent magnet fields are used, effectively large versions of Brushless
DC electric motors.
Control
Most modern servomotors are designed and supplied around a dedicated controller module from
the same manufacturer. Controllers may also be developed around microcontrollers in order
to reduce cost for large- volume applications. Let’s begin, with the servo motor basics. Servo
motors are part of a closed-loop system and are comprised of several parts namely a control
circuit, servo motor, shaft, potentiometer, drive gears, amplifier and either an encoder or
resolver. A servo motor is a self-contained electrical device, which rotates parts of a machine
with high efficiency and with great precision.
The output shaft of this motor can be moved to a particular angle, position and velocity that a
regular motor does not have. The Servo Motor utilizes a regular motor and couples it with a
sensor for positional feedback. The controller is the most important part of the Servo Motor
designed and used specifically for this purpose.
A type of encoder serves as a sensor providing speed and position feedback. This circuitry is
built right inside the motor housing which usually is fitted with gear system.

21
3.5 Push Switch
Featured snippet from the web A push switch (button) is a momentary or non-
latching switch which causes a temporary change in the state of an electrical circuit only while
the switch is physically actuated. When the button is released, the circuit is broken. This type
of switch is also known as a Normally Open (NO) Switch.

Figure 3.5 Push switch

3.6 Preset
A preset resistor is a smaller PCB mounted version of a potentiometer. These are useful where
adjustment or configuration of a circuit needs to be made but such adjustment only occurs during
building a circuit, not during normal use. An appropriate value for the PICAXE system
is 10k (do not use 100k devices).

Figure 3.6 Preset

22
3.7 Power Connector
Power connectors complete circuits by joining an electrical component to its power source. For
consumer electronics, the connector usually refers to the junction where the product “plugs in” to
a battery or, more commonly, to a power source in the wall.

Figure 3.7 Power Connector


3.8 Switch
A switch is an electrical component that can disconnect or connect the conducting path in an
electrical circuit, interrupting the electric current or diverting it from one conductor to another .

Figure 3.8 Switch

23
3.9 Chatakani
The necked tower bolt is a cranked sliding bolt often used on double doors and doors with a
recessed frame. Uses a flat plate instead of a staple. The tower bolt can be fitted horizontally or
vertically downwards. Supplied as a single sliding bolt with keep plate, screws not included.

Figure 3.9 Chatakani

3.10 9Volt Battery Cap


This simple cable has so many uses! Plug the battery clip onto a standard 9V battery and connect
the other end to any device that needs 9V. The Connector leads are polarity color coded, Red and
Black.

Figure 3.10 9Volt battery cap

3.11 9 Volt Battery


The nine-volt battery, or 9-volt battery, is a common size of battery that was introduced for the
early transistor radios. It has a rectangular prism shape with rounded edges and a polarized snap
connector at the top. This type is commonly used in walkie-talkies, clocks and smoke detectors.

24
Figure 3.11 Battery

3.12 AC Adapter
An AC adapter, AC/DC adapter, or AC/DC converter is a type of external power supply, often
enclosed in a case similar to and AC plug. Other common names include plug pack, plug-in
adapter, adapter block, domestic mains adapter, line power adapter, wall wart, power brick,
and power adapter. Adapters for battery-powered equipment may be described
as chargers or rechargers (see also battery charger). AC adapters are used with electrical devices
that require power but do not contain internal components to derive the required voltage and
power from mains power. The internal circuitry of an external power supply is very similar to the
design that would be used for a built-in or internal supply.
External power supplies are used both with equipment with no other source of power and
with battery-powered equipment, where the supply, when plugged in, can sometimes charge the
battery in addition to powering the equipment.
Use of an external power supply allows portability of equipment powered either by mains or
battery without the added bulk of internal power components, and makes it unnecessary to
produce equipment for use only with a specified power source; the same device can be powered
from 120 VAC or 230 VAC mains, vehicle or aircraft battery by using a different adapter.
Another advantage of these designs can be increased safety; since the hazardous 120 or
240 volt mains power is transformed to a lower, safer voltage at the wall outlet and the appliance
that is handled by the user is powered by this lower voltage.
An AC adapter disassembled to reveal a simple, unregulated linear DC supply circuit: a
transformer, four diodes in a bridge rectifier, and an electrolytic capacitor to smooth the
waveform Originally, most AC/DC adapters were linear power supplies, containing
a transformer to convert the mains electricity voltage to a lower voltage, a rectifier to convert it
to pulsating DC, and a filter to smooth the pulsating waveform to DC, with
residual ripple variations small enough to leave the powered device unaffected. Size and weight
of the device was largely determined by the transformer, which in turn was determined by the
power output and mains frequency. Ratings over a few watts made the devices too large and
heavy to be physically supported by a wall outlet. The output voltage of these adapters varied

25
with load; for equipment requiring a more stable voltage, linear voltage regulator circuitry was
added. Losses in the transformer and the linear regulator were considerable; efficiency was
relatively low, and significant power dissipated as heat even when not driving a load.

Figure 3.12 AC Adapter


Early in the twenty-first century, switched-mode power supplies (SMPSs) became almost
ubiquitous for this purpose. Mains voltage is rectified to a high direct voltage driving a switching
circuit, which contains a transformer operating at a high frequency and outputs direct current at
the desired voltage. The high-frequency ripple is more easily filtered out than mains frequency.
The high frequency allows the transformer to be small, which reduces its losses; and the
switching regulator can be much more efficient than a linear regulator. The result is a much more
efficient, smaller, and lighter device. Safety is ensured, as in the older linear circuit, because a
transformer still provides galvanic isolation.
A linear circuit must be designed for a specific, narrow range of input voltages (e.g., 220–
240 VAC) and must use a transformer appropriate for the frequency (usually 50 or 60 Hz), but a
switched-mode supply can work efficiently over a very wide range of voltages and frequencies; a
single 100–240 VAC unit will handle almost any mains supply in the world.
However, unless very carefully designed and using suitable components, switching adapters are
more likely to fail than the older type, due in part to complex circuitry and the use of
semiconductors. Unless designed well, these adapters may be easily damaged by overloads,
even transient ones, which can come from lightning, brief mains overvoltage (sometimes caused
by an incandescent light on the same power circuit failing), component degradation, etc. A very
common mode of failure is due to the use of electrolytic capacitors whose equivalent series
resistance (ESR) increases with age; switching regulators are very sensitive to high ESR (the
older linear circuit also used electrolytic capacitors, but the effect of degradation is much less
dramatic). Well-designed circuits pay attention to the ESR, ripple current rating, pulse operation,
and temperature rating of capacitors.

26
3.13 ADVANTAGE OF AC ADAPTER
External AC adapters are widely used to power small or portable electronic devices. The
advantages include:
Safety – External power adapters can free product designers from worrying about some safety
issues. Much of this style of equipment uses only voltages low enough not to be a safety
hazard internally, although the power supply must out of necessity use dangerous mains voltage.
If an external power supply is used (usually via a power connector, often of coaxial type), the
equipment need not be designed with concern for hazardous voltages inside the enclosure. This
is particularly relevant for equipment with lightweight cases which may break and expose
internal electrical parts.
Heat reduction – Heat reduces reliability and longevity of electronic components, and can cause
sensitive circuits to become inaccurate or malfunction. A separate power supply removes a
source of heat from the apparatus.
Electrical noise reduction – Because radiated electrical noise falls off with the square of the
distance, it is to the manufacturer's advantage to convert potentially noisy AC line power or
automotive power to "clean", filtered DC in an external adapter, at a safe distance from noise-
sensitive circuitry.
Weight and size reduction – Removing power components and the mains connection plug from
equipment powered by rechargeable batteries reduces the weight and size which must be carried.
Ease of replacement – Power supplies are more prone to failure than other circuitry due to their
exposure to power spikes and their internal generation of waste heat. External power supplies
can be replaced quickly by a user without the need to have the powered device repaired.
3.14 Jumper Wire

Figure-3.13 Jumper wire


A jump wire (also known as jumper wire, or jumper) is an electrical wire, or group of them in a
cable, with a connector or pin at each end (or sometimes without them – simply “tinned”), which

27
is normally used to interconnect the components of a breadboard or other prototype or test
circuit, internally or with other equipment or components, without soldering.
Individual jump wires are fitted by inserting their “end connectors” into the slots provided in a
breadboard, the header connector of a circuit board, or a piece of test equipment.
Types

Jumper wires with crocodile clips


There are different types of jumper wires. Some have the same type of electrical connector at

both ends, while others have different connectors. Some common connectors are:
 Solid tips – are used to connect on/with a breadboard or female header connector. The
arrangement of the elements and ease of insertion on a breadboard allows increasing the
mounting density of both components and jump wires without fear of short-circuits. The jump
wires vary in size and colour to distinguish the different working signals.
 Crocodile clips – are used, among other applications, to temporarily bridge sensors, buttons and
other elements of prototypes with components or equipment that have arbitrary connectors,
wires, screw terminals, etc.
 Banana connectors – are commonly used on test equipment for DC and low-frequency AC
signals.
 Registered jack (RJnn) – are commonly used in telephone (RJ11) and computer networking
(RJ45).
 RCA connectors – are often used for audio, low-resolution composite video signals, or other
low-frequency applications requiring a shielded cable.

28
 RF connectors – are used to carry radio frequency signals between circuits, test equipment, and
antennas.
3.15 WIRE
Down to the wire (not comparable) (idiomatic) at the very end of a process or project, especially
one with a fast-approaching deadline. He was almost done with the paper, but tomorrow’s due
date meant it would be down to the wire.

Figure 3.14 wires


A wire is a single, usually cylindrical, flexible strand or rod of metal. Wires are used to bear
mechanical loads or electricity and telecommunications signals. Wire is commonly formed
by drawing the metal through a hole in a die or draw plate. Wire gauges come in
various standard sizes, as expressed in terms of a gauge number. The term wire is also used more
loosely to refer to a bundle of such strands, as in “multistanderd wire”, which is more correctly
termed a wire rope in mechanics, or a cable in electricity.
Wire comes in solid core, stranded, or braided forms. Although usually circular in cross-section,
wire can be made in square, hexagonal, flattened rectangular or other cross-sections, either for
decorative purposes, or for technical purposes such as high-efficiency voice
coils in loudspeakers. Edge-wound coil springs, such as the Slinky toy, are made of special
flattened wire.

29
CHAPTER-4

WORKING OF PASSWORD BASED DOOR LOCK SYSTEM

4.1 Working
The circuit of this project is very simple which contains arduino, keypad module, servo motor,
and LCD, arduino controls the complete processes like taking a password from the keypad
module comparing password rotating servo motor , and sending states of the LCD display. The
keypad is use for talking the password. Servo motor used for opening the gate while rotating and
LCD is used for displaying status or messages on it.

Figure 4.1 Circuit diagram

30
In this project, we have defined the default password “888” in the Arduino. You can change it
via coding. When we enter a password, it will match it with the password stored in the Arduino.
If it is correct, then it will show ‘Correct Password, Welcome’ and then rotate the servo motor to
180 doors as the door is opened. It will then give 5 seconds time for entering via the door. Once
5 seconds is completed, the door will get locked automatically.
If password is incorrect then door will not be open and it will show ‘incorrect Password’ on
LCD. In this system we use 16*2 LCD means 16 column and 2 rows. On the first row, ‘enter the
password’ will show and on the second row ‘door is closed’ will show. When you enter the
password then door will be open if password is correct. If password is incorrect then it will show
that ‘password is incorrect’. Next we use 4*4 keypad which is used for entering the password. In
this keypad 4 rows and 4 columns are present. Servomotor is used for rotating the door lock at
180 degree. Arduino is used for giving the instructions. And many other components are using
for making the password based door lock system like switch, battery, chatakani, jumper wires,
preset, ac adapter, push switch, Wires etc.
First of all, we start from the brain of this project which is the Arduino UNO board. The
Arduino board is connected to an LCD and a servo motor. The servo motor is used to push (lock)
or pull (unlock) the latch on the door. A 16 x 2 LCD is required to display the message by
Arduino, 16 x 2 means it has 16 numbers of columns and 2 numbers of rows.
Here, I am using a servomotor for making our customized door locker. It is a basic level servo
motor and works fine with Arduino without any driving circuit or external module. Also, the cost
of this servo motor is very less so you can easily afford to buy it. You can also check
this Arduino Servo Motor Control tutorial to learn more about the servo motor and how it works.
Connect the servo motor with Arduino Digital pin D9 and with a 5volt power supply. This servo
motor has a total of 3 input lines (GND, +5V & SIGNAL LINE).
In this project, I have used a 4 x 4 matrix keypad (but the 4 x 4 keypad part is not available in frit
zing for making this graphical representation), but don’t worry as 4 x 3 Matrix keypad also
works fine with my coding. We need a keypad for password input and manually lock our
customized door locker. It consists of 16 keys (soft switch) 4 keys in Rows (R1, R2, R3, R4) and
4 keys in Columns (C1, C2, C3, C4) when a key pressed, it establishes a connection in between
the corresponding rows and columns.
When we press the key Arduino gets the character now and then the character will save into the
Arduino memory and then you need to enter another three characters to enroll the password into
the system.
This is basically a user-defined password-based circuit breaker in the Arduino project where you
need to make your own password now how you can enter the password.

31
4.2 Connection table

Arduino UNO 4*4 Keypad

A0 Pin Row 1

A1 Pin Row 1

8 Pin Row 1

9 Pin Row 1

10 Pin Column 1

11 Pin Column 1

12 Pin Column 1

13 Pin Column 1

Arduino UNO 5V single channel Relay

+5V VCC

GND GND

2 Pin IN ( Input Pin )

Arduino UNO Buzzer

GND Negative

A4 Pin Positive

Arduino UNO 16*2 LCD 10K Potentiometer

GND VSS (Ground) Terminal 1

VDD
+5V Terminal 3
( +5V )

VEE
Terminal 2
( Contrast )

RS
7 Pin
( Register Select )

32
RW
GND
( Read\Write )

E
6 Pin
( Enable )

5 Pin D4

4 Pin D5

3 Pin D6

2 Pin D7

12 Volt Adaptor 5V single channel Relay 12 Volt Solenoid

Normally Open Positive (+ )

Positive Pin (+) Common

Normally Closed

Negative Pin ( – ) Negative( – )

Arduino UNO LED Resistor

A3 Anode Pin

Cathode Pin Terminal 1

GND Terminal 2

4.3 How does the keypad Arduino lock works?/ Working


 The system contents three devices- input, process, and output device. The input device is the
keypad.
 This will send all the input data to the next device which is Arduino.
 Arduino works here as a processing device.
 There is a matrix of 4×4 inside the keypad.
 And there are the 16 circuits when we press any key then anyone of the circuit will turn on.
If we press the A key then the circuit below the button will activate and send this
information to the Arduino.
Before the keypress, all the circuit is turned off. The row and column make the circuit with the
combination in a password-based door lock system using Arduino.
 When we press the key then the Arduino gets notified that which circuit is activated right
now.
 And there is a character assigned with the circuit which can be shown on the serial monitor

33
 If you have some basic knowledge then you can easily observe the character into the serial
monitor.
 And there may be errors occurred sometimes to get the right character which you can easily sort
out.
This is basically a user-defined password-based circuit breaker in the Arduino project where you
need to make your own password now how you can enter the password.
First, it will ask you the password to enroll then enter the 12345 into the password and now you
can make your own password and the process is given here.
When we press the key Arduino gets the character now and then the character will save into the
Arduino memory and then you need to enter another three characters to enroll the password into
the system.
And then you can make this password the current password. This is pretty easy if you have any
confusion to make the password we will give you the video in the last section of the post.

34
CHAPTER 5

ADVANTAGES AND DISADVANTAGES OF PASSWORD BASED DOOR


LOCK SYSTEM

5.1 ADVANTAGES OF PASSWORD BASED DOOR LOCK SYSTEM


USING ARDUINO

There are many benefits to choosing the keypad door lock.

1. Convenience of a Keypad Lock


The biggest advantage is convenience. It eliminates the necessity of keys. There’s no need to
carry them around, keep track of copies and spares, or change the door lock when a key is stolen
or misplaced .Children, guests and service providers can be given their own code or a temporary
code.
2. Higher Security
Keypad lock has a different hardware design than other types of locks. They don’t have cylinder
mechanisms, so they essentially cannot be picked or bumped like conventional locks. This keeps
the building more secure.
Instead of risking losing keys and having to rekey or change out the lock. With a keypad lock
system, it’s easy to change the security pin code whenever necessary.
3. Enhanced Durability
Traditional keys and locks wear down over time; it becomes more difficult to get it to turn and
function properly. Padlock for door is much more durable than conventional locks. A high-
quality keypad door lock should last longer with standard hardware.
4. Easy Digital Door Lock Installation
Many property owners in Malaysia think that if they want to install a keypad lock, they’ll have to
make major adjustments to door or frames. That’s not true. In most cases, padlock for door can
be easily installed on standard doors, just like any standard lock. Mechanical and battery-
powered keypad locks are available which don’t require connection to power source.
5. Integration with Access Control Systems
Keypad lock system can be used as part of an access control system. This allows companies to
restrict entry permission, even when using a correct code, during certain hours of the day or
night. Businesses can also place a keypad entry system within the interior of building. This
restricts access to certain parts of the facility. It’s handy for business owners who want to limit
employee access to certain parts of an office to certain parts of an office complex during certain
times of the day. Keypad lock is the best electronic door for their choice.

35
5.2 Disadvantages of Password based door lock system using arduino

1. High-Cost
Generally door lock costs are higher than the traditional door locks. Though there are numerous
options available in the market that meets every budget, but one has to consider that it varies
based on the different types of requirements and the quality of the product you choose.
Therefore, you have to weigh up accordingly.
2. High Installation Effort
Installing electronic door locks requires a lot of effort and a skilled commercial locksmith. While
installing, the cylinders must be measured, replaced and reassembled, the wall readers attached
to the intercom system or even require wiring the doors. There are various electronic lock
systems available in the market. However, some are complicated and some are easier to install
without any major modifications.
3. Power Failure
One of the main concerns for many people is getting locked out of the house because of the
power failure. Electronic door locks require electricity to function. But however few electronic
door lock systems work on rechargeable batteries they do not need electricity or an internet
connection to work.
4. Same Access Code
If you press the same access code buttons every day, the electronic door lock system starts to
wear out so, in order to prevent the wear and tear, you need to get in the habit of changing your
password at regular intervals.
5. Forgetting Your Password
Sometimes you just forget passwords for no reason therefore; you must choose passwords that
are easier to remember. It is favorable to choose some repetitive numbers or important dates
because if your code is too complicated or changed too often you can forget it easily.
5.3 Development
1. We can add finger print sensor so we can allow entry to authorised user only.
2. We can add fire and wind sensor in case of emergency the door will automatically open.

36
CHAPTER 6
CONCLUSION AND FUTURE SCOPE
6.1 CONCLUSION
Through in this project, we will operate the door lock with the help of keypad. That is, we will
type three numbers in our keypad and then our door lock will open. And then we type # in our
keypad then our door lock will be closed. In this way we can make the door lock of our house or
the door lock of our room smart. And in this way we can make simple door lock of our house as
password control door lock.

6.2 FUTURE SCOPE:


1. We can add finger print sensor so we can allow entry to authorised user only.
2. We can add fire and wind sensor in case of emergency the door will automatically open.

37
6.3 REFERENCE
1] Akshaya Krishnadas Bhat, Siddesh Praveen kini-“Password Enabled door locking system
using Arduino and IOT” from International Journal of Engineering Research and Techonology
,2018. ISSN 2278-0181

[2] Prof.A.Y.Prabhakar, Prof Dr.Shruti K , Nayan Shrivastava, Prakahar Shrivastava, Gharvit


wadhwa,”Password based door lock System” from International Research journal of Engineering
and Teconology,2019 .e-ISSN 2395-0056 p-ISSN 2395-0072

[3] Dr. Manish Kumar, Dr. Hanumantappa, Dr. T V Suresh Kumar, Mr.Amit Kumar Ojha.
“Android based smart door locking system with multi user and multiple function from
International Journal of Advanced Research in Computer and Communication Engineering, 2
October 2016. ISSN (online) 2278- 1021 ISSN(print) 2319-5940

[4] Shruti Jalapur, Afsha Maniyar, “Door Lock System using Cryptographic algorithm based on
IOT” from Computer Science and Engineering, Secab Instituite of Engineering and Technology
Karnatak ,India 07 july 2020. E-ISSN: 2395-0056 p-ISSN:2395-0072

38

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy