digital lock (1)

26
PRESENTED BY- NEERAJ KUMAR VISHWAJEET KUMAR YOGENDRA KUMAR RAJU KUMAR MRINMOY MANDAL ABHISHEK GUPTA Design of an Electronic Lock System Project Guide- Mr. Tarun Kumar Das (Assistant Professor, ECE Department)

Upload: roop-mukherjee

Post on 02-Dec-2014

291 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Digital Lock (1)

PRESENTED BY-NEERAJ KUMAR

VISHWAJEET KUMARYOGENDRA KUMAR

RAJU KUMARMRINMOY MANDAL

ABHISHEK GUPTA

Design of an Electronic Lock System

Project Guide-Mr. Tarun Kumar Das(Assistant Professor,ECE Department)

Page 2: Digital Lock (1)

1) Objective 2) What is an Electronic lock?3) Types of Electronic lock4) Our approach to the Design5) Finite State Machines(FSM)6) Field Programmable Gate Array (FPGA)7) VHDL Overview & Architecture8) Xilinx Spartan3 Interfacing8) Results and Analysis9) Future Scope10) Conclusion 11) References & Bibliography

Contents

Page 3: Digital Lock (1)

Objective

The objective of this project is to implement a electronic-lock system where the user will be granted access to his locked room simply through a password. With such a system, the advantages of keyless access will be accomplished with only passive involvement from the client.

Page 4: Digital Lock (1)

An electronic lock is a simple type of a keyless door lock System which can

be accessed by any person knowing its

unlock code.

What is an Electronic Lock?

Page 5: Digital Lock (1)

Types of Electronic Lock

Electronic locks can be of different types:-Numerical, Password or Code lockCard LockBiometrics, etc

Page 6: Digital Lock (1)

Our Approach to the Design

Our approach was to design an electronic lock which requires password for authentication. This password is in the form of numerical code.

We have written the code in VHDL and simulation is done on ALDEC software. Later on it was to be burn on spartan-3 kit.

Before going into the detail a brief description of Finite State Machines, VHDL, FPGA and Spartan-3 kit was required as we have used all these during our Project.

Page 7: Digital Lock (1)

System Design

For the design of an electronic lock we have utilized an 8-bit PISO shift register & FSM (Mealy Machine). The following block diagram represents our design:

Page 8: Digital Lock (1)

Design Description

Our approach to design an electronic lock begin with the design of an 8-bit FSM. Initially an 8-bit sequence is fed to a 8-bit PISO shift register, the output of the PISO is connected to the FSM. Both the PISO and the FSM are synchronized by a single clock.

We choose a 8-bit sequence for the PISO and then draw the state diagram of 8-bit manually, from it we have derive the state table and from state table we design a Logic Diagram. We also have written the code for FSM in VHDL and obtained a state diagram which is similar to the manual drawn state diagram.

Page 9: Digital Lock (1)

Logic Diagram

Page 10: Digital Lock (1)

Finite State Machines

A sequential system is also known as Finite State Machine (FSM). The FSM approach to sequential design is a straight forward generic approach that allows any sequential system to be designed. In theory, a sequential system of any complexity can be designed as a single FSM. In practice, complex systems are decomposed into components, where one or more are FSMs.

FSM can be classified into two types:- 1) Mealy Machine 2) Moore Machine

Page 11: Digital Lock (1)

Mealy Machine

In a Mealy machine, the outputs are a function of the present state and the value of the inputs as shown in Figure.

Accordingly, the outputs may change asynchronously in response to any change in the inputs.

Page 12: Digital Lock (1)

Moore Machine

In a Moore machine the outputs depend only on the present state as shown in Figure.

A combinational logic block maps the inputs and the current state into the necessary flip-flop inputs to store the appropriate next state.

However, the outputs are computed by a combinational logic block whose inputs are only the flip-flops state outputs.

The outputs change synchronously with the state transition triggered by the active clock edge

Page 13: Digital Lock (1)

State Diagram of Our Design

Page 14: Digital Lock (1)

Field Programmable Gate Array (FPGA)

FPGA usually refers to a VLSI module that can be programmed to implement large digital systems containing thousands of gates. These multilevel gate networks may include random gates to state machines. FPGA contains many identical logic cells where each logic cells can be individually programmed.

The advantages of FPGA are- It has very short turn-around time, Since no physical manufacturing step is necessary a

functional sample can be obtained almost as soon as the design is mapped into a specified technology,

Though FPGA chips are very costly but for small volume production of ASIC chips and for fast prototyping FPGA offers a very valuable option

Page 15: Digital Lock (1)

Cell Based Approach of FPGA

Page 16: Digital Lock (1)

FPGA (Spartan 3) Kit Interfacing

Page 17: Digital Lock (1)

VHDL Overview

VHDL is an acronym for VHSlC Hardware Description Language (VHSIC is an acronym for Very High Speed Integrated Circuits). It is a hardware description language that can be used to model a digital system at many levels of abstraction ranging from the algorithmic level to the gate level.

The VHDL language can be regarded as an integrated amalgamation of the following languages:

Sequential language + Concurrent language + Net-list language + Timing specifications + Waveform generation language => VHDL

Page 18: Digital Lock (1)

VHDL Architectural Styles

Data Flow Modeling: Describes paths and operations on signals as a circuit is

traversed Uses signal assignmentsBehavioral Modeling: No details about the circuit implementation are implied by the

description (i.e., uses a higher level of abstraction) Describes the circuit responses(behavior) to input conditions Relies on the sequential nature of the processStructural Modeling: Breaks up the implementation into a hierarchy of subsystems

(“components”) Describes more complex entities in terms of combinations of

simpler component

Page 19: Digital Lock (1)

Results and Analysis(State Diagram drawn manually)

Page 20: Digital Lock (1)

Results and Analysis(State Diagram obtained from Software)

Entity : f sm_8bitArchitecture: f sm_8bit

zd[7:0] clkreset

c reg[7:0]

c x

process(clk)begin

if (clk'event and clk='1') then i f(reset='1')then reg<=d;else reg<=reg(6 downto 0)& '0';end i f;end i f;

end process;x<=reg(7);

process(clk)begin

if (clk'event and clk='1') then i f(reset='1')then reg<=d;else reg<=reg(6 downto 0)& '0';end i f;end i f;

end process;x<=reg(7);

present_state

clk

No clock enablece

s0

z<='0';z<='0';

s1

z<='0';z<='0';

s2

z<='0';z<='0';

s3z<='0';z<='0';

s4 z<='0';z<='0';

s5 z<='0';z<='0';

s6

s7z <='1';z <='1';

z<='0';z<='0';

x='0'@ELSE

x='1'

@ELSE

x='1'

@ELSE

x='0'

@ELSE

x='1'

@ELSE

x='0'

z<='0';z<='0';

@ELSE

x='1'

@ELSE

x='1'

z<='1';z<='1';

@ELSE

reset='1'

Page 21: Digital Lock (1)

Results and Analysis(Output Waveform)

When reset is high (reset=1) the input data is loaded into the register.

Page 22: Digital Lock (1)

Results and Analysis(Output Waveform)

After making reset low from previous high state we get output high (z=1) when the FSM detects the correct 8-bit input sequence “01101011” and all the registers are reset.

Page 23: Digital Lock (1)

Future Scope

The overall work done by us led to a particular point from where we can move our project to multiple directions:-

We can design a hardware using the logic diagram implemented in our project

We can directly burn the VHDL code on a memory chip using FPGA kit

The level of security can also be enhanced by increasing the number of bits in the code

The system can be made more secure by connecting the output end of a lock to an online monitoring system

Page 24: Digital Lock (1)

Conclusions

Our whole concept of the project was to design a lock system with an 8-bit code using the Mealy Finite State Machine that we have successfully implemented on software.

We have satisfactorily completed most sections of our aimed project. We could not achieve 100 percent because of some unavoidable constraints.

In spite of the constraints we were able to complete most of the portions and we are very satisfied with our work.

Page 25: Digital Lock (1)

References & Bibliography

www.wikipedia.orgwww.google.co.inwww.ieee.comwww.electriclock.nethttp://electrosofts.com

Page 26: Digital Lock (1)