logical Password access new

23
Logical Password Access

Transcript of logical Password access new

Page 1: logical Password access new

Logical Password Access

Page 2: logical Password access new

INTRODUCTION

The main objective of this project to build a unique kind of Password algorithm to achieve a

new kind of approachability in the field of Security systems. The Logical password is one of

those types of different view for Security measures that are used in our real world.

In this project we are going to create a digital locking system in which the password of the

system is changing after every second or we can say that we are going to make the password

according to the changing letters of the time constraint.

An electronic lock (more precisely an electric lock) is a locking device which operates by means

of electric current. Electric locks are sometimes stand-alone with an electronic control assembly

mounted directly to the lock. More often electric locks are connected to an access control

system. The advantages of an electric lock connected to an access control system include: key

control, where keys can be added and removed without re-keying the lock cylinder; fine access

control, where time and place are factors; and transaction logging, where activity is recorded

The most prevalent form of electronic lock is that using a numerical code for authentication;

the correct code must be entered in order for the lock to deactivate. Such locks typically

provide a keypad, and some feature an audible response to each press. Combination lengths

are usually between 4 and 6 digits long.

A variation on this design involves the user entering the correct password or passphrase

Page 3: logical Password access new

Problem Formula

To implement a virtual clock and to create a code for comparing the entered value with a divide

by 2 logic

Password = time/2

Methodology

In this project we are providing a more secure system. In we are using 8051 as the brain of the

project. in project we first made a +5v regulated power supply with 7805 voltage regulator then

this supply is provide to different sections according to the circuit. Also we take out a 12v DC

supply after rectification from 1000uf capacitor for DC motor driving of the gate.

Then we make a Keypad for entering the password we use 12 keys in the keypad for different

functions. For the display of the password and virtual clock we use 16x2 LCD which is attached

to Port 1 in the project. Also for the DC motor driving we first make a isolator circuit for the

8051 using P817 opto couplers. Then we make a H- Bridge Circuit for the forward and reverse

direction of the motor

We make virtual clock on the LCD, when we need to enter password we press hold key and

enter the password according to divide by 2 logic. If the password is correct it will open the

door. If incorrect it display wrong password.

Page 4: logical Password access new

Block Diagram

Page 5: logical Password access new

Circuit Diagram

Power Section

Page 6: logical Password access new

Circuit Diagram

Page 7: logical Password access new

H- BRIDGE Circuit

Page 8: logical Password access new

The power section provides the +5v dc power to control unit, Display and Keypad section and it

also provides the power to the DC motor unit.

The Microcontroller unit provides the control for motors and gets the input from Keypad and

displays it on LCD

The H-bridge is used to drive the motors on high voltage

In this project we are using a divide by 2 logic for our virtual clock that is running over the LCD.

Page 9: logical Password access new

Software required

Keil C

SDCC

ISP programmer

C Source Code

#include<at89s8252.h>

#define rs P3_3

#define en P3_4

#define lcd P1

void delay(unsigned int)

void lcd_cmd(unsigned char);

void init_lcd();

void display(unsigned char);

void cursor(unsigned char);

void asciil(unsigned int);

void ascii(unsigned int)

void clock();

void pass();

void main()

{

unsigned int m=0,s=0,e=0,q=0,r=0,t=0,v=0,z=0,l=0,n=0,temp=0,w=0;

P0=0xff;

P2=0x00;

Page 10: logical Password access new

while(1)

{

for(m=0;m<60;m++)

{

for(s=0;s<=59;s++)

{

init_lcd();

clock();

pass();

cursor(0x06);

asciil(m);

cursor(0x08);

display(':');

cursor(0x09);

asciil(s);

e=m*100+s;

q=e/2;

r=e-q*2;

cursor(0x49);

ascii(e);

delay(0xffff);

delay(0xffff);

if(r==0)

{

while(P3_0==0)

Page 11: logical Password access new

{

if(P0!=0xff || P3_6!=1 || P3_7!=1)//using switch loop

{

switch(P0)

{

case 0xfe:

l=0;

break;

case 0xfd:

l=1;

break;

case 0xfb:

l=2;

break;

case 0xf7:

l=3;

break;

case 0xef:

l=4;

break;

case 0xdf:

l=5;

break;

case 0xbf:

l=6;

Page 12: logical Password access new

break;

case 0x7f:

l=7;

break;

}

}

z++;

}

if(z>4)

{

z=0;

}

//cursor(0x00);

//ascii(z);

//cursor(0x06);

//ascii(l);

switch(z)

{

case 1: n=l*1000;

break;

case 2: n=l*100;

break;

case 3: n=l*10;

break;

Page 13: logical Password access new

case 4: n=l;

break;

}

//cursor(0x40);

//ascii(n);

if(P0!=0xff || P3_6!=1 || P3_7!=1)

{

temp=w+n;

cursor(0x49);

ascii(temp);

w=temp;

}

t=temp;

delay(0xffff);

}

if(t!=0)

{

if(t==q)

{

init_lcd();

cursor(0x46);

display('m');

display('a');

Page 14: logical Password access new

display('t');

display('c');

display('h');

P2=0x01;

delay(30000);

P2=0x00;

delay(60000);

delay(60000);

P2=0x02;

delay(60000);

P2=0x00;

t=0;

}

else if(t!=q)

{

init_lcd();

cursor(0x46);

display('i');

display('n');

display('c');

display('o');

display('r');

display('r');

display('e');

display('c');

Page 15: logical Password access new

display('t');

delay(60000);

t=0;

}

}

cursor(0x08);

display(' ');

delay(0xffff);

P2=0;

temp=0;

n=0;

z=0;

w=0;

}

}

}

}

}

void delay(unsigned int a)

{

while(a!=0)

{

a--;

}

Page 16: logical Password access new

}

void lcd_cmd(unsigned char b)

{

delay(300);

lcd=b;

rs=0;

en=1;

en=0;

}

void init_lcd(void)

{

lcd_cmd(0x01);

lcd_cmd(0x3c);

lcd_cmd(0x0c);

}

void display(unsigned char c)

{

delay(300);

lcd=c;

rs=1;

en=1;

en=0;

}

Page 17: logical Password access new

void cursor(unsigned char d)

{

lcd_cmd(d+0x80);

}

void pass()

{

cursor(0x40);

display('P');

display('a');

display('s');

display('s');

display('w');

display('o');

display('r');

display('d');

}

void clock()

{

cursor(0x00);

display('c');

display('l');

display('o');

display('c');

display('k');

}

Page 18: logical Password access new

void ascii(unsigned int digit)

{

unsigned char table[]={'0','1','2','3','4','5','6','7','8','9'};

unsigned int temp,t;

if(digit<10000)

{

temp=digit/1000;

display(table[temp]);

t=digit-temp*1000;

temp=t/100;

display(table[temp]);

t=t-temp*100;

temp=t/10;

display(table[temp]);

temp=t-temp*10;

display(table[temp]);

}

}

void asciil(unsigned int digit)

{

unsigned char table[]={'0','1','2','3','4','5','6','7','8','9'};

unsigned int temp;

Page 19: logical Password access new

if(digit<100)

{

temp=digit/10;

display(table[temp]);

temp=digit-temp*10;

display(table[temp]);

}

}

Page 20: logical Password access new

CONCLUSION

Using this project we make security devices whose password changes after every 1 sec. We have to enter a new password which depends on the running time on your lcd. This make it as a full secure system for our daily use.

Bibliography

8051 microcontroller by Mohommad ALI Mazidi

References

www.google.com

www.8051projects.net

www.projectinfo.com

www.numitechsolutions.com