Вы находитесь на странице: 1из 4

COLLEGE OF ENGINEERING

Semester 2 2014/2015
SEMESTER
1, 2013/2014
EEEB161 DIGITAL LOGIC DESIGN LAB

Design Challenge : Password-based Door Sensor Activation Circuit

Problem Statement:
A few burglary cases in Amanah apartments have motivated you and your housemates to
design a simple low cost security system for your own apartment. The system consists of a
door contact sensor (shown in Figure 1a below) placed on the apartments front door, and a
loud buzzer (shown in Figure 1b), which is installed on the apartments wall. When the sensor
is activated and someone opens the door, the sensor will transmit a signal to the buzzer. The
buzzing noise will then alert the nearby residents.

(a)

(b)

Figure 1. Two main components of a low cost security system

You then realized that as a resident of your own apartment, you and your housemates need to
be able to open the door without triggering the buzzer. Hence, you come up with the idea of
adding a Password Entry system to the security system. When a correct 4-digit password is
entered, the user can activate and deactivate the sensor as you leave or enter the house. You
decided to use the last four digits of your student ID as the 4-digit password code. To enter the
digits, a 12-button (6x2) matrix keypad will be used as inputs to the circuit. Figure 2 shows
the 12-button keypad.

Figure 2. 12-button keypad matrix

In addition, you also have a Sensor Activation (A) input switch and two LEDs; Green (G) and
Red (R). You can activate the door sensor by applying logic 1 to input A, and deactivate by
applying logic 0. The green LED will light on (logic 1) when the correct password is entered
while the Red LED will light on (logic 1) when the door sensor is activated.

Project Objectives:
Based on the above problem statement, you are required:
1) to design the password circuit using Alteras Quartus II
2) to verify the functionality of the design using ModelSim-Altera,
3) to propose a cost analysis of this design if you were to purchase all the chips.

Instructions:
1) Use Quartus II and Modelsim-Altera to enter design and run simulation. Verify the
functionality of the circuit for each of the following cases:
a. password is entered incorrectly and the user attempt to activate the door sensor,
b. password is entered correctly but is then cleared (without any
activation/deactivation of door sensor),
c. password is entered correctly, and the user activate the door sensor, followed by
deactivation of door sensor.
[A video clip that shows how to simulate the circuit will be made available later on.]
2) In the design, you can use any 74XX components that are available in the Quartus library.
Refer to the link below for a complete list of 7400 series digital logic ICs.
http://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits
3) To prepare for the cost analysis of the design, refer to the link below to know the price (in
RM) for each chip.
http://malaysia.rs-online.com/web/
4) Produce a written report, which explains your design methodology, discusses the circuit
operation and simulation results, and analyzes the design in terms of no. of components
used and their costs. Refer to Report rubrics on page R-4 on the lab manual.
5) Orally present your proposed design and results.

Useful Design Details


System Operation
Each button must be pressed one at a time. After each digit button is pressed followed by the
ENTER button, all these codes will then be compared with the default password code (last
four digits of your student ID). If the entered password is correct, Green LED will light on,
enabling the user to activate or deactivate the door sensor via Sensor Activation (A) input
switch. The Red LED will then light on if the user successfully activated the door sensor. If
the entered password is incorrect, Green LED is in off state and the user will not be able to
activate or deactivate the door sensor. The sensor will maintain its current status, which will
be indicated by the Red LED. The user can also clear the password at anytime by pressing the
CLR button.

Keypad Operation
The keypad will have eight pins, which will be the inputs to this circuit. The eight pins
represent the two rows and six columns of keypad buttons. These eight inputs will be labelled
as K[7] until K[0], where each input K represents one row/column, as shown in Figure 3
below. When a button is pressed, logic 1 signal will be produced at the row and column pins
of that button. For example, if button 4 is pressed, inputs K[7] and K[2] equals to 1, or simply
put, K = 1000 01002 = 8416.

Figure 3. Keypad with labelled inputs

Circuit Architecture
The password circuit consists of three main circuit blocks: keypad encoder, password
comparator and Activation circuit. Figure 4 shows the block diagram of the password circuit.

Figure 4. Block Diagram of Password-based Activation Circuit


3

The keypad encoder accepts K[7] until K[0] as inputs. It then encodes the 8-bit input to its
corresponding 4-bit output code. For example, K = 1000 01002 will be encoded to 01002,
which represents decimal digit 4 since button 4 is pressed. You can choose you own 4-bit
output code for the ENT and CLR buttons.
The password comparator compares the five 4-bit codes (four digit codes + ENT code) from
the keypad encoder with the default password codes. When all codes match with the
password, output G equals to logic 1. Otherwise, output G remains logic 0. At anytime, when
button CLR is pressed, output G changes to logic 0. The output of this circuit block will
enable or disable the activation circuit.
The activation circuit takes the output from the password comparator block as the Enable
input. When this circuit is enabled, the user can activate the door sensor by applying logic 1 to
input A, or deactivate the door sensor by applying logic 0. Output G will indicate whether the
door sensor is activated or deactivated. If this circuit is disabled, output G will maintain its
logic value regardless of input A.
Note:
1) There are a few design solutions for this project. The above block diagram is just one of
the proposed solutions. You can also use your own design strategies to solve the problem
statement.
2) It is advised to design each circuit block independently. You can create a symbol file for
each circuit block. After all blocks have been designed, you can then include all the
individual designs into a new project, which will be your main design.

Group Report
Your report must contain the following sections/parts/items:
- Front page (project title, student names, student Ids and section no, date of submission,
course name and code, semester and year)
- Project objectives
- Project background or Introduction
- Design Methodology / Design Work / Design Procedure
- Results (Schematic and waveform diagram)
- Discussion
o Component analysis
o Cost analysis
- Conclusion (state the main points of the project)

Oral Presentation
You must show your design on Quartus and explain the circuit operation. You also need to
show that you can compile the design with zero errors. Finally, you need to show waveform
diagram to verify the functionality of the design.
The dateline for report submission and oral presentation will be informed by your lab
instructor.
4

Вам также может понравиться