automatic door locking system

Upload: pankaj-kumar

Post on 07-Jul-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 Automatic Door Locking System

    1/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 1 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    1. Introduction

    1.1 Objective

    The objective of this project is to implement a password based door locking system by using the

    microcontroller 68hc11/8051/8086 and to integrate the hardware and software in order to

    simulate the functions of the above system. The microcontroller based Door locking system is an

    access control system that allows only authorized persons to access a restricted area. The

    password is stored in the EEPROM so that we can change it any time. The system has a 4×3

    keypad which is used to enter the Password. A 16×2 LCD is also used to display the password

    entered. If the entered password is correct then the system opens the door by rotating the door

    motor. If the password is wrong then the door will remain closed and an alarm will be generated to detect an unauthorized entry of a person.

    1.2 What is password based door locking system?

    It is a microcontroller based system designed to restrict unauthorized entry. A predefined

    password is fed in the microcontroller. To enter the password, a 4×3 Keypad is connected to the

    system and to display the password entered, a 16×2 LCD is used. They system is fixed at the

    entry door to control a solenoid operated lock with the help of a motor. When an authorized person enters the predefined password via keypad, the motor is operated for a limited time to

    unlatch solenoid operated door so the door can be open. At the end of preset delay, the motor is

    operated in reverse direction and the door gets locked again. When the password has been

    incorrectly entered the buzzer gives a chirping sound.

    The system is totally designed using embedded systems technology. The controlling unit has an

    application program to allow the microcontroller read the incoming data and control the motor.

    The project uses AT89C51 microcontroller as the control unit (Reddy,2011).

    1.3 Need for password protected door locking system

    Today, security has become increasing concern. An access control for doors forms a vital link in

    a security chain. The microcontroller based digital lock for Doors is an access control system that

    allows only authorized persons to enter in a restricted area viz. military base, research centre.

  • 8/18/2019 Automatic Door Locking System

    2/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 2 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Moreover it can be implemented in homes. We often forget to carry door key. It is really difficult

    to get inside the house. In offices security personnel checks the I-card of the employees to

    restrict unauthorized entry or the employees sign a register before entrance. But if there are

    multiple entry points it is not feasible to arrange security personnel at each gate as wells as it

    would not be cost effective. This project solves these problems and is a substitute for bar code

    recognition system, punch card system (Reddy,2011).

  • 8/18/2019 Automatic Door Locking System

    3/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 3 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    2. Working principle and detailed theory

    2.1 Block diagram description

    The block diagram consists of a Microcontroller, a 16×2 LCD, a 4×3 keypad, Motor driver IC(L293D) connected to a DC motor and a buzzer. Each of these block are described below2.1.1

    2.2.1 Microcontroller

    This is control unit of our system. In this project microcontroller of 8051 family is used. The

    microcontroller is used to:

    i. Read the digital input provided by keypad

    ii. Display the entered password on LCD

    iii. Match the password entered with that of predefined password

    iv. Rotate the motor if password matches else send logic to complete buzzer circuit for

    an alarming sound

    AT89C51 of 8051 family is used in this project.

    Figure 1: Block diagram of circuit

  • 8/18/2019 Automatic Door Locking System

    4/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 4 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    AT89C51 (Microcontroller)

    This module comprises 8051 microcontroller (AT89C51). It belongs to Atmel family. Atmel

    89C51 have flash programmable and erasable read only memory (PEROM). Flash memory is a

    non volatile memory, which can be electrically erased read for lines and blocks. The mechanismfor erasing the memory is easier and faster than that needed for EEPROM. Typically, 1000

    write/erase cycles are possible, which are more than sufficient for any application development.

    The operating frequency of 89C51 could be from 0Hz to 24Hz.

    Architectural overview of ATMEL89C51

    Atmel AT89C51 is a powerful microcontroller which provides a highly flexible and cost

    effective solution to many embedded control applications. Since AT89C51 architecture provides

    32 bidirectional port pins along with two timers and 4Kbytes of flash memory, it makes the

    choice ideal for the system is an RTC chip DS1307 from Dallas semiconductors, which

    continuously updates the time and calendar information in its scratch pad RAM, considering leap

    year compensation. Stability and accuracy of the clock is dependent on the accuracy of the clock

    as well as matching of the capacitance between crystal oscillator and clock pins. There are two

    16-bit timer/counters, one full duplex serial port, 128 bytes of on chip RAM, 32I/O lines, on chip

    oscillator and clock circuitry. It support six interrupt sources. It consists of precision analog

    comparator. It must be noted that pin P3.6 is not available externally; however it can be read in

    software. P3.6 is the output of precision analog comparator

    Atmel series AT89C51 is based on Harvard architecture. This processor includes internal

    separated data memory (internal RAM) and program memory (internal Flash). It is possible to

    connect external data memory and external program memory as well through I/O ports P0 and

    P2 and control signals (detailed connection will be discussed later). Internal data memory and

    program memory are separated into two different areas and are accessed at the same time via

    data transfer instruction (like MOV A, 20H). External data and program memory shares the same

    address and data bus, thus advantage of Harvard Design of Electronic Instruments Embedded

    systems for industrial control 23 architecture is not utilized. But external data access instruction

    (like MOVX A, @DPTR) and external program access instruction (MOVC A, @DPTR) still

    differs (Soni,2010).

  • 8/18/2019 Automatic Door Locking System

    5/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 5 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Pin Description of 8051

    The 8051 is packaged in a 40-pin DIP (Dual Inline Package). Many pins of 8051 are used for

    more than one function.

    Port 0 (Pins 32-39)

    Port 0 pins can be used as I/O pins. The output drives and input buffers of port 0 are used to

    access external memory. Port 0 outputs the low order byte of external memory address, time

    multiplexed with the data being written or read. Thus, port 0 can be used as a multiplexed

    address/data bus.

    Port 1 (Pins 1-8)

    Port 1 pins can be used only as I/O ports. This port does not need any pull-up resistors since it

    already has pull up resistors internally. Upon reset, port 1 is configures as an input port.

    Figure 2: Pin Out of 8051

  • 8/18/2019 Automatic Door Locking System

    6/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 6 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Port 2 (Pins 21-28)

    The output drives of port 2 are used to access external memory. Port 2 outputs the high order

    byte of the external memory address when the address is a6=bits wide. Otherwise, port 2 is used

    as an I/O port.

    Port 3 (Pins 10-17)

    All port pins of port 3 are multifunctional. They have special functions as shown below including

    two external interrupts, two counter inputs, two special data lines and two timing control strobes.

    Table 1: Pin description

    Symbol Position Name and significance

    RD P3.7 Read data control output. Active low pulse generated by hardware whenexternal data memory is read.

    WR P3.7 Write data control output. Active low pulse generated by hardware whenexternal data memory is written.T1 P3.5 Timer/counter 1 external input or test pin.T0 P3.4 Timer/counter 0 external input or test pin.

    INT1 P3.3 Interrupt 1 input pin. Low level or falling edge triggered.

    INT0 P3.2 Interrupt 0 input pin. Low level or falling edge triggered.

    TXD P3.1 Transmit data pin for serial port in UART mode. Clock output in shift

    register mode.RXD P3.0 Receive data pin for serial port in UART mode. Data I/O pin in shiftregister mode.

    Power supply pins V CC (Pin 40) and V SS (Pin 20)

    8051 operates on d.c. power supply of +5V with respect to ground. The +5V is to be connected

    to pins V CC and ground to pin V CC with rated power supply current of 125mA.

    Oscillator pins XTAL (Pins 18 and 19)

    For generating an internal clock signal, the external oscillator is connected at these two pins.

    ALE (Address Latch Enable, Pin 30)

    AD0 to AD7 lines are multiplexed. To demultiplex these lines and for obtaining lower half of an

    address, an external latch and ALE signal of 8051 is used.

  • 8/18/2019 Automatic Door Locking System

    7/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 7 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    RESET (Pin 9)

    This pin is used to reset 8051. For proper reset operation, reset signal must be held high at least

    for two machine cycles, while oscillator is running.

    PSEN (Program Store Enable, Pin 29)

    It is the active low output control signal used to activate the enable signal of the external

    ROM/EPROM. It is activated every six oscillator periods while reading the external memory.

    Thus, this signal acts as the read strobe to external program memory.

    EA (External Access, Pin 31)

    When the EA pin is high (connected to V CC), program fetches to address 0000H through 0FFFh

    are directed to the internal ROM and program fetches to address 1000H through FFFFH are

    directed to external ROM/EPROM. When EA is low (grounded), all addresses (0000H to

    FFFFH) fetched by program are directed to the external ROM/EPROM.

    2.1.2 LCD

    A 16×2 LCD (Liquid Crystal display) is used to display the password entered. It is an electronics

    display module and find a wide range of applications. The module is preferred over seven

    segment display and other multi segment display LEDs. The reason being: LCDs are

    economical, easily programmable, have no limitation of displaying special and even custom

    characters (unlike in seven segments).

    A 16×2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD

    each character is displayed in 5×7 pixel matrix. This LCD has the registers namely command and

    data.

    The command register stores the command instructions given to the LCD. A command is an

    instruction given to LCD to do a predefined task like initializing it, clearing screen, setting the

    cursor position, controlling display etc. the data register stores the data to be displayed on the

    LCD. The data is the ASCII value of the character to be displayed on the LCD. PIN description

    of 16×2 LCD is shown in table below:

  • 8/18/2019 Automatic Door Locking System

    8/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 8 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Table 2: Pin description of LCD

    PinNo

    Function Name

    1 Ground (0V) Ground 2 Supply voltage; 5V (4.7V – 5.3V) Vcc 3 Contrast adjustment; through a variable resistor VEE

    4 Selects command register when low; and data register when high Register Select

    5 Low to write to the register; High to read from the register Read/write 6 Sends data to data pins when a high to low pulse is given Enable 7

    8-bit data pins

    DB0 8 DB1 9 DB2

    10 DB3 11 DB4

    12 DB5 13 DB6 14 DB7 15 Backlight V CC (5V) Led+ 16 Backlight Ground (0V) Led-

    Figure 3: LCD Pin Out

  • 8/18/2019 Automatic Door Locking System

    9/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 9 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    2.1.3 Keypad

    The 4×3 keypad contains push buttons that are arranged in four rows and three columns produce

    twelve characters as shown in the figure below. It is made of thin, flexible membrane material

    with an adhesive backing. The keys are connected into a matrix, so that we need 7microcontroller pins (3columns and 4 rows) to scan through the pad. It is used to enter the

    password in this project.

    2.1.4 Motor Driver IC

    Microcontroller operates at low voltages and require small amount of current to operate while the

    motor requires a relatively higher voltages and current. This current cannot be supplied to the

    motors from the microcontroller. That is why motor driver IC is used in this system.

    The IC L293D is a dual H bridge IC which also provides sufficient current to drive a small

    motor. It’s Pin configuration is shown below . With one such IC DC motors can be driven which

    can be controlled in both clockwise and counter clockwise directions. For the applications that

    don’t need reversal of direction, the four output pins can be used for driving four separate

    motors. This IC is rated for an output current of 600mA and peak output current of 1.2A per

    channel. Moreover for protection of this circuit against back EMF, snubber/flywheel diodes are

    included within the IC (Das,1995).

    Figure 4: L293D IC

  • 8/18/2019 Automatic Door Locking System

    10/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 10 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    2.1.5 DC motor

    A DC motor is used so that it can be further connected to solenoid to open the door.

    A DC motor in simple words is a device that converts direct current (electrical energy) into

    mechanical energy.

    2.1.6 Buzzer

    We are using a buzzer as an alarm to indicate the wrong password to open the door.

    2.1.7 LM7805 (Voltage regulator)

    The LM7805 monolithic 3-terminal positive voltage regulator 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 current. They are intended

    as fixed voltage regulators in a wide range of applications including local regulation for

    elimination of noise and distribution problems associated with single point regulation. In

    addition to use as fixed voltage regulators, these devices can be used with external 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 power supply

    (Mathew,2011).

    Figure 5: LM7805 IC

  • 8/18/2019 Automatic Door Locking System

    11/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 11 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    3. Circuit design

    3.1 Working Principle

    The circuit operates on the principle of microcontroller interfacing. A keypad interfaced to themicrocontroller is used to enter the password and store it. A LCD is interfaced to the

    microcontroller to display the status and a motor is interfaced to the microcontroller via the

    motor driver. The motor is first rotated forward to open the gate and then backward to close the

    gate.

    3.2 Circuit Explanation

    The main part of the above circuit diagram is the Microcontroller AT89C51. The keypad is the

    input device and it is connected in a Matrix format so that the numbers of port needed are

    reduced. The Microcontroller reads a four digit password through the Keypad. Then the

    Microcontroller compares the four digit password with the password which is pre-programmed

    Figure 6: Circuit design in Proteus

  • 8/18/2019 Automatic Door Locking System

    12/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 12 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    and if it is equal then the Microcontroller will switch on the motor for the door and if we enter

    the wrong password then an alarm will be switched on.

    The password is stored in the EEPROM and the password can be changed by making changes in

    program. The power supply section is the important one. It should deliver constant output

    regulated power supply for successful working of the project. A 9V transistor battery is used as

    power supply, which is further regulated to 5V, by using IC 7805.

    Reset circuit design: The reset pin of the microcontroller is kept active till the power supply is in

    specified range and minimum oscillation level is maintained. In other words to ensure the supply

    voltage doesn’t falls below the threshold level of 1.2V and the reset pulse width is greater than

    100ms (for AT89C51), we select the values of resistor and capacitor such that RC ≥100ms. Here

    we select 8.2K ohm resistor and a 10µF electrolyte capacitor.

    Oscillator circuit design: A crystal oscillator is used to provide external clock signal of 24MHzto the microcontroller. To forward the clock cycle in only one direction, we connect two ceramic

    capacitors each of 33µF. this crystal oscillator is connected between pin 18 and 19 of the

    microcontroller.

    Microcontroller interfacing design: A 4×3 keypad is interfaced to the microcontroller Port1

    and a motor driver IC (L293D) is interfaced to microcontroller port pins P3.0 and P3.1. An LCD

    is interfaced to the microcontroller such that the register select, read/write and enable pins are

    connected to port pins P3.6, P3.7 and P3.8 respectively whereas the data pins are connected to

    Port2.

    Circuit design in Proteus: Circuit is designed and then simulated in Proteus.

    Compilation of Microcontroller code: Once the circuit is designed and drawn on a piece of

    paper, the next step is to write and compile the code. Here we select the keil µvision software to

    write the program in C language.

    Prior to writing the code, the general steps needed to be followed like creating a new project and

    selecting the target device or the required microcontroller. Once the code is written, we saved it

    with .c extension and then added it to the source file group under the target folder. The code is

    then compiled by pressing F7key.

    Once the code is compiled, a hex file is created. In the next step, we use Proteus software to draw

    the circuit. The code is dumped into the microcontroller by tight click on the same and then

  • 8/18/2019 Automatic Door Locking System

    13/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 13 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    adding the hex file. The microcontroller oscillating frequency is selected here to be

    11.0592MHz.

    Once the circuit is powered, microcontroller sends commands to the LCD such that it is ready to

    accept the data. This data is entered using the keypad. Once the data is entered, it is displayed on

    the LCD. This data denotes the password. The password is entered using the keypad and it is

    checked with the set password. If the passwords match, the microcontroller sends signals to the

    motor driver such that pin P3.0 is at high level and pin P3.1 is at low level and the motor rotates

    in forward direction. After a certain delay, the enable pin is grounded by sending a low logic

    signal from the microcontroller and the motor stops. Again after some time delay, the

    microcontroller sends signals to the motor driver such that P3.0 is at low logic level, P3.1 is ate

    logic high level. The motor now rotates in backward direction. Now if the passwords do not

    match, the microcontroller sends a logic low signal to the enable pin of the microcontroller, thusdisabling the motor driver and the motor does not rotates at all. The buzzer connected to the

    pin1.7 gets logic high level and an alarming sound is heard that indicates wrong password.

    3.3 Program

    /*Password protected door locking system by Pankaj kumar*/

    /*default password is 12345*/

    #include#include

    #define lcdport P2

    /*variable declaration of port pins using sbit*/

    sbit rs=P3^4;

    sbit rw=P3^5;

    sbit en=P3^6;

    sbit m1=P3^0;

    sbit m2=P3^1;

    sbit r1=P1^0;

    sbit r2=P1^1;

    sbit r3=P1^2;

    sbit r4=P1^3;

  • 8/18/2019 Automatic Door Locking System

    14/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 14 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    sbit c1=P1^4;

    sbit c2=P1^5;

    sbit c3=P1^6;

    sbit buzzer=P1^7;

    /*Function declaration with data type*/

    char uid[]="12345";

    char id[5];

    void lcdint();

    void user_id(char);

    void lcdstring(char *);

    void delay(int);

    void lcdcmd(char);void lcddata(char);

    void check_id();

    char scankey();

    char check();

    void door_open();

    void door_close();

    void sounder();

    /*Main Program*/

    void main()

    {

    int n; //defining variable “n” as integer

    char key; //defining variable “key” as character

    P2=0x00; //Making Port2 as output port

    P1=0xff; //Making Port1 as input port

    buzzer=1;

    lcdint();

    lcdstring("system is locked");

    lcdcmd(0xc0);

    lcdstring("enter user id");

  • 8/18/2019 Automatic Door Locking System

    15/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 15 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    delay(100); //delay of 100ms

    lcdcmd(0x01);

    lcdcmd(0x02);

    lcdstring("user_id");

    lcdcmd(0xc0);

    n=0; //Initializing the value of integer

    while(n

  • 8/18/2019 Automatic Door Locking System

    16/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 16 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    lcdcmd(0x01);

    lcdcmd(0x02);

    }

    }

    /*Function definition for buzzer*/

    void sounder()

    {

    int i;

    for(i=0;i

  • 8/18/2019 Automatic Door Locking System

    17/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 17 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    m1=1;

    m2=0;

    m1=0;

    m2=1;

    delay(400);

    m1=0;

    m2=0;

    }

    /*Function definition to check authenticity of pre programmed password*/

    char check()

    {

    char b='a';while(b=='a')

    {

    b=scankey();

    }

    return b;

    }

    char scankey()

    {

    c1=c2=c3=1;

    r1=r2=r3=r4=0;

    r1=0;r2=r3=r4=1;

    if(c1==0)

    {

    delay(2);

    return '1';

    }

    if(c2==0)

    {

    delay(2);

  • 8/18/2019 Automatic Door Locking System

    18/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 18 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    return '2';

    }

    if(c3==0)

    {

    delay(2);

    return '3';

    }

    r2=0;r1=r3=r4=1;

    if(c1==0)

    {

    delay(2);

    return '4';}

    if(c2==0)

    {

    delay(2);

    return '5';

    }

    if(c3==0)

    {

    delay(2);

    return '6';

    }

    r3=0;r1=r2=r4=1;

    if(c1==0)

    {

    delay(2);

    return '7';

    }

    if(c2==0)

    {

  • 8/18/2019 Automatic Door Locking System

    19/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 19 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    delay(2);

    return '8';

    }

    if(c3==0)

    {

    delay(2);

    return '9';

    }

    r4=0;r1=r2=r3=1;

    if(c1==0)

    {

    delay(2);return '*';

    }

    if(c2==0)

    {

    delay(2);

    return '0';

    }

    if(c3==0)

    {

    delay(2);

    return '#';

    }

    return 'a';

    }

    void lcdstring(char *p)

    {

    while(*p!='\0')

    {

    lcddata(*p);

  • 8/18/2019 Automatic Door Locking System

    20/32

  • 8/18/2019 Automatic Door Locking System

    21/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 21 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    }

    void lcddata(char value)

    {

    lcdport=value;

    rs=1;

    rw=0;

    en=1;

    delay(1);

    en=0;

    }

  • 8/18/2019 Automatic Door Locking System

    22/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 22 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    4. Results

    4.1 Screen shots of keil and Proteus window

    Figure 7: Change in Port pin values

    Figure 8: Keil window of program compilation

  • 8/18/2019 Automatic Door Locking System

    23/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 23 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Figure 9: Change in Register values

  • 8/18/2019 Automatic Door Locking System

    24/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 24 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    The circuit is simulated in Proteus. The LCD displays “user_id” text indicates the user to enter

    password. The two red dots on Pin 2 & 7 of Motor driver IC (L293D) in the figure below shows

    that motor is not rotating. The two pins of buzzer having red dots indicating both are at high

    signal (Buzzer not working as both terminals are getting high signal logic).

    Figure 10: Circuit while simulation

  • 8/18/2019 Automatic Door Locking System

    25/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 25 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    The pre- programmed password i.e. “12345” is entered through keypad. The LCD displays the

    message “id matched”.

    Figure 11: Password matched

  • 8/18/2019 Automatic Door Locking System

    26/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 26 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Here we can notice the color of dots of pins of IC changes indicating that one pin is getting high

    voltage and second is getting low voltage. This shows that motor is rotating but still the buzzer is

    off.

    Figure 12: Motor is ON, Buzzer is OFF

  • 8/18/2019 Automatic Door Locking System

    27/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 27 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Again user enters the password, but this time the password is unmatched. This time the pins of

    Buzzer get both high and low voltage which results in an alarming sound. The LCD displays the

    message “try again” to reenter the password.

    Figure 13: Unmatched Password

  • 8/18/2019 Automatic Door Locking System

    28/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 28 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    4.2 Hardware Circuit

    Figure 15: Motor spinning with message opening door

    Figure 14: Hardware circuit showing message “User ID”

  • 8/18/2019 Automatic Door Locking System

    29/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 29 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    Figure 16: Motor spinning with message closing door

    Figure 17: Wrong password with message “ try again"

  • 8/18/2019 Automatic Door Locking System

    30/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 30 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    5. Conclusion

    The goal of this project was to build a password protected door locking system. The goal was

    successfully achieved. The circuit was designed in Proteus. The program for this system was

    written in c language. Then this program was compiled in Keil µvision. After compilation, hex

    file was created. This hex file was dumped to microcontroller in Proteus and the circuit was

    simulated. The pre-programmed password was entered using keypad. If the password matches

    the pre programmed password the motor rotates else it gives an alarming sound. The default

    password is “12345”. The same circuit was build on a copper PCB.

    5.1 Limitations

    It is battery operated circuit and can easily run out of power once the battery life timeends.

    It is a low range circuit, i.e. it is not possible to operate the circuit remotely.

    5.2 Applications

    The term access control refers to the practice of restricting entrance to a property, a building or a

    room to authorized persons. Integrated and controller based access control numeric and

    alphabetic keyless entry keypads with programmable features for the access control of singleopenings. The various applications are as follows:

    Industrial facilities Commercial building Research centre Airports Psychiatrist care centres

    Military base Drug rehabilitation centre

    5.3 Future Enhancement

    Electrical device such as lights, computers etc. can be controlled by using separate

    passwords.

  • 8/18/2019 Automatic Door Locking System

    31/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 31 of 32

    Level 2 Asia Pacific Institute of Information Technology 2015

    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 and also 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 classroom

    with their respective password. We can send this data to a remote location using mobile

    or internet.

  • 8/18/2019 Automatic Door Locking System

    32/32

    CE00626-2 Digital and Embedded software(Real time system)-2 Individual Assignment Page 32 of 32

    6. References

    1. Electronics Hub (2014) Password Based Door Lock System using 8051 Microcontroller .

    [Online] Available from: http://www.electronicshub.org/password-based-door-lock-

    system-using-8051-microcontroller/ [Accessed: 4/04/2015]

    2. Free Microcontroller Project (2013) Free Microcontroller Project . [Online] Available

    from: http://www.8051projects.info/proj.asp?ID=68 [Accessed:5/04/2015]

    3. Ghoshal, S. (2009) Embedded Systems & Robots: Projects Using The 8051

    Microcontroller. New York: Delmar Learning.

    4. Ibrahim, D. (2000) Microcontroller projects in C for the 8051. Oxford: Newnes.

    5. Kaur, I. (2010) Microcontroller based home automation system with security.

    International Journal of Advanced Computer Science and Applications. 1(6). p.60-65.6. Mazidi, M. A., Mazidi, J. G., & McKinlay, R. D. (2006) The 8051 microcontroller and

    embedded systems: using Assembly and C (Vol. 626). New Jersey: Pearson/Prentice Hall.

    7. Pandey, N. (2014) Electronics Projects Vol 24. New Delhi: EFY Enterprises Pvt. Ltd.

    p.36-37.

    8. Pont, M. J. (2002) Embedded C. Boston: Addison-Wesley Longman Publishing Co., Inc.

    9. Predko, M. (1999) Programming and customizing the 8051 microcontroller . New York:

    McGraw-Hill.

    10. Reddy,A. & Chander,A. (2011) Digital Security Code using 8051 Microcontroller.

    GRIET journal . 1(1). p.7-8.

    11. Soni.H(2010) Proceedings of the 2009 International conference on signals, systems and

    automation. [Online] Delhi: Universal Publishers. Available from: https://

    books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51 +is+a+

    powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solut

    ion+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uA

    TgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%2

    0powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20a

    nd%20cost%20effective%20solution%20to%20many%20embedded%20control%20appli

    cations.&f=false . [Accessed: 28/03/2015]

    http://www.electronicshub.org/password-based-door-lock-system-using-8051-microcontroller/http://www.electronicshub.org/password-based-door-lock-system-using-8051-microcontroller/http://www.8051projects.info/proj.asp?ID=68https://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttps://books.google.co.in/books?id=dJ3EqEZslGQC&pg=PA133&dq=Atmel+AT89C51+is+a+powerful+microcontroller+which+provides+a+highly+flexible+and+cost+effective+solution+to+many+embedded+control+applications.&hl=en&sa=X&ei=ZwkyVeaBNcm5uATgnICABg&ved=0CCYQ6AEwAA#v=onepage&q=Atmel%20AT89C51%20is%20a%20powerful%20microcontroller%20which%20provides%20a%20highly%20flexible%20and%20cost%20effective%20solution%20to%20many%20embedded%20control%20applications.&f=falsehttp://www.8051projects.info/proj.asp?ID=68http://www.electronicshub.org/password-based-door-lock-system-using-8051-microcontroller/http://www.electronicshub.org/password-based-door-lock-system-using-8051-microcontroller/