SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
1
MICROCONTROLLER BASED DIGITAL CODE
LOCK
PROJECT REPORT
SUBMITTED BY
KABIL DAS K
KRISHNA PRIYA VINOD M
KURIAN MATHEW
in partial fulfilment for the award of the degree
of
BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND COMMUNICATION
SREE NARAYANA GURUKULAM COLLEGE OF ENGINNERING,
KADAYIRUPPU
MG UNIVERSITY: KOTTAYAM
APRIL 2011
2
MG UNIVERSITY- KOTTAYAM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
BONAFIDE CERTIFICATE
Certified that this project report “MICROCONTROLLER BASED
DIGITAL CODE LOCK” is the bonafide work of “KABIL DAS K,
KRISHNA PRIYA VINOD M and KURIAN MATHEW ” who carried
out the project work under my supervision.
SIGNATURE SIGNATURE
PROF. ARUMUGASAMY Mr. DEEPAK.P
HEAD OF THE DEPARTMENT STAFF IN CHARGE
ELECTRONICS AND COMMUNICATION ENGINEERING ASST. PROFESSOR
SREE NARAYANA GURUKULAM COLLEGE OF ENGINEERING DEPARTMENT OF ECE
KADAYIRUPPU S.N.G.C.E
KOLENCHERY KADAYIRUPPU
3
ACKNOWLEDGEMENT
I extend my sincere thanks to Prof. Arumugasami, Head of the department for
providing me with the guidance and facilities for the mini project.
I express my sincere gratitude to mini project coordinator Mr. Deepak, staff in
charge, for their cooperation and guidance for preparing and presenting this
mini project.
I also extend my sincere thanks to all other faculty members of Electronics and
Communication Department and my friends for their support and
encouragement.
4
ABSTRACT
Security is a prime concern in our day-today life. Everyone wants to
be as much secure as possible. An access control for doors forms a
vital link in a security chain. The microcontroller based Door locker is
an access control system that allows only authorized persons to
access a restricted area. The system is fully controlled by the 8 bit
microcontroller AT89C2051 which has a 2Kbytes of ROM for the
program memory. The password is stored in the EPROM so that we can
change it at any time. The system has a Keypad by which the password
can be entered through it. When they entered password equals with the
password stored in the memory then the relay gets on and so that the door is
opened. If we entered a wrong password for more than three times then
the Alarm is switched on. When we go inside and come back then the
microcontroller will sense the person using the Laser light, the
microcontroller will automatically open the door for you.
5
TABLE OF CONTENTS
CHAPTER NO. TITLE PAGE NO.
1. INTRODUCTION 7
2. PROJECTDESCRIPTION 8
2.1 BLOCK DIAGRAM 8
2.2 BLOCK DIAGRAM EXPLANATION 8
3. CIRCUITDIAGRAM 17
3.1 MAIN CIRCUIT D IAGRAM 17
3.2 POWER SUPPLY 18
3.3 CIRCUIT EXPLANATION 18
4. FLOWCHART 19
5. ALGORITHM 20
6. PROGRAM 22
7. COMPONENTSDETAILS 40
7.1. RESISTOR 40
7.2 CAPACITOR 40
7.3 TRANSISTOR 41
7.4 DIODE 42
7.5. INTEGRATED CIRCUITS 42
8. PCB FABRICATION 46
9. APPLICATIONS 48
10. FUTURE ENHANCEMENT 49
11. CONCLUSION 49
12. REFERENCES 49
13. APPENDICES 50
6
LIST OFTABLES:
1. PIN DESCRIPTION OFAT89C2051
2. PORTALTERNATE FUNCTIONS
LIST OFFIGURES:
A. BLOCKDIAGRAM
B. PIN OUTOF AT89C2051
C. BLOCKDIAGRAM OF AT89C2051
D. PCB FBRICATION
E. FLOW CHART
F. PINOUT FOR IC LM7805
G. BLOCKDIAGRAM OFIC LM7805
H. PINOUT FOR BC547
7
1. INTRODUCTION
“Password Based Door Security System using Microcontroller” is used in the
places where we need more security. It can also used to secure lockers and other
protective doors.
Th e s ys t e m c o mp r i s e s a n u mb e r k e y p a d a n d t he k e y p a d s
a re c o n n e c t e d t o t h e 8 b i t microcontroller AT89C2051. This is one of
the popular Microcontrollers. It has only 20 pins and there are 15
input/output lines. The microcontroller has a program memory
of 2Kilobytes. The microcontroller continuously monitor the keypad
and if somebody enters the password it will check the entered password with
the password which was stored in the memory and if it they are same then
the microcontroller will switch on the corresponding device.
The system will allow the person who knows the password and it will
not allow who don‟t know the password and the system will also show
the persons who try to break the protection barrier.
8
2. PROJECT DESCRIPTION
2.1 BLOCKDIAGRAM
Figure:A
2.2 BLOCKDIAGRAM EXPLANATION
INTEL’S 8051 Architecture
The generic 8051 architecture sports a Harvard architecture, which contains
two separate buses for both program and data. So, it has two
distinctive memory spaces of 64K X 8 size for both program and data.
It is based on an 8 bit central processing unit with an 8 bit
Accumulator and another 8 bit B register as main processing
blocks. Other portions of the architecture include few 8 bit and 16 bit
registers and 8 bit memory locations. Each 8031 device has some
amount of data R A M b u i l t i n t he d e v i c e fo r i n t e r n a l
p r o c e s s i n g . T h i s a re a is us e d fo r s t a c k operations and
temporary storage of data. This base architecture is supported with on
chip peripheral functions like I/O ports, timers/counters, versatile serial
9
communication port. So it is clear that this 8051 architecture was designed to
cater many real time embedded needs.
The following list gives the features of the 8051 architecture:
Optimized 8 bit CPU for control applications.
Extensive Boolean processing capabilities.
64K Program Memory address space.
64K Data Memory address space.
128 bytes of on chip Data Memory.
32 Bi directional and individually addressable I/O lines.
Two 16 bit timer/counters.
Full Duplex UART.
6 source / 5 vectors interrupt structure with priority levels.
On chip clock oscillator.
Now you may be wondering about the non mentioning of
memory space meant for the program storage, the most important part of any
embedded controller. Originally this 8031 architecture was introduced with
on chip, `one time programmable' version of Program Memory of size 4K X
8. Intel delivered all these microcontrollers (8051) with user's program
fused inside the device. The memory portion was mapped at the
lower end of the Program Memory area. But, after getting
devices, customers couldn't change anything in their program code,
which was already made available inside during device fabrication. So, very
soon Intel introduced the 8031 devices (8751) with reprogrammable
type of Program Memory using built in EPROM of size 4K X 8.Like a
10
regular EPROM, this memory can be re programmed many times.
Later on Intel started manufacturing these 8031 devices without
any on chip Program Memory.
Central Processing Unit
The CPU is the brain of the microcontrollers reading user's
programs and executing the expected task as per instructions stored there in.
Its primary elements are an 8 bit Arithmetic Logic Unit (ALU),
Accumulator (Acc), few more 8 bit registers, B register, Stack
Pointer (SP), Program Status Word (PSW) and 16 bit registers,
Program Counter (PC) and Data Pointer Register (DPTR). The
ALU (Acc) performs arithmetic and logic functions on 8 bit input
variables. Arithmetic operations include basic addition, subtraction,
multiplication and division. Logical operations are AND, OR, Exclusive
OR as well as rotate, clear, complement and e t c . A p a r t fr o m a l l
t he a b o v e , A LU i s re s p o ns i b l e i n c o n d i t i o n a l b ra n c h i n g
decisions, and provides a temporary place in data transfer operations
within the d e v i c e . B re g i s t e r is ma i n l y u s e d i n mu l t i p l y a n d
d i v i d e o p e r a t i o n s . D u r i n g execution, B register either keeps one of
the two inputs or then retains a portion of the result. For other instructions, it
can be used as another general purpose register.
11
Timers/Counters
8031 has two 16 bit Timers/Counters capable of working in different
modes. Each consists of a `High' byte and a `Low' byte which
can be accessed under software. There is a mode control register
and a control register to configure these timers/counters in number
of ways. These timers can be used to measure time intervals,
determine pulse widths or initiate events with one microsecond resolution up to
a maximum of 65 millisecond (corresponding to 65, 536 counts). Use software
to get longer delays. Working as counter, they can accumulate
occurrences of external events (from DC to 500 KHz) with 16 bit precision.
In our project we are using 8 bit microcontroller AT89C2051,
it is the advanced 8 bit microcontroller from ATMEL, which
incorporates Flash Rom, and Timer etc.
Features ofAT89C2051:
Compatible with MCS-51 Products
2 Kbytes of Reprogrammable Flash Memory
Endurance: 1,000 Write/Erase Cycles
2.7 V to 6 V Operating Range
Fully Static Operation: 0 Hz to 24 MHz
Two-Level Program Memory Lock
128 x 8-Bit Internal RAM
15 Programmable I/O Lines
Two 16-Bit Timer/Counters
Six Interrupt Sources
12
Programmable Serial UART Channel
Direct LED Drive Outputs
On-Chip Analog Comparator
Low Power Idle and Power down Modes
DESCRIPTION
The AT89C2051 is a low-voltage, high-performance CMOS 8-
bitmicrocomputer with 2 Kbytes of Flash Programmable and
erasable read only memory (PEROM). The device is
manufactured using Atmel‟s high density non-volatile memory
technology and is compatible with the industry Standard MCS-51Ô instruction
set and pin out. By combining a versatile 8-bit CPU with Flash on a
monolithic chip, the Atmel AT89C2051 is a powerful
microcomputer which provides a highly flexible and cost effective
solution to many embedded control applications.
13
PIN CONFIGURATIONS OF 8051:
Figure :B
14
BLOCK DIAGRAM
Figure:C
15
PIN DESCRIPTION OF AT89C2051:
VCC Supply voltage.
GND Ground.
Port 1 Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2
to P1.7 provide internal pull-ups. P1.0 and P1.1 require
external pull-ups. P1.0 and P1.1also serve as the
positive input (AIN0) and the negative input (AIN1),
respectively, of the on-chip precision analog
comparator. The Port 1output buffers can sink 20 mA
and can drive LED displays directly. When 1s are
written to Port 1 pins, they can be used as inputs. When
pins P1.2 to P1.7 are used as inputs and are externally
pulled low, they will source current (IIL) because of
the internal pull-ups. Port 1 also receives code data during
Flash programming and program verification.
Port 3 Port 3 pins P3.0 to P3.5, P3.7 are seven
bidirectional I/O pins with internal pull-ups. P3.6 is
hard-wired as an input to the output of the on-chip
comparator and is not accessible as a general purpose I/O pin.
The Port 3 output buffers can sink 20 mA. When 1s are
written to Port 3pins they are pulled high by the
internal pull-ups and can be used as inputs. As
inputs, Port 3 pins that are externally being pulled low
will source current (IIL) because of the pull-ups.
Port 3 also serves the functions of various special
features of the AT89C2051 as listed below. Port 3 also
receives some control signals for Flash programming
and programming verification.
RST Reset input. All I/O pins are reset to 1s as soon
as RST goes high. Holding the RST pin high for two
machine cycles while the oscillator is running resets the
device. Each machine cycle takes 12 oscillator or clock
cycles
16
XTAL1 Input to the inverting oscillator amplifier and input to the
internal clock operating circuit.
XTAL2 Output from the inverting oscillator amplifier.
Table:1
PORT ALTERNATE FUNCTIONS:
Port Pin Alternate functions
P3.0 RXD (serial input port)
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
TABLE: 2
17
3. CIRCUIT DIAGRAM
3.1 MAIN CIRCUIT DIAGRAM
18
3.2POWER SUPPLY DIAGRAM
FIGURE:D
3.3.CIRCUIT DIAGRAM EXPLANATION
The Main Part of the above Circuit diagrams is the
Microcontroller AT89C2051. The Keypad was the input device and it was
connected in a matrix format so that the numbers of ports needed are reduced.
The Microcontroller reads a four-digit password through the Keypad.
Then the Microcontroller compares the four digit p a s s w o rd
w i t h t h e n u mb e r w h i c h i s p r e - p r o g r a m me d a n d i f i t i s
e q u a l t h e n t h e Microcontroller will switch on the motor for
the door and if we enter the wrong password for more than
three times then an alarm will be switched on until a right
password was pressed through the Keypad.
The Password was stored in the EEPROM and the password can be changed at
anytime using the same keypad. To change the password dial 12345
Old password - New Password. The power supply section is the
important one. It should deliver constant output regulated power supply
19
for successful working of the project. A 0-12V/500 mA transformer is used
for our purpose the primary of this transformer is connected in to main
supply through on/off switch& fuse for protecting from overload and short
circuit protection. The secondary is connected to the diodes convert from 12V
AC to 12V DC voltage. Which is further regulated to +5v, by using IC 7805
4. FLOWCHART
Figure:E
20
5. ALGORITM
1. START
2. initialise lcd , keypad
3. clearlcd
4. print “Enter lock code” onlcd
5. get 5 charlongpassword using matrixkeypad
6. if input = “12345” then
6.1print “Enter mastercode ”
6.2get 10 charlongpassword using matrixkey pad
6.3 if input = masterlock then
6.3.1change userpassword
6.3.2 go tostep 4
6.4else
6.4.1 print “ wrongcode” onlcd
6.4.2 go to step 4
7. else
7.1 if input = userlock orinput = default lock then
7.1.1unlock the lock
7.1.2retrycount = 3
7.1.3print “ „#‟to lock ”onlcd
21
7.1.4accept input using matrixkeypad
7.1.5ifinput = “ #” thenlock
7.1.6goto step 4
7.2else
7.2.1 decrement retrycount
7.2.2 print “ wrongcode ” onlcd
7.2.3ifretrycount = 0 then sound alarmon
7.2.4 go to step 4
8. STOP
22
6. PROGRAM
Delayprogram:
#include "delay.h"
void delayus(unsigned chardelay)
{
while(delay--);
}
void delayms(unsigned chardelay)
{
while(delay--)
delayus(149);
}
Keypad program:
#include "keypad.h"
#include "delay.h"
bit keystatus = FALSE;
void keypad_init()
{
keyport &=0x0F;
}
23
unsigned char getkey()
{
unsigned chari,j,k,key=0,temp;
k=1;
for(i=0;i<4;i++)
{
keyport &=~(0x80>>i);
temp = keyport;
temp &= 0x07;
if(7-temp)
{
if(!col1)
{
key= k+0;
while(!col1);
returnkey;
}
if(!col2)
{
key= k+1;
24
while(!col2);
returnkey;
}
if(!col3)
{
key= k+2;
while(!col3);
returnkey;
}
j++;
}
k+=3;
keyport |= 0x80>>i;
delayms(10);
}
return FALSE;
}
unsigned chartranslate(unsigned charkeyval)
{ if(keyval<10)
returnkeyval+'0';
25
else if(keyval==10)
return 'x';
else if(keyval==11)
return '0';
else if(keyval==12)
return 'e';
}
LCD program:
#include "lcd.h"
#include "delay.h"
#include <REG2051.H>
unsigned charcode lockicon[]={0xe, 0xa, 0x1f, 0x1f, 0x1b, 0x1b, 0xe, 0x0};
unsigned charcode unlockicon[]={0xe, 0x2, 0x1f, 0x1f, 0x1b, 0x1b, 0xe, 0x0};
unsigned charcode ex[]={0x1f, 0x1b, 0x1b, 0x1b, 0x1b, 0x1f, 0x1b, 0x1f};
unsigned charcode ok[]={0x0, 0x1, 0x3, 0x16, 0x1c, 0x8, 0x0, 0x0};
void lcd_reset()
{ lcd_port = 0xFF;
delayms(20);
lcd_port = 0x03+LCD_EN;
lcd_port = 0x03;
26
delayms(10);
lcd_port = 0x03+LCD_EN;
lcd_port = 0x03;
delayms(1);
lcd_port = 0x03+LCD_EN;
lcd_port = 0x03;
delayms(1);
lcd_port = 0x02+LCD_EN;
lcd_port = 0x02;
delayms(1);
}
void lcd_init ()
{ unsigned chari;
lcd_reset();
lcd_cmd(LCD_SETFUNCTION); // 4-bit mode - 1 line -5x7 font.
lcd_cmd(LCD_SETVISIBLE+0x04); //Displayno cursor -no blink.
lcd_cmd(LCD_SETMODE+0x02); //Automatic Increment -No Display
shift.
lcd_cmd(LCD_SETCGADDR);
for(i=0;i<8;i++)
lcd_data(lockicon[i]);
27
for(i=0;i<8;i++)
lcd_data(unlockicon[i]);
for(i=0;i<8;i++)
lcd_data(ex[i]);
for(i=0;i<8;i++)
lcd_data(ok[i]);
lcd_cmd(LCD_SETDDADDR); // Address DDRAM with0 offset 80h.
}
void lcd_cmd (char cmd)
{ lcd_port = ((cmd >> 4)& 0x0F)|LCD_EN;
lcd_port = ((cmd >> 4)& 0x0F);
lcd_port = (cmd & 0x0F)|LCD_EN;
lcd_port = (cmd & 0x0F);
delayus(200);
delayus(200);
}
void lcd_data (unsigned chardat)
{ lcd_port = (((dat >> 4)& 0x0F)|LCD_EN|LCD_RS);
lcd_port = (((dat >> 4)& 0x0F)|LCD_RS);
lcd_port = ((dat & 0x0F)|LCD_EN|LCD_RS);
28
lcd_port = ((dat & 0x0F)|LCD_RS);
delayus(200);
delayus(200);
}
void lcd_str(unsigned char *str)
{ while(*str){
lcd_data(*str++);
}
}
Lock program:
#include "keypad.h"
#include "lcd.h"
#include "delay.h"
#include "lock.h"
unsigned char code masterlock[10]="1234567890", defaultulock[5]="54321";
unsigned charuserlock[5], input[10];
externbit newlock;
bit check(unsigned char *first, unsigned char *second, unsigned charlen)
{
unsigned chari=0;
29
for(i=0;i<len;i++){
if(first[i]!=second[i])
return FALSE;
}
returnTRUE;
}
void setulock(){
charstatus;
retry:
lcd_cmd(LCD_CLS);
lcd_cmd(LCD_SETDDADDR);
lcd_str("EnterMastercode");
lcd_cmd(0xC0);
lcd_data(LOCK);
lcd_data(':');
status = getinput(10);
if(status == TRUE){
if(check(input,masterlock,10)){
retry1:
lcd_cmd(LCD_CLS);
30
lcd_str("Enternew code");
lcd_cmd(0xC0);
lcd_data(LOCK);
lcd_data(':');
status = getinput(5);
if(status == TRUE){
lcd_cmd(LCD_CLS);
lcd_data(OK);
lcd_str("lock code saved!");
newlock = TRUE;
store_code();
delayms(250);
delayms(250);
delayms(250);
delayms(250);
goto exit;
}
else if(status == RETRY)
goto retry1;
else if(status == EXIT)
31
goto exit;
}
else{
lcd_cmd(LCD_CLS);
lcd_str("WRONG CODE!");
delayms(250);
delayms(250);
delayms(250);
delayms(250);
goto exit;
}
}
else if(status == RETRY)
goto retry;
else if(status == EXIT)
goto exit;
exit:;
}
chargetinput(unsigned char max)
{ unsigned chari,key;
32
i=0;
while(1){
while(!(key=getkey()));
key= translate(key);
input[i]=key;
if(key=='x'){
if(i==0)
returnEXIT;
i--;
lcd_cmd(0xC2+i);
lcd_data('');
lcd_cmd(0xC2+i);
}
else if(key=='e')
{ returnTRUE;
}
else{
i++;
if(i>max){
lcd_cmd(LCD_CLS);
33
lcd_data(EX);
lcd_str("Code too Long...");
delayms(250);
delayms(250);
delayms(250);
delayms(250);
returnRETRY;
}
lcd_data('*');
} } }
void store_code(){
unsigned chari;
for(i=0;i<5;i++)
userlock[i]=input[i];
}
Mainprogram:
#include "lcd.h"
#include "keypad.h"
#include "lock.h"
#include "delay.h"
34
externunsigned char input[10], userlock[5];
externunsigned charcode defaultulock[5],masterlock[10];
bit newlock=FALSE;
unsigned charretrycount=3;
void main(){
unsigned charstatus,i=0;
bit lockstatus;
lcd_init();
keypad_init();
while(1){
lcd_cmd(LCD_CLS);
lcd_str("Enterlock code");
lcd_cmd(0xC0);
lcd_data(LOCK);
lcd_data(':');
status = getinput(5);
if(check(input,"12345",5)){
setulock();
35
goto done;
}
if(status == TRUE){
if(newlock)
lockstatus = check(input,userlock,5);
else
lockstatus = check(input,defaultulock,5);
if(lockstatus){
retrycount = 3;
lockpin= 0;
lcd_cmd(LCD_CLS);
lcd_data(OK);
lcd_str(" Lock is");
lcd_cmd(0xC0);
lcd_str("deactivated!");
delayms(250);
delayms(250);
delayms(250);
delayms(250);
lcd_cmd(LCD_CLS);
36
lcd_str("Press '#'keyto");
lcd_cmd(0xC0);
lcd_str("lock again!");
while(getkey()!=12);
lockpin= 1;
lcd_cmd(LCD_CLS);
lcd_data(OK);
lcd_str("Lock is active!");
delayms(250);
delayms(250);
delayms(250);
delayms(250);
}
else{
retrycount--;
lcd_cmd(LCD_CLS);
lcd_data(EX);
lcd_str("WrongCode!");
lcd_cmd(0xC0);
lcd_str("Tries left = ");
37
lcd_data('0'+retrycount);
delayms(250);
delayms(250);
delayms(250);
delayms(250);
if(retrycount==0){
blocked:
lcd_cmd(LCD_CLS);
lcd_data(EX);
lcd_str("BLOCKED");
for(i=0;i<150;i++)
{
bus=~bus;
delayms(250);
}
lcd_data(EX);
lcd_cmd(0xC0);
lcd_data(LOCK);
lcd_data(':');
status = getinput(10);
38
if(check(input,masterlock,10)){
retrycount=3;
lcd_cmd(LCD_CLS);
lcd_data(EX);
lcd_str("UNBLOCKED");
lcd_data(EX);
delayms(250);
delayms(250);
delayms(250);
delayms(250);
}
else{
lcd_cmd(LCD_CLS);
lcd_data(EX);
lcd_str("WRONG CODE");
lcd_data(EX);
delayms(250);
delayms(250);
delayms(250);
delayms(250);
39
goto blocked;
}
}
}
}
done:;
}
}
40
7. COMPONENTSDETAILS
7.1.Resistor:
Resistor is a component that resists the flow of direct or alternating electric
circuit. Resistors can limit or divide the current, reduce the
voltage, protect an electric circuit, or provide large amounts of heat
or light. An electric current is the mo v e me n t o f c ha r g e d
p a rt i c l e s c a l l e d e l e c t ro n s fr o m o n e re g i o n t o a n o t h e r.
Resistors are usually placed in electric circuits. Physicists explain the flow
of current through a material, such as a resistor, by comparing it to
water flowing through a pipe. Resistors are designed to have a specific
value of resistance. Resistors used in electric circuits are cylindrical. They are
often colour coded by three or four colour bands that indicate the specific value
of resistance. Resistors obey ohm‟s law, which s tates that the
current density is directly proportional to the electric field when the
temperature is constant.
7.2 Capacitor:
Capacitor or electric condenser is a device for storing an electric charge. The
simplest form of capacitor consists of two metal plates separated by a non
touching layer called the dielectric. When one plate is charged with
electricity from a direct current or electrostatic source, the other plate
have induced in it a charge of the opposite sign; that is, positive if the
original charge is negative and negative if the original charge is
41
positive. The electrical size of the capacitor is its capacitance.
Capacitors are limited in the amount of electric charge they can
absorb; they can c o n d u c t d i r e c t c u rr e n t fo r o n l y i n s t a n c e s
b u t fu n c t i o n w e l l a s c o n d uc t o rs i n alternating current circuits.
Fixed capacity and variable capacity capacitors are used i n c o n j u n c t i o n
w i t h c o i l s a s r e s o n a n t c i r c u i t s i n ra d i o s a n d o t h e r
e le c t ro n i c e q u i p me n t . C a p a c i t o rs a re p ro d uc e d i n a w i d e
v a r ie t y o f fo r ms . A i r, M ic a , Ceramics, Paper, Oil, and
Vacuums are used as dielectrics depending on the purpose for
which the device is intended.
7.3 Transistor:
Transistor is a device which transforms current flow from low
resistance path to high resistance path. It is capable of
performing many functions of the vacuum tube in electronic circuits,
the transistor is the solid state device consisting of a tiny piece of semi
conducting material, usually germanium or silicon, to which three or more
electrical connections are made.
N-type and P-type Transistor:
A germanium or silicon crystal, containing donor impurity atoms is called a
negative or n-type semiconductor to indicate the presence of
excess negatively charged electrons. The use of an acceptor impurity
produces a positive, or p-type semiconductor so called because of the
presence of positively charged holes. When an electrical voltage is applied,
the n-p junction acts as a rectifier, permitting current to flow in only one
42
direction. If the p-type region is connected to the positive terminal of the
battery and the n-type to the negative terminal, a large current flows
through the material across the junction.
7.4 Diode:
Diode is a electronic device that allows the passage of current in
only one d i r e c t i o n. T h e fi r s t s u c h d e v i c e s w e re v a c u u m -
t u b e d i o d e s , c o n s is t i n g o f a n evacuated glass or steel
envelope containing two electrodes – a cathode and an anode.
The diodes commonly used in electronic circuits are semiconductor
diodes. There are different diodes used in electronic circuits such as
Junction diode, Zener diode, Photo diodes, and tunnel diode.
Junction diodes consist of junction of two different kinds of
semiconductor material. The Zener diode is a special junction type
diode, using silicon, in which the voltage across the junction is independent
of the current through the junction.
7.5 Integrated circuits
Regulator IC (LM 7805):
The LM7805 monolithic 3-terminal positive voltage
regulators employ internal current-limiting, thermal shutdown and
safe-area compensation, making them essentially indestructible. If
adequate heat sinking is provided, they can deliver over 1.0A output
43
current. They are intended as fixed voltage regulators in a wide range of
applications including local (on-card) regulation for elimination
of noise and distribution problems associated with single-point regulation. In
addition t o us e a s fi x e d v o l t a g e re g u l a t o rs , t h e s e d e v i c e s
c a n b e us e d w i t h e x t e r n a l components to obtain adjustable
output voltages and currents. Considerable effort was expended to
make the entire series of regulators easy to use and minimize the
number of external components. It is not necessary to bypass the
output, although this does improve transient response. Input bypassing is
needed only if the regulator is located far from the filter capacitor of the power
supply.
Features:
Complete specifications at 1A load
Output voltage tolerances of ±2% at Tj = 25°
Line regulation of 0.01% of VOUT/V of VIN at 1A load
Load regulation of 0.3% of VOUT/A
Internal thermal overload protection
Internal short-circuit current limit
Output transistor safe area protection
PINOUT FOR LM7805:
44
FIGURE: F
BLOCK DIAGRAM FOR IC LM7805:
FIGURE: G
Relay Driver(BC547):
The BC547 transistor is an NPN Epitaxial Silicon Transistor. The BC547
transistor is a general-purpose transistor in small plastic packages. It is used in
general-purpose switching and amplification BC847/BC547 series 45 V, 100
mA NPN general-purpose transistors.
The BC547 transistor is an NPN bipolar transistor, in which the letters "N" and
"P" refer to the majority charge carriers inside the different regions of the
transistor. Most bipolar transistors used today are NPN, because electron
mobility is higher than whole mobility in semiconductors, allowing greater
currents and faster operation. NPN transistors consist of a layer of P-doped
45
semiconductor (the "base") between two N-doped layers. A small current
entering the base in common-emitter mode is amplified in the collector output.
In other terms, an NPN transistor is "on" when its base is pulled high relative to
the emitter. The arrow in the NPN transistor symbol is on the emitter leg and
points in the direction of the conventional current flow when the device is in
forward active mode. One mnemonic device for identifying the symbol for the
NPN transistor is "not pointing in." An NPN transistor can be considered as two
diodes with a shared anode region. In typical operation, the emitter base
junction is forward biased and the base collector junction is reverse biased. In
an NPN transistor, for example, when a positive voltage is applied to the base
emitter junction, the equilibrium between thermally generated carriers and the
repelling electric field of the depletion region becomes unbalanced, allowing
thermally excited electrons to inject into the base region. These electrons
wander (or "diffuse") through the base from the region of high concentration
near the emitter towards the region of low concentration near the collector. The
electrons in the base are called minority carriers because the base is doped p-
type which would make holes the majority carrier in the base
PINOUT FOR BC547:
Figure: H
46
8. PCB FABRICATION
The first step of assembling is to produce a printed circuit board. The
fabrication of the program counter plays a crucial role in the electronic field.
The success of the circuit is also dependent on the PCB. As far as the cost is
concerned, more than 25% of the total cost is for the PCB design and
fabrication.
The board is designed using a personal computer. The layout is drawn
using the software “Adobe PageMaker 6.5”. The layout is printed in a “buffer
sheet” using a laser procedure. First, a negative screen of the layout is
prepared with the help of a professional screen printer. Then the copper clad
sheet is kept under this screen. The screen printing ink is poured on the screen
and brushed through the top of the screen. The printed board is kept under
shade for few hours till the ink becomes dry.
The etching medium is prepared with the un-hydrous ferric chloride
water. The printed board is kept in this solution till the exposed copper
dissolves in the solution fully. After that the board is taken out and rinsed in
flowing water under a tap. The ink is removed with solder in order to prevent
oxidation.
Another screen, which contains component side layout, is prepared and
the same is printed on the component side of the board. A paper epoxy
laminate is used as the board. Both the component and the track layout of the
peripheral PCB is given at the end of this report.
47
PCB LAYOUT
48
COMPONENT LAYOUT
9. APPLICATIONS
Our electronic door lock performed as expected. We were able to implement all
the functions specified in our proposal. The biggest hurdle we had to overcome
with this project was interfacing the micro controller with the hardware
components. We fe e l t h a t t h i s e l e c t ro n i c d o o r l o c k is v e r y
ma r k e t a b l e b e c a us e it i s e a s y t o us e , comparatively
inexpensive due to low power consumption, and highly reliable. This
door lock is therefore particularly useful in applications such as hotel room door
locks, residential housing, and even office buildings.
49
10. FUTURE ENHANCEMENTS
 Electrical devices such as Lights, Computer etc can be
controlled by using separate passwords.
 The system can be easily connected to the personal computer for further
control.
Other than the speaker sounds, all the lights are made to turned on if
password entered is wrong for three times and also a hidden camera is used
to record the faces who trespassed.
We can use this system as an attendance register for the students to enter a
class room with their respective password.
11. CONCLUSION
This project is meant for security systems whose access is only for respected
authorities. Using a microcontroller the password entered is checked with the
stored password and then does the corresponding operations. Here we use a 5
digit password for better secrecy.
12. REFERENCES
 Electronic circuits and devices: J.B. Gupta.
 Op-amps and linear integrated circuits: Ramakanth A. Gayakward
 Integrated circuits : K.R. Botkar
 The 8051 microcontrollers: Muhammed Ali Mazidi
50
13. APPENDICES

Weitere ähnliche Inhalte

Was ist angesagt?

register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controllerNirbhay Singh
 
Overview of Crystal Oscillator Circuit Working and Its Application
Overview of Crystal Oscillator Circuit Working and Its ApplicationOverview of Crystal Oscillator Circuit Working and Its Application
Overview of Crystal Oscillator Circuit Working and Its Applicationelprocus
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking systemArjun Singh
 
Battery level Indicator Circuit
Battery level Indicator CircuitBattery level Indicator Circuit
Battery level Indicator CircuitUzair Ahmad
 
Electronics seminar topics
Electronics seminar topicsElectronics seminar topics
Electronics seminar topics123seminarsonly
 
Super sensitive intruder alarm
Super sensitive intruder alarmSuper sensitive intruder alarm
Super sensitive intruder alarmQuratulaintahir1
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic familiesBLESSINAR0
 
Microprocessor vs. microcontroller
Microprocessor vs. microcontrollerMicroprocessor vs. microcontroller
Microprocessor vs. microcontrolleraviban
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerGaurav Verma
 
water level controller using 8051 microcontroller
water level controller using 8051 microcontrollerwater level controller using 8051 microcontroller
water level controller using 8051 microcontrollerPrachi Pandey
 
Project report on signal jammer
Project report on signal jammerProject report on signal jammer
Project report on signal jammerARYAN KUMAR
 
Micro Processor Mini Project,Electronic Quiz Table
Micro Processor Mini Project,Electronic Quiz TableMicro Processor Mini Project,Electronic Quiz Table
Micro Processor Mini Project,Electronic Quiz TableSubhashini Sundaram
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor LogicDiwaker Pant
 
PPT ON PCB DESIGN INTERNSHIP
PPT ON PCB DESIGN INTERNSHIPPPT ON PCB DESIGN INTERNSHIP
PPT ON PCB DESIGN INTERNSHIPSujoyHalder4
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller pptRahul Kumar
 
transistor transistor logic
transistor transistor logictransistor transistor logic
transistor transistor logicmansi acharya
 

Was ist angesagt? (20)

Traffic light controller
Traffic light controllerTraffic light controller
Traffic light controller
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controller
 
SERVO MOTOR CONTROLLER
SERVO MOTOR CONTROLLERSERVO MOTOR CONTROLLER
SERVO MOTOR CONTROLLER
 
Overview of Crystal Oscillator Circuit Working and Its Application
Overview of Crystal Oscillator Circuit Working and Its ApplicationOverview of Crystal Oscillator Circuit Working and Its Application
Overview of Crystal Oscillator Circuit Working and Its Application
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking system
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
Battery level Indicator Circuit
Battery level Indicator CircuitBattery level Indicator Circuit
Battery level Indicator Circuit
 
Electronics seminar topics
Electronics seminar topicsElectronics seminar topics
Electronics seminar topics
 
Super sensitive intruder alarm
Super sensitive intruder alarmSuper sensitive intruder alarm
Super sensitive intruder alarm
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic families
 
Microprocessor vs. microcontroller
Microprocessor vs. microcontrollerMicroprocessor vs. microcontroller
Microprocessor vs. microcontroller
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
 
water level controller using 8051 microcontroller
water level controller using 8051 microcontrollerwater level controller using 8051 microcontroller
water level controller using 8051 microcontroller
 
Ultrasonic sensor
Ultrasonic sensorUltrasonic sensor
Ultrasonic sensor
 
Project report on signal jammer
Project report on signal jammerProject report on signal jammer
Project report on signal jammer
 
Micro Processor Mini Project,Electronic Quiz Table
Micro Processor Mini Project,Electronic Quiz TableMicro Processor Mini Project,Electronic Quiz Table
Micro Processor Mini Project,Electronic Quiz Table
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
PPT ON PCB DESIGN INTERNSHIP
PPT ON PCB DESIGN INTERNSHIPPPT ON PCB DESIGN INTERNSHIP
PPT ON PCB DESIGN INTERNSHIP
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
transistor transistor logic
transistor transistor logictransistor transistor logic
transistor transistor logic
 

Ähnlich wie Microcontroller based digital code lock report 2

EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentseceprinter6
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Report on Embedded Based Home security system
Report on Embedded Based Home security systemReport on Embedded Based Home security system
Report on Embedded Based Home security systemNIT srinagar
 
electronic voting machine by rfid
electronic voting machine by rfidelectronic voting machine by rfid
electronic voting machine by rfidSaurabh Uniyal
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...Claude Ndayisenga
 
Wireless appliances control report
Wireless appliances control reportWireless appliances control report
Wireless appliances control reportengineerssolution
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolIJERA Editor
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesPrabhu Mali
 
Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310Hari Prakash
 
Micro Processor Lab Manual!
Micro Processor Lab Manual!Micro Processor Lab Manual!
Micro Processor Lab Manual!PRABHAHARAN429
 
Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Siang Wei Lee
 
8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)HarshitParkar6677
 

Ähnlich wie Microcontroller based digital code lock report 2 (20)

AT89 S52
AT89 S52AT89 S52
AT89 S52
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
GOWTHAM REPORT
GOWTHAM REPORTGOWTHAM REPORT
GOWTHAM REPORT
 
Report on Embedded Based Home security system
Report on Embedded Based Home security systemReport on Embedded Based Home security system
Report on Embedded Based Home security system
 
electronic voting machine by rfid
electronic voting machine by rfidelectronic voting machine by rfid
electronic voting machine by rfid
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...Design and implementation of real time security guard robot using GSM/CDMA ne...
Design and implementation of real time security guard robot using GSM/CDMA ne...
 
Wireless appliances control report
Wireless appliances control reportWireless appliances control report
Wireless appliances control report
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notes
 
8085 notes g scheme 2016
8085 notes g scheme 20168085 notes g scheme 2016
8085 notes g scheme 2016
 
Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310
 
Micro Processor Lab Manual!
Micro Processor Lab Manual!Micro Processor Lab Manual!
Micro Processor Lab Manual!
 
Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)
 
8085 notes g scheme 2016
8085 notes g scheme 20168085 notes g scheme 2016
8085 notes g scheme 2016
 
8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)
 
Smart home
Smart homeSmart home
Smart home
 
Smart home copy
Smart home   copySmart home   copy
Smart home copy
 
Smart home
Smart homeSmart home
Smart home
 

Kürzlich hochgeladen

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Kürzlich hochgeladen (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Microcontroller based digital code lock report 2

  • 1. 1 MICROCONTROLLER BASED DIGITAL CODE LOCK PROJECT REPORT SUBMITTED BY KABIL DAS K KRISHNA PRIYA VINOD M KURIAN MATHEW in partial fulfilment for the award of the degree of BACHELOR OF TECHNOLOGY In ELECTRONICS AND COMMUNICATION SREE NARAYANA GURUKULAM COLLEGE OF ENGINNERING, KADAYIRUPPU MG UNIVERSITY: KOTTAYAM APRIL 2011
  • 2. 2 MG UNIVERSITY- KOTTAYAM DEPARTMENT OF ELECTRONICS AND COMMUNICATION BONAFIDE CERTIFICATE Certified that this project report “MICROCONTROLLER BASED DIGITAL CODE LOCK” is the bonafide work of “KABIL DAS K, KRISHNA PRIYA VINOD M and KURIAN MATHEW ” who carried out the project work under my supervision. SIGNATURE SIGNATURE PROF. ARUMUGASAMY Mr. DEEPAK.P HEAD OF THE DEPARTMENT STAFF IN CHARGE ELECTRONICS AND COMMUNICATION ENGINEERING ASST. PROFESSOR SREE NARAYANA GURUKULAM COLLEGE OF ENGINEERING DEPARTMENT OF ECE KADAYIRUPPU S.N.G.C.E KOLENCHERY KADAYIRUPPU
  • 3. 3 ACKNOWLEDGEMENT I extend my sincere thanks to Prof. Arumugasami, Head of the department for providing me with the guidance and facilities for the mini project. I express my sincere gratitude to mini project coordinator Mr. Deepak, staff in charge, for their cooperation and guidance for preparing and presenting this mini project. I also extend my sincere thanks to all other faculty members of Electronics and Communication Department and my friends for their support and encouragement.
  • 4. 4 ABSTRACT Security is a prime concern in our day-today life. Everyone wants to be as much secure as possible. An access control for doors forms a vital link in a security chain. The microcontroller based Door locker is an access control system that allows only authorized persons to access a restricted area. The system is fully controlled by the 8 bit microcontroller AT89C2051 which has a 2Kbytes of ROM for the program memory. The password is stored in the EPROM so that we can change it at any time. The system has a Keypad by which the password can be entered through it. When they entered password equals with the password stored in the memory then the relay gets on and so that the door is opened. If we entered a wrong password for more than three times then the Alarm is switched on. When we go inside and come back then the microcontroller will sense the person using the Laser light, the microcontroller will automatically open the door for you.
  • 5. 5 TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. 1. INTRODUCTION 7 2. PROJECTDESCRIPTION 8 2.1 BLOCK DIAGRAM 8 2.2 BLOCK DIAGRAM EXPLANATION 8 3. CIRCUITDIAGRAM 17 3.1 MAIN CIRCUIT D IAGRAM 17 3.2 POWER SUPPLY 18 3.3 CIRCUIT EXPLANATION 18 4. FLOWCHART 19 5. ALGORITHM 20 6. PROGRAM 22 7. COMPONENTSDETAILS 40 7.1. RESISTOR 40 7.2 CAPACITOR 40 7.3 TRANSISTOR 41 7.4 DIODE 42 7.5. INTEGRATED CIRCUITS 42 8. PCB FABRICATION 46 9. APPLICATIONS 48 10. FUTURE ENHANCEMENT 49 11. CONCLUSION 49 12. REFERENCES 49 13. APPENDICES 50
  • 6. 6 LIST OFTABLES: 1. PIN DESCRIPTION OFAT89C2051 2. PORTALTERNATE FUNCTIONS LIST OFFIGURES: A. BLOCKDIAGRAM B. PIN OUTOF AT89C2051 C. BLOCKDIAGRAM OF AT89C2051 D. PCB FBRICATION E. FLOW CHART F. PINOUT FOR IC LM7805 G. BLOCKDIAGRAM OFIC LM7805 H. PINOUT FOR BC547
  • 7. 7 1. INTRODUCTION “Password Based Door Security System using Microcontroller” is used in the places where we need more security. It can also used to secure lockers and other protective doors. Th e s ys t e m c o mp r i s e s a n u mb e r k e y p a d a n d t he k e y p a d s a re c o n n e c t e d t o t h e 8 b i t microcontroller AT89C2051. This is one of the popular Microcontrollers. It has only 20 pins and there are 15 input/output lines. The microcontroller has a program memory of 2Kilobytes. The microcontroller continuously monitor the keypad and if somebody enters the password it will check the entered password with the password which was stored in the memory and if it they are same then the microcontroller will switch on the corresponding device. The system will allow the person who knows the password and it will not allow who don‟t know the password and the system will also show the persons who try to break the protection barrier.
  • 8. 8 2. PROJECT DESCRIPTION 2.1 BLOCKDIAGRAM Figure:A 2.2 BLOCKDIAGRAM EXPLANATION INTEL’S 8051 Architecture The generic 8051 architecture sports a Harvard architecture, which contains two separate buses for both program and data. So, it has two distinctive memory spaces of 64K X 8 size for both program and data. It is based on an 8 bit central processing unit with an 8 bit Accumulator and another 8 bit B register as main processing blocks. Other portions of the architecture include few 8 bit and 16 bit registers and 8 bit memory locations. Each 8031 device has some amount of data R A M b u i l t i n t he d e v i c e fo r i n t e r n a l p r o c e s s i n g . T h i s a re a is us e d fo r s t a c k operations and temporary storage of data. This base architecture is supported with on chip peripheral functions like I/O ports, timers/counters, versatile serial
  • 9. 9 communication port. So it is clear that this 8051 architecture was designed to cater many real time embedded needs. The following list gives the features of the 8051 architecture: Optimized 8 bit CPU for control applications. Extensive Boolean processing capabilities. 64K Program Memory address space. 64K Data Memory address space. 128 bytes of on chip Data Memory. 32 Bi directional and individually addressable I/O lines. Two 16 bit timer/counters. Full Duplex UART. 6 source / 5 vectors interrupt structure with priority levels. On chip clock oscillator. Now you may be wondering about the non mentioning of memory space meant for the program storage, the most important part of any embedded controller. Originally this 8031 architecture was introduced with on chip, `one time programmable' version of Program Memory of size 4K X 8. Intel delivered all these microcontrollers (8051) with user's program fused inside the device. The memory portion was mapped at the lower end of the Program Memory area. But, after getting devices, customers couldn't change anything in their program code, which was already made available inside during device fabrication. So, very soon Intel introduced the 8031 devices (8751) with reprogrammable type of Program Memory using built in EPROM of size 4K X 8.Like a
  • 10. 10 regular EPROM, this memory can be re programmed many times. Later on Intel started manufacturing these 8031 devices without any on chip Program Memory. Central Processing Unit The CPU is the brain of the microcontrollers reading user's programs and executing the expected task as per instructions stored there in. Its primary elements are an 8 bit Arithmetic Logic Unit (ALU), Accumulator (Acc), few more 8 bit registers, B register, Stack Pointer (SP), Program Status Word (PSW) and 16 bit registers, Program Counter (PC) and Data Pointer Register (DPTR). The ALU (Acc) performs arithmetic and logic functions on 8 bit input variables. Arithmetic operations include basic addition, subtraction, multiplication and division. Logical operations are AND, OR, Exclusive OR as well as rotate, clear, complement and e t c . A p a r t fr o m a l l t he a b o v e , A LU i s re s p o ns i b l e i n c o n d i t i o n a l b ra n c h i n g decisions, and provides a temporary place in data transfer operations within the d e v i c e . B re g i s t e r is ma i n l y u s e d i n mu l t i p l y a n d d i v i d e o p e r a t i o n s . D u r i n g execution, B register either keeps one of the two inputs or then retains a portion of the result. For other instructions, it can be used as another general purpose register.
  • 11. 11 Timers/Counters 8031 has two 16 bit Timers/Counters capable of working in different modes. Each consists of a `High' byte and a `Low' byte which can be accessed under software. There is a mode control register and a control register to configure these timers/counters in number of ways. These timers can be used to measure time intervals, determine pulse widths or initiate events with one microsecond resolution up to a maximum of 65 millisecond (corresponding to 65, 536 counts). Use software to get longer delays. Working as counter, they can accumulate occurrences of external events (from DC to 500 KHz) with 16 bit precision. In our project we are using 8 bit microcontroller AT89C2051, it is the advanced 8 bit microcontroller from ATMEL, which incorporates Flash Rom, and Timer etc. Features ofAT89C2051: Compatible with MCS-51 Products 2 Kbytes of Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles 2.7 V to 6 V Operating Range Fully Static Operation: 0 Hz to 24 MHz Two-Level Program Memory Lock 128 x 8-Bit Internal RAM 15 Programmable I/O Lines Two 16-Bit Timer/Counters Six Interrupt Sources
  • 12. 12 Programmable Serial UART Channel Direct LED Drive Outputs On-Chip Analog Comparator Low Power Idle and Power down Modes DESCRIPTION The AT89C2051 is a low-voltage, high-performance CMOS 8- bitmicrocomputer with 2 Kbytes of Flash Programmable and erasable read only memory (PEROM). The device is manufactured using Atmel‟s high density non-volatile memory technology and is compatible with the industry Standard MCS-51Ô instruction set and pin out. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.
  • 13. 13 PIN CONFIGURATIONS OF 8051: Figure :B
  • 15. 15 PIN DESCRIPTION OF AT89C2051: VCC Supply voltage. GND Ground. Port 1 Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1output buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pull-ups. Port 1 also receives code data during Flash programming and program verification. Port 3 Port 3 pins P3.0 to P3.5, P3.7 are seven bidirectional I/O pins with internal pull-ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C2051 as listed below. Port 3 also receives some control signals for Flash programming and programming verification. RST Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin high for two machine cycles while the oscillator is running resets the device. Each machine cycle takes 12 oscillator or clock cycles
  • 16. 16 XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. Table:1 PORT ALTERNATE FUNCTIONS: Port Pin Alternate functions P3.0 RXD (serial input port) P3.1 TXD (serial output port) P3.2 INT0 (external interrupt 0) P3.3 INT1 (external interrupt 1) P3.4 T0 (timer 0 external input) TABLE: 2
  • 17. 17 3. CIRCUIT DIAGRAM 3.1 MAIN CIRCUIT DIAGRAM
  • 18. 18 3.2POWER SUPPLY DIAGRAM FIGURE:D 3.3.CIRCUIT DIAGRAM EXPLANATION The Main Part of the above Circuit diagrams is the Microcontroller AT89C2051. The Keypad was the input device and it was connected in a matrix format so that the numbers of ports needed are reduced. The Microcontroller reads a four-digit password through the Keypad. Then the Microcontroller compares the four digit p a s s w o rd w i t h t h e n u mb e r w h i c h i s p r e - p r o g r a m me d a n d i f i t i s e q u a l t h e n t h e Microcontroller will switch on the motor for the door and if we enter the wrong password for more than three times then an alarm will be switched on until a right password was pressed through the Keypad. The Password was stored in the EEPROM and the password can be changed at anytime using the same keypad. To change the password dial 12345 Old password - New Password. The power supply section is the important one. It should deliver constant output regulated power supply
  • 19. 19 for successful working of the project. A 0-12V/500 mA transformer is used for our purpose the primary of this transformer is connected in to main supply through on/off switch& fuse for protecting from overload and short circuit protection. The secondary is connected to the diodes convert from 12V AC to 12V DC voltage. Which is further regulated to +5v, by using IC 7805 4. FLOWCHART Figure:E
  • 20. 20 5. ALGORITM 1. START 2. initialise lcd , keypad 3. clearlcd 4. print “Enter lock code” onlcd 5. get 5 charlongpassword using matrixkeypad 6. if input = “12345” then 6.1print “Enter mastercode ” 6.2get 10 charlongpassword using matrixkey pad 6.3 if input = masterlock then 6.3.1change userpassword 6.3.2 go tostep 4 6.4else 6.4.1 print “ wrongcode” onlcd 6.4.2 go to step 4 7. else 7.1 if input = userlock orinput = default lock then 7.1.1unlock the lock 7.1.2retrycount = 3 7.1.3print “ „#‟to lock ”onlcd
  • 21. 21 7.1.4accept input using matrixkeypad 7.1.5ifinput = “ #” thenlock 7.1.6goto step 4 7.2else 7.2.1 decrement retrycount 7.2.2 print “ wrongcode ” onlcd 7.2.3ifretrycount = 0 then sound alarmon 7.2.4 go to step 4 8. STOP
  • 22. 22 6. PROGRAM Delayprogram: #include "delay.h" void delayus(unsigned chardelay) { while(delay--); } void delayms(unsigned chardelay) { while(delay--) delayus(149); } Keypad program: #include "keypad.h" #include "delay.h" bit keystatus = FALSE; void keypad_init() { keyport &=0x0F; }
  • 23. 23 unsigned char getkey() { unsigned chari,j,k,key=0,temp; k=1; for(i=0;i<4;i++) { keyport &=~(0x80>>i); temp = keyport; temp &= 0x07; if(7-temp) { if(!col1) { key= k+0; while(!col1); returnkey; } if(!col2) { key= k+1;
  • 24. 24 while(!col2); returnkey; } if(!col3) { key= k+2; while(!col3); returnkey; } j++; } k+=3; keyport |= 0x80>>i; delayms(10); } return FALSE; } unsigned chartranslate(unsigned charkeyval) { if(keyval<10) returnkeyval+'0';
  • 25. 25 else if(keyval==10) return 'x'; else if(keyval==11) return '0'; else if(keyval==12) return 'e'; } LCD program: #include "lcd.h" #include "delay.h" #include <REG2051.H> unsigned charcode lockicon[]={0xe, 0xa, 0x1f, 0x1f, 0x1b, 0x1b, 0xe, 0x0}; unsigned charcode unlockicon[]={0xe, 0x2, 0x1f, 0x1f, 0x1b, 0x1b, 0xe, 0x0}; unsigned charcode ex[]={0x1f, 0x1b, 0x1b, 0x1b, 0x1b, 0x1f, 0x1b, 0x1f}; unsigned charcode ok[]={0x0, 0x1, 0x3, 0x16, 0x1c, 0x8, 0x0, 0x0}; void lcd_reset() { lcd_port = 0xFF; delayms(20); lcd_port = 0x03+LCD_EN; lcd_port = 0x03;
  • 26. 26 delayms(10); lcd_port = 0x03+LCD_EN; lcd_port = 0x03; delayms(1); lcd_port = 0x03+LCD_EN; lcd_port = 0x03; delayms(1); lcd_port = 0x02+LCD_EN; lcd_port = 0x02; delayms(1); } void lcd_init () { unsigned chari; lcd_reset(); lcd_cmd(LCD_SETFUNCTION); // 4-bit mode - 1 line -5x7 font. lcd_cmd(LCD_SETVISIBLE+0x04); //Displayno cursor -no blink. lcd_cmd(LCD_SETMODE+0x02); //Automatic Increment -No Display shift. lcd_cmd(LCD_SETCGADDR); for(i=0;i<8;i++) lcd_data(lockicon[i]);
  • 27. 27 for(i=0;i<8;i++) lcd_data(unlockicon[i]); for(i=0;i<8;i++) lcd_data(ex[i]); for(i=0;i<8;i++) lcd_data(ok[i]); lcd_cmd(LCD_SETDDADDR); // Address DDRAM with0 offset 80h. } void lcd_cmd (char cmd) { lcd_port = ((cmd >> 4)& 0x0F)|LCD_EN; lcd_port = ((cmd >> 4)& 0x0F); lcd_port = (cmd & 0x0F)|LCD_EN; lcd_port = (cmd & 0x0F); delayus(200); delayus(200); } void lcd_data (unsigned chardat) { lcd_port = (((dat >> 4)& 0x0F)|LCD_EN|LCD_RS); lcd_port = (((dat >> 4)& 0x0F)|LCD_RS); lcd_port = ((dat & 0x0F)|LCD_EN|LCD_RS);
  • 28. 28 lcd_port = ((dat & 0x0F)|LCD_RS); delayus(200); delayus(200); } void lcd_str(unsigned char *str) { while(*str){ lcd_data(*str++); } } Lock program: #include "keypad.h" #include "lcd.h" #include "delay.h" #include "lock.h" unsigned char code masterlock[10]="1234567890", defaultulock[5]="54321"; unsigned charuserlock[5], input[10]; externbit newlock; bit check(unsigned char *first, unsigned char *second, unsigned charlen) { unsigned chari=0;
  • 30. 30 lcd_str("Enternew code"); lcd_cmd(0xC0); lcd_data(LOCK); lcd_data(':'); status = getinput(5); if(status == TRUE){ lcd_cmd(LCD_CLS); lcd_data(OK); lcd_str("lock code saved!"); newlock = TRUE; store_code(); delayms(250); delayms(250); delayms(250); delayms(250); goto exit; } else if(status == RETRY) goto retry1; else if(status == EXIT)
  • 31. 31 goto exit; } else{ lcd_cmd(LCD_CLS); lcd_str("WRONG CODE!"); delayms(250); delayms(250); delayms(250); delayms(250); goto exit; } } else if(status == RETRY) goto retry; else if(status == EXIT) goto exit; exit:; } chargetinput(unsigned char max) { unsigned chari,key;
  • 33. 33 lcd_data(EX); lcd_str("Code too Long..."); delayms(250); delayms(250); delayms(250); delayms(250); returnRETRY; } lcd_data('*'); } } } void store_code(){ unsigned chari; for(i=0;i<5;i++) userlock[i]=input[i]; } Mainprogram: #include "lcd.h" #include "keypad.h" #include "lock.h" #include "delay.h"
  • 34. 34 externunsigned char input[10], userlock[5]; externunsigned charcode defaultulock[5],masterlock[10]; bit newlock=FALSE; unsigned charretrycount=3; void main(){ unsigned charstatus,i=0; bit lockstatus; lcd_init(); keypad_init(); while(1){ lcd_cmd(LCD_CLS); lcd_str("Enterlock code"); lcd_cmd(0xC0); lcd_data(LOCK); lcd_data(':'); status = getinput(5); if(check(input,"12345",5)){ setulock();
  • 35. 35 goto done; } if(status == TRUE){ if(newlock) lockstatus = check(input,userlock,5); else lockstatus = check(input,defaultulock,5); if(lockstatus){ retrycount = 3; lockpin= 0; lcd_cmd(LCD_CLS); lcd_data(OK); lcd_str(" Lock is"); lcd_cmd(0xC0); lcd_str("deactivated!"); delayms(250); delayms(250); delayms(250); delayms(250); lcd_cmd(LCD_CLS);
  • 36. 36 lcd_str("Press '#'keyto"); lcd_cmd(0xC0); lcd_str("lock again!"); while(getkey()!=12); lockpin= 1; lcd_cmd(LCD_CLS); lcd_data(OK); lcd_str("Lock is active!"); delayms(250); delayms(250); delayms(250); delayms(250); } else{ retrycount--; lcd_cmd(LCD_CLS); lcd_data(EX); lcd_str("WrongCode!"); lcd_cmd(0xC0); lcd_str("Tries left = ");
  • 40. 40 7. COMPONENTSDETAILS 7.1.Resistor: Resistor is a component that resists the flow of direct or alternating electric circuit. Resistors can limit or divide the current, reduce the voltage, protect an electric circuit, or provide large amounts of heat or light. An electric current is the mo v e me n t o f c ha r g e d p a rt i c l e s c a l l e d e l e c t ro n s fr o m o n e re g i o n t o a n o t h e r. Resistors are usually placed in electric circuits. Physicists explain the flow of current through a material, such as a resistor, by comparing it to water flowing through a pipe. Resistors are designed to have a specific value of resistance. Resistors used in electric circuits are cylindrical. They are often colour coded by three or four colour bands that indicate the specific value of resistance. Resistors obey ohm‟s law, which s tates that the current density is directly proportional to the electric field when the temperature is constant. 7.2 Capacitor: Capacitor or electric condenser is a device for storing an electric charge. The simplest form of capacitor consists of two metal plates separated by a non touching layer called the dielectric. When one plate is charged with electricity from a direct current or electrostatic source, the other plate have induced in it a charge of the opposite sign; that is, positive if the original charge is negative and negative if the original charge is
  • 41. 41 positive. The electrical size of the capacitor is its capacitance. Capacitors are limited in the amount of electric charge they can absorb; they can c o n d u c t d i r e c t c u rr e n t fo r o n l y i n s t a n c e s b u t fu n c t i o n w e l l a s c o n d uc t o rs i n alternating current circuits. Fixed capacity and variable capacity capacitors are used i n c o n j u n c t i o n w i t h c o i l s a s r e s o n a n t c i r c u i t s i n ra d i o s a n d o t h e r e le c t ro n i c e q u i p me n t . C a p a c i t o rs a re p ro d uc e d i n a w i d e v a r ie t y o f fo r ms . A i r, M ic a , Ceramics, Paper, Oil, and Vacuums are used as dielectrics depending on the purpose for which the device is intended. 7.3 Transistor: Transistor is a device which transforms current flow from low resistance path to high resistance path. It is capable of performing many functions of the vacuum tube in electronic circuits, the transistor is the solid state device consisting of a tiny piece of semi conducting material, usually germanium or silicon, to which three or more electrical connections are made. N-type and P-type Transistor: A germanium or silicon crystal, containing donor impurity atoms is called a negative or n-type semiconductor to indicate the presence of excess negatively charged electrons. The use of an acceptor impurity produces a positive, or p-type semiconductor so called because of the presence of positively charged holes. When an electrical voltage is applied, the n-p junction acts as a rectifier, permitting current to flow in only one
  • 42. 42 direction. If the p-type region is connected to the positive terminal of the battery and the n-type to the negative terminal, a large current flows through the material across the junction. 7.4 Diode: Diode is a electronic device that allows the passage of current in only one d i r e c t i o n. T h e fi r s t s u c h d e v i c e s w e re v a c u u m - t u b e d i o d e s , c o n s is t i n g o f a n evacuated glass or steel envelope containing two electrodes – a cathode and an anode. The diodes commonly used in electronic circuits are semiconductor diodes. There are different diodes used in electronic circuits such as Junction diode, Zener diode, Photo diodes, and tunnel diode. Junction diodes consist of junction of two different kinds of semiconductor material. The Zener diode is a special junction type diode, using silicon, in which the voltage across the junction is independent of the current through the junction. 7.5 Integrated circuits Regulator IC (LM 7805): The LM7805 monolithic 3-terminal positive voltage regulators employ internal current-limiting, thermal shutdown and safe-area compensation, making them essentially indestructible. If adequate heat sinking is provided, they can deliver over 1.0A output
  • 43. 43 current. They are intended as fixed voltage regulators in a wide range of applications including local (on-card) regulation for elimination of noise and distribution problems associated with single-point regulation. In addition t o us e a s fi x e d v o l t a g e re g u l a t o rs , t h e s e d e v i c e s c a n b e us e d w i t h e x t e r n a l components to obtain adjustable output voltages and currents. Considerable effort was expended to make the entire series of regulators easy to use and minimize the number of external components. It is not necessary to bypass the output, although this does improve transient response. Input bypassing is needed only if the regulator is located far from the filter capacitor of the power supply. Features: Complete specifications at 1A load Output voltage tolerances of ±2% at Tj = 25° Line regulation of 0.01% of VOUT/V of VIN at 1A load Load regulation of 0.3% of VOUT/A Internal thermal overload protection Internal short-circuit current limit Output transistor safe area protection PINOUT FOR LM7805:
  • 44. 44 FIGURE: F BLOCK DIAGRAM FOR IC LM7805: FIGURE: G Relay Driver(BC547): The BC547 transistor is an NPN Epitaxial Silicon Transistor. The BC547 transistor is a general-purpose transistor in small plastic packages. It is used in general-purpose switching and amplification BC847/BC547 series 45 V, 100 mA NPN general-purpose transistors. The BC547 transistor is an NPN bipolar transistor, in which the letters "N" and "P" refer to the majority charge carriers inside the different regions of the transistor. Most bipolar transistors used today are NPN, because electron mobility is higher than whole mobility in semiconductors, allowing greater currents and faster operation. NPN transistors consist of a layer of P-doped
  • 45. 45 semiconductor (the "base") between two N-doped layers. A small current entering the base in common-emitter mode is amplified in the collector output. In other terms, an NPN transistor is "on" when its base is pulled high relative to the emitter. The arrow in the NPN transistor symbol is on the emitter leg and points in the direction of the conventional current flow when the device is in forward active mode. One mnemonic device for identifying the symbol for the NPN transistor is "not pointing in." An NPN transistor can be considered as two diodes with a shared anode region. In typical operation, the emitter base junction is forward biased and the base collector junction is reverse biased. In an NPN transistor, for example, when a positive voltage is applied to the base emitter junction, the equilibrium between thermally generated carriers and the repelling electric field of the depletion region becomes unbalanced, allowing thermally excited electrons to inject into the base region. These electrons wander (or "diffuse") through the base from the region of high concentration near the emitter towards the region of low concentration near the collector. The electrons in the base are called minority carriers because the base is doped p- type which would make holes the majority carrier in the base PINOUT FOR BC547: Figure: H
  • 46. 46 8. PCB FABRICATION The first step of assembling is to produce a printed circuit board. The fabrication of the program counter plays a crucial role in the electronic field. The success of the circuit is also dependent on the PCB. As far as the cost is concerned, more than 25% of the total cost is for the PCB design and fabrication. The board is designed using a personal computer. The layout is drawn using the software “Adobe PageMaker 6.5”. The layout is printed in a “buffer sheet” using a laser procedure. First, a negative screen of the layout is prepared with the help of a professional screen printer. Then the copper clad sheet is kept under this screen. The screen printing ink is poured on the screen and brushed through the top of the screen. The printed board is kept under shade for few hours till the ink becomes dry. The etching medium is prepared with the un-hydrous ferric chloride water. The printed board is kept in this solution till the exposed copper dissolves in the solution fully. After that the board is taken out and rinsed in flowing water under a tap. The ink is removed with solder in order to prevent oxidation. Another screen, which contains component side layout, is prepared and the same is printed on the component side of the board. A paper epoxy laminate is used as the board. Both the component and the track layout of the peripheral PCB is given at the end of this report.
  • 48. 48 COMPONENT LAYOUT 9. APPLICATIONS Our electronic door lock performed as expected. We were able to implement all the functions specified in our proposal. The biggest hurdle we had to overcome with this project was interfacing the micro controller with the hardware components. We fe e l t h a t t h i s e l e c t ro n i c d o o r l o c k is v e r y ma r k e t a b l e b e c a us e it i s e a s y t o us e , comparatively inexpensive due to low power consumption, and highly reliable. This door lock is therefore particularly useful in applications such as hotel room door locks, residential housing, and even office buildings.
  • 49. 49 10. FUTURE ENHANCEMENTS  Electrical devices such as Lights, Computer etc can be controlled by using separate passwords.  The system can be easily connected to the personal computer for further control. Other than the speaker sounds, all the lights are made to turned on if password entered is wrong for three times and also a hidden camera is used to record the faces who trespassed. We can use this system as an attendance register for the students to enter a class room with their respective password. 11. CONCLUSION This project is meant for security systems whose access is only for respected authorities. Using a microcontroller the password entered is checked with the stored password and then does the corresponding operations. Here we use a 5 digit password for better secrecy. 12. REFERENCES  Electronic circuits and devices: J.B. Gupta.  Op-amps and linear integrated circuits: Ramakanth A. Gayakward  Integrated circuits : K.R. Botkar  The 8051 microcontrollers: Muhammed Ali Mazidi