1Introductory Material - ECpE Senior Design | General...

64
1 INTRODUCTORY MATERIAL This section contains the following two subsections: 1.1 Executive Summary 1.2 Acknowledgements 1.1 EXECUTIVE SUMMARY The Senior Design Lab of the Department of Electrical and Computer Engineering at Iowa State University has been suffering a multitude of security breaches. Theft, unauthorized entry, unauthorized use of equipment, and increasing concern about vandalism are the main issues of concern. Presently, a numeric combination code is required to access the lab. This access code is provided to all senior design students to access and use the lab equipment. This security measure is vulnerable because this code can be passed by students to other unauthorized people. Furthermore, students have been allowing people without authorization to access the lab by holding the door open for them. In response to this practice, the Senior Design Lab has requested the design team develop a prototype system which provides a higher level of security for similar security scenarios. This security system must meet several criteria including authorized access only, prevention of multiple entries, occupant accountability, and alarm prevention. The team has considered several possible approaches to the design of the prototype, and has decided upon a design that integrates several small and readily available consumer-grade components. Some of these components have been designed and built by the team, and are discussed later in this report. To tackle the prime concern of authorized access only, the design team has decided to use an RFID kit from Phidgets inc. This consumer level device can identify a user and pass the information to a PC via USB. The other concern the design team faces is the multiple entry issue. After much consideration, the team has decided to use physical weight as a method of monitoring the number of occupants. An analog weight scale has been designed to communicate with a computer interface board 1

Transcript of 1Introductory Material - ECpE Senior Design | General...

Page 1: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

1 INTRODUCTORY MATERIAL

This section contains the following two subsections:

1.1 Executive Summary1.2 Acknowledgements

1.1 EXECUTIVE SUMMARY

The Senior Design Lab of the Department of Electrical and Computer Engineering at Iowa State University has been suffering a multitude of security breaches. Theft, unauthorized entry, unauthorized use of equipment, and increasing concern about vandalism are the main issues of concern. Presently, a numeric combination code is required to access the lab. This access code is provided to all senior design students to access and use the lab equipment. This security measure is vulnerable because this code can be passed by students to other unauthorized people. Furthermore, students have been allowing people without authorization to access the lab by holding the door open for them. In response to this practice, the Senior Design Lab has requested the design team develop a prototype system which provides a higher level of security for similar security scenarios. This security system must meet several criteria including authorized access only, prevention of multiple entries, occupant accountability, and alarm prevention.

The team has considered several possible approaches to the design of the prototype, and has decided upon a design that integrates several small and readily available consumer-grade components. Some of these components have been designed and built by the team, and are discussed later in this report.

To tackle the prime concern of authorized access only, the design team has decided to use an RFID kit from Phidgets inc. This consumer level device can identify a user and pass the information to a PC via USB.

The other concern the design team faces is the multiple entry issue. After much consideration, the team has decided to use physical weight as a method of monitoring the number of occupants. An analog weight scale has been designed to communicate with a computer interface board via RS-232. The weight information for authorized personnel will be then matched with the unique RFID identification number to ensure access is only provided to the particular person and multiple entries will be prevented.

In order for the devices to interact and process relevant information, the team has written several modules of code that combine to create an overall security system that meets the requirements provided by Senior Design. These modules include RFID identification, weight verification, door sensing, database creation, and two way data communication threading between the database and software.

1

Page 2: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

1.2 ACKNOWLEDGEMENTS

The entrance security team would like to thank the senior design staff and faculty at Iowa State University for their assistance. The team would also like to thank Professor Mani Mina and Dr. Gregory Smith for the guidance they have provided through the planning, design, and implementation processes.

2 PLANNING

The planning phase of this project consists of the following sections: preliminary project requirements, project solution plan, and planning review.

2.1 REQUIREMENTS SPECIFICATION

This section contains a description of the problem as well as the functional and non-functional requirements that are part of that description. Furthermore, a solution is described that meets the given requirements. Finally, the project deliverables are discussed and explained.

2.1.1 PROBLEM DESCRIPTION

The team was to create a design for a security system that will only allow access for authorized individuals, and will prevent more than one person from entering at the same time.

2.1.2 INTENDED USE

The intended use of this security system is to prove the concept that multiple entry and unauthorized access can be prevented using RFID tags and a weight scale as primary components. The system is not intended for actual use in the field, rather it is intended to show that such a system can be built.

The delivered system is also intended to be used to further prove this security system design by being modified to meet the non-functional requirements outlined in this document.

2.1.3 INTENDED USERS

This system is intended to be used by students enrolled in Iowa State University’s electrical and computer engineering senior design class. More specifically, it is intended to be used by the students assigned to the “Entrance Security System” project, senior design faculty and staff, and group advisors. These people will have a great deal of technical knowledge and will also have the tools needed to operate or expand the system. Furthermore, these users will have access to all technical documents concerning the entrance security system.

2

Page 3: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

2.1.4 OPERATING ENVIRONMENT

This project has been intended as a proof of concept for a theoretical security system. Therefore, the delivered system is intended to operate in a laboratory environment. This environment includes the following qualities:

Temperature range from 18°C (64°F) to 23°C (73°F) Humidity range of 40% to 70% relative humidity Access to maintenance tools and measuring equipment Area security consisting of cameras and locks

2.1.5 PROBLEM SOLUTION

In order to best solve the problem, a system was created using several preexisting security technologies. A summary of the technologies is listed below and will be further discussed in the following section.

RFID Tags – Allow authorized access only Monitored Holding Area – Occupant flow control Weight Sensor – Determine number of occupants Alarm – Prevent security breach Software – Determine the event of a security breach

2.1.6 MARKET SURVEY

There are many different technologies currently being implemented in security systems worldwide. RFID, retinal, fingerprint, vocal, and facial identification systems are many of the systems used to deter unauthorized access. There are, however, very few technologies used to prevent multiple entry. The leading systems currently in place usually involve security personnel, or some type of turnstile. These systems unfortunately are notoriously unreliable and are financially inefficient (costing a great deal for a small incremental amount of added security.)

Figure1: Turnstile security system A

3

Page 4: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 2: Turnstile security system B

2.1.7 FUNCTIONAL REQUIREMENTS

The following are the client’s mandatory functioning requirements, which have been addressed by this system.

Allow access to authorized personal only Prevent multiple entry during a single system access Trigger an alarm in the event of a security breach Log the username/date/time for each system use Log past security breaches and alarms

2.1.8 NON-FUNCTIONAL REQUIREMENTS

The following are the client’s ideal requirements which are non-functioning and are not specifically addressed by this system.

Prevent theft of equipment Account for user possessions Mechanically deter security breaches

2.1.9 DELIVERABLES

Upon completion of this project, the following components were delivered.

4

Page 5: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Mountable wall unit Circuit diagrams Logic and control software Computer input/output interface board RFID cars and compatible RFID scanner Weight sensor Project poster Final report Installation/Use instructions and documentation

2.2 PROJECT PLAN

This section outlines the administrative process that was required for this project including the work breakdown structure, resource requirements, and project schedule.

2.2.1 WORK BREAKDOWN STRUCTURE

Table 1 shows the breakdown of hours per person in the team.

Table 1: Personnel Effort Requirement (hours)Peronnel Name Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8 Total

Nahiyan Ali 3 20 30 50 55 40 10 10 218Shrabantee Chatergee 1 20 20 50 50 40 10 10 201

Vaibhav Kumar 3 20 35 50 55 40 10 10 223Alex Weigel 3 20 32 40 40 50 10 20 215

Tao Zeng 3 20 32 50 50 40 10 10 215Total 13 100 149 240 250 210 50 60 1072

Task 1 Problem DefinitionTask 2 Technology Considerations SelectonTask 3 End-Product DesignTask 4 End-Product Prototype ImplementationTask 5 End-Product TestingTask 6 End-Product DocumentationTask 7 End-Product DemonstrationTask 8 Project Reporting

Task 1: Project Definition

This task included statement of the problem, requirements, and the specification made by the client.

Task 2: Technical Considerations

This task contained a list of technologies picked by the team that could be used in product design. It includes extensive research of each technology considered and the components needed to

5

Page 6: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

implement it. The team will selected the best technology that was feasible to approach the prototype design.

Task 3: End-Product Design

This task consisted of the design process for the system once a feasible technology was chosen. The end result was a well-designed concept that met the client’s requirement.

Task 4: End-Product Implementation

This task consisted of taking the concept design and implementing it.

Task 5: End-Product Testing

This task consists of testing the implemented design to ensure the prototype functions properly, and meets the client’s need.

Task 6: End-Product Documentation

Since documentation occurs throughout the entire project, this task was to ensure that all documentation was reviewed and logically assembled near the completion of the project.

Task 7: End-Product Demonstration

The task was to demonstrate the end product to the Industrial Review Board, the client, and the advisor.

Task 8: Project Reporting

This task involved creating a detailed report of the entire process, from problem definition to presentation.

2.2.2 RESOURCE REQUIREMENTS

This section includes the total financial resources required for the project. Besides the material cost, the cost of labor was also calculated based on the hourly rate of $10.00. The information on Table 12 lists all items including parts, services, equipment, telephone, postage and printing costs.

Table 2: Product Cost analysisItem W/O Labor With LaborParts & Materials1. RFID Unit2. Resistors (12)3. Slide Switches (2)4. USB Cables5. Interface Board6. Printing Circuit Board 7. Enclosures8. Aluminum Tape 9. Weight Scale10. Wires

$ 70.00$ 1.00$ 4.00$ 2.00$ 50.00$ 5.00$ 5.00$ 16.00$ 45.00$ 5.00

$ 70.00$ 1.00$ 4.00$ 2.00$ 50.00$ 5.00$ 5.00$ 16.00$ 45.00$ 5.00

6

Page 7: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Subtotal: $ 203.00 $203.00Other Costs (from table 4) $ 31.00 $ 31.00Labor at $12.00 per hour Ali, NahiyanChatergee, ShrabanteeKumar,VaibhavWeigel, Alex Zeng, Tao Subtotal: $ 234.00

$ 2616$ 2304$ 2676$ 2580$ 2580

$ 12,756Total Project Cost $234.00 $ 12,990

2.2.3 PROJECT SCHEDULE

A timeline for the project is shown below in Figure 8.

7

Page 8: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 3: Gantt chart of expected project time span

Figure 4: Revised Gantt chart of expected project flow and time span

Figure 10 below shows the deliverable schedule and it has not changed from the original chart in the project plan. The deliverables are mandated through the senior design class schedule.

8

Page 9: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 5: Gant chart of schedule of deliverables

2.2.4 PROJECT RISK

The majority of the risk in the project is in the compatibility of the components to communicate with each other. The RFID sensor is of primary concern since the design team does not have the necessary skills to build a replacement. Also, there is a great deal of risk involved with the software. The team must learn to program in the correct language in order to properly use the interface board. Finally the remaining portion of foreseeable risk is the weight scale itself. Since the team was forced to build the electrical components of the scale, there is an increase concern of component or connections failure.

2.3 PLAN REVIEW

The planning phase of the project schedule was completed successfully, but was not without some minor revision. The general system plan was proven to be adequate. The design phase was then able to take over and the initial planning gave it a suitable foundation.

3 DESIGN

The design phase was executed immediately following completion of the planning phase. This section of the report explains the detailed design.

3.1 ENGINEERING SPECIFICATION

This section describes each of the different design areas and explains the details behind each area.

3.1.1 SYSTEM DESCRIPTION

The general system is composed of a compartment with two RFID security doors. Inside the compartment, there is a weight scale placed to determine the number of occupants and prevent the multiple entrances. Figure 1 shows an actual appearance of the compartment.

9

Page 10: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 6: Actual appearance of the compartment

Both doors are monitored by a computer. When an authorized user activates the system by swiping an RFID tag, it is then recognized by the system. The computer then allows the door to be opened without alarm. In order to open the second door, a weight must be recorded by the compartment scale and must match the database. If the database entry and scale reading are not within the tolerance, an alarm will sound. Figure 2 shows a block diagram of the general system.

Figure 7: Block diagram of the general system

Since there are two RFID scanners (one at the first door, and one at the second door), the computer will take the signal that has been recognized first. If a user from outside the lab swipes the RFID tag earlier than the user from inside the lab, then the system will only operate as the entrance system;

10

RFID 2

RFID 1

Page 11: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

otherwise, it will only operate as the exit system. Figure 3 shows the state flow of this general system.

Figure 8: State flow of the general system

3.1.2 SUB-SYSTEMS

This system consists of the following three major subsystems:

Entrance system Exit system Door switching system

3.1.2.1 Entrance System

In order to enter the senior design lab, a user is required to swipe his/her RFID tag for his/her identification. The RFID scanner sends the data to the interface board controlled by the computer. Once the system has approved the entrance request, the interface board sends a signal to open the first door; otherwise the first door remains closed. The first door is able to open for only 10 seconds to allow the user to enter the compartment. If the door is not closed after 10 seconds, an alarm will sound. After entering the compartment, the user is required to stand on a digital weight scale, which measures the weight of the user. The weight scale will not send the data to the interface board until the system ensures that the first door has been locked. Once the logic is satisfied, the data is sent and compared to the previously recorded weight with a tolerance that is based on that particular users weight variance. If the weight is within tolerance, the second door will open; otherwise, the system will sound an alarm. Once the second door opens, the system sends a signal to the interface board to clear the recorded RFID number and set everything back to the initial state. The second door also remains able to open for only 10 seconds, otherwise an alarm will sound. If the user does not enter the lab within 10 seconds, the user has must exit the compartment and restart the entrance process. For some unpredictable reasons, if both doors happen to be open at the same time, the system will sound the alarm. Figure 4 shows a state flow of the entrance system.

11

Page 12: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 9: State flow of entrance system

3.1.2.2 Exit System

To exit the lab, the user must swipe their RFID card through the RFID reader from inside of the lab. Again, the second door remains open for only 10 seconds; otherwise it will sound the alarm. After 10 seconds has past, the weight scale sends the reading to the computer through the interface board. If the user is authorized, and is the only occupant, the first door will be made able to open and the user may exit the compartment. Figure 5 shows a state flow of the exit system.

Figure 10: State flow of exit system

3.1.3 USER INTERFACE DESCRIPTION

12

Page 13: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

This system is designed for two different types of users: Students, and System Administrators. The students will only need to be able to swipe their RFID card, listen to the voice commands given by the computer, and open doors. Meanwhile, system administrators will need to start/stop the software, and add/remove/change user weight and RFID cards.

3.1.3.1 Student Interface

Students will be required to listen to simple voice commands given by the computer. Also, they will need to be able to swipe and RFID card over the RFID scanner (Figure 6 shown below.)

Figure 11: RFID Scanner

3.1.3.2 System Administrator Interface

The system administrator control panel (Figure 7 shown below) is comprised of 2 sections: “RFID Reader Info” (left), and “Database (Right).” The “RFID reader info” is used to observe the operation of the RFID reader to insure that it is working properly. The “Database” section is used to add, modify, delete, and view database entries for user entry maintenance.

Figure 12: Entrance Security Control Panel

3.1.4 INPUT/OUTPUT SPECIFICATION

13

Page 14: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

The peripheral components of the system are designed around the interface board. The interface board acts as a conduit for information between the user and the computer. As such, it is important to map all signals entering and exiting the interface board. Also, there exists communication between the RFID scanner and the computer directly. Figure 11 shows the system mockup from the planning phase.

Figure 13: System mockup from planning phase

Given the initial system plan, it was necessary to specify all the inputs and outputs for the system. A system communication breakdown is shown below.

Input RFID 1 (USB) RFID 2 (USB) Interface Board (RS-232 Serial)

o Door 1 Sensor (Digital)o Door 2 Sensor (Digital)o Weight Scale (Analog)

Output Alarm (Audio) Voice Commands (Audio) Interface Board Operational LED

Figure 12 shows a diagram of how each component communicates in the system.

14

RFID 2

RFID 1

Page 15: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 12: Detailed Signal Design

3.1.5 USER INTERFACE OPERATIONAL SPECIFICATION

This section is intended to show how the user is to interact with the system. The following figure series (Figure 13) explains the entrance process. The exit process is simply the reverse of the entrance process.

15

RFID 1

Door 1

Weight Scale

Door 2

RFID 2

Interface Board

Computer Software

AlarmVoice Commands

Hallway

Holding Area

Lab

Operation 1Swipe RFID to begin entry

RFID 1

RFID 2 RFID1 Door 1

Scale Door 2 RFID2Computer Data: Swiped Able to open

Waiting Unable to open Unable to swipe

Page 16: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

To begin operation, the user must first activate the system by swiping an authorized RFID card. Door 1 can then be opened while RFID 2 cannot be swiped and Door 2 cannot be opened.

After RFID 1 has allowed acces to the holding area, the weight scale waits until door one has closed. Meanwhile, RFID 1 and RFID 2 cannot be swiped and Door 2 cannot be opened.

Once Door 1 has been closed, the scale transmits data to the computer. The computer takes the data and compares it to the authorized weight of the swiped RFID card. Door 1, Door 2, RFID 1, and RFID 2 cannot be operated.

16

Hallway

Holding Area

Lab

Operation 2Enter holding area

RFID 1

RFID 2 RFID1 Door 1

Scale Door 2 RFID2Computer Data: Swiped Open Waiting Unable to open

Unable to swipe

Hallway

Holding Area

Lab

Operation 3Identify number of occupants

RFID 1

RFID 2 RFID1 Door 1

Scale Door 2 RFID2Computer Data: Unable to swipe Unable to open Allow only 1 occupant Unable to open Unable to swipe

Page 17: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

If the user is authorized and is the only occupant, Door 2 can then be opened without alarm while RFID 1, RFID 2, and Door 1 cannot be operated.

After the occupant has exited, and closed Door 2, the system waits for RFID 1 or RFID 2 to be operated. If Door 1 or Door 2 are opened before an authorized RFID is swiped, an alarm will be triggered.

3.1.6 HARDWARE SPECIFICATION

17

Hallway

Holding Area

Lab

Operation 4Exit

RFID 1

RFID 2 RFID1 Door 1

Scale Door 2 RFID2Computer Data: Unable to swipe Unable to open Waiting Able to open

Unable to swipe

Hallway

Holding Area

Lab

Operation 5Restart

RFID 1

RFID 2 RFID1 Door 1

Scale Door 2 RFID2Computer Data: Able to swipe Unable to open Waiting Unable to open

Able to swipe

Page 18: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

The hardware that is included in the project is listed below.

Interface board RFID scanner RFID cards Door sensors (switches) Weight scale Accompanying cables

Each piece of hardware was chosen such that it would be able to communicate effectively with other components in the system.

3.1.7 SOFTWARE SPECIFICATION

The software language chosen for this system was visual basic. It provided the easiest interface between the hardware and the database. Also, the fact that the system software needed to be event driven, and reliable, contributed to the selection of visual basic.

This section describes the necessary design concepts that were used to implement the software for the entrance security system. Everything from high level communication to actual software decisions in the lower parts of the custom interface are explained.

3.1.7.1 Overall Design

The software system for the entrance security is equally complex compared to the hardware design. The project relies heavily on hardware and software integration. The hardware system discussed in the preceding sections provides analog/digital signals. The software then process the incoming signals from the interface board, database, RFID scanner, and then makes a decision regarding authorization based on different scenarios. The software has three different types of modules, which are listed below:

Decision-making module Driver module for hardware integration Database module

The software system design flow is shown below; it describes the data flow between the various modules. It is noticeable that each module talks with the decision-making block using a driver as none of the modules are directly compatible.

18

Page 19: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 15: Software mapping inside the PC

3.1.7.2 Decision-making module

The decision-making module in a broad perspective performs two major tasks:

Collecting data from external hardware resources and internal database. Processing signals and then making decisions when access is authorized or when there is a

security breach.

This module of programming is the most essential block of software system. Its task of decision-making can be summarized in the flow chart below.

19

Page 20: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

No Yes

No Yes

No Yes

Yes No

Start

Read RFID #

Door 1 open?

Door 2 open?

RFID # Match

Open Door 1

Door 1 Closed & Weight match

Open Door 2

Trigger Alarm

Read Weight

Close Door 2

Figure 16: Flow chart of the entrance security system design

3.1.7.3 Driver module

This module is used by the decision-making block to communicate with the interface board, the RFID reader, and the database. This module provides functionality for hardware such as interface boards, serial ports, and databases. The device driver communicates on behalf of the user program. As the flow chart indicates, the team will use two different types of drivers, namely (1) Hardware drivers and (2) Database driver. Hardware drivers interact from the external hardware; while the database driver allows read/write access to the internal database.

3.1.7.4 Database Module

20

Page 21: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

The database contains the following information:

User’s Name User’s Weight User’s RFID tag number which will be an 8-bit binary code

Table 3 shows the table that is created and stored in the PC. As the user swipes the RFID tag, the unique 8-bit number is called from the database. If the call from the database returns a null value, then the user is not given access through door 1. However, if the call returns the same RFID tag number then door 1 unlocks. When the user steps inside the compartment and stands on the weight scale, the decision-making block matches the weight from the database to the weight sent by the interface board. Once again, if the weight matches the database with an error of ±2.5 lbs, door 2 unlocks, if it returns a null value, door 2 remains locked. This criterion is sent to the interface board where sends a signal to a device that activates the alarm.

Table 3: Stored information in the database of authorized personnel

For illustration purposes, another table is created to generate a query. Table 4 contains the RFID tag number along with the user’s weight, and the date and time the user swiped their RFID tag to enter the lab. Table 5 is the queried information which will be stored in the database as a log.

Table 4: Data recorded when user swipes RFID tag to enter room & weight is detected

Table 5: Query of table 3 and table 4

3.1.8 TEST SPECIFICATION

Testing specifications were under heavy consideration during the design phase, however due to the uncertainty of product selection; the finer aspects of the technical specifications were saved for the implementation phase. Preliminary testing criteria are discussed in section 4.2 as well as a detailed description of the implementation of tests for each component.

3.2 DESIGN DOCUMENTS

21

Page 22: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

The documents regarding the design of this project can be found in the attached appendix.

User manualSystem Administrator manualSoftware CodeWeight Scale SchematicSwitch SchematicConstruction DesignInterface Board Alternatives

3.3 DESIGN REVIEW

The design process was completed successfully by giving the implementation phase enough guidance to carry out the design with very few design changes needed.

4 IMPLEMENTATION

This section describes the third and final phase of the project’s succession. After the design phase was conducted after the initial planning, the implementation phase built the system according to the design and carried out test procedures in accordance with the design phase, as well as implementation level tests that ensured proper component function.

This section consists of the building sub-section and the test sub-section.

4.1 BUILD

The following parts were selected as part of the build process.

4.1.1 INTERFACE BOARD

The interface board serves as a conduit between the computer and the peripheral hardware components. A list of other interface boards that were considered for this project can be found the attached appendix.

GP-3 PC I/O Board Kit RS-232 5 Analog Input 8 Digital Shared I/O PWM LED 128 byte EEPROM

22

Page 23: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 17: Interface Board

4.1.2 RFID

The RFID detector is capable of detecting RFID cards from 3 inches away. The output is set to the computer via USB and is interpreted using Visual Basic. This provides a way for the computer to identify what specific user may be accessing the system.

Figure 18: RFID Scanner

4.1.3 WEIGHT SCALE

The purpose of the weight scale is to prevent multiple entries. Instead of using a digital weight scale, the team decided to implement an analog weight scale due to time constraints on the project. The analog weight was implemented by using aluminum contacts and resistor divide circuits. Aluminum pads were placed on different weight ranges, which were contacted to resistors. The needle within the weight scale which rotates and tells the user the weight was made into a conductor. This conducting needle was connected to ground within the system. As the needle rotates it will make contact with the aluminum pads creating a voltage drop over that particular resistor associated with the aluminum pad.

23

Page 24: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 19: Illustration of the analog weight scale set up, and signal extraction to determine the weight

As shown in figure 17, 7 weight ranges were integrated, thus 7 resistors were placed to have 7 different voltage drops along with one additional resistor value of 1 KΩ as a reference resistance for the voltage divider. As the needle of the weight scale rotates it will ground the resistor that it will make contact with, leaving the rest of the resistors floating. The basic circuit for voltage divider is shown in figure 18.

Figure 20: Basic resistor divide/attenuator schematic

V out=Rb

Rb+Ra∗V ¿

The voltage divider circuit (equation shown above) will give the at the output different voltage which will correspond to a certain weight range. This output voltage will insert into the input of the analog I/O of the interface board. The input voltage V ¿was set to 5 V because of the interface board’s saturated input voltage. Table 6 shows the various output voltage corresponding to the particular weight range on the weight scale.

24

Page 25: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Table 6: Various output voltage corresponding to weight ranges Resistor Name Resistor Value (Ohms) Vout Weight Range (lbs)

R1 1976.00 3.338 V 155-162R2 3194.5 3.82 V 163-171R3 3931 3.999 V 173-180R4 4352.4 4.078 V 182-190R5 4658.5 4.129 V 191-197R6 4972 4.1744 V 198-206R7 6761.9 4.3661 V 207-215

The rotating needle within the original system was a non-conductive material. To make it conductive, a long solid core wire was attached to the non-conductive material along with a winding of a very thin stranded wire. This thin stranded wire would hang down from the rotating needle acting like a brush to make contact with the aluminum pads. Since this system was designed for DC, parasitic inductance from the windings of the stranded wire on the needle did not affect the output voltage.

This system was solely made for a proof of concept approach. If this entrance security system was to be marketed a digital scale ought to be used for accuracy, and durability purposes.

4.1.4 DOOR SENSORS

Door sensors are simulated with SPST toggle switches. The switches relay a digital “high” voltage that is transmitted to the interface board. A schematic showing the specific connection to the interface board is shown below.

Figure 21: Switching Schematic

25

1.4 kΩ +5 V

Door 2

Door 1

Digital Input 1

Digital Input 2

Page 26: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

The door sensors were SPST toggle switches purchased from Radio Shack shown below.

Figure 22: Door Switches

4.2 TEST

Testing procedures were implemented for each of the components of the system. These components included RFID, door sensors, weight scale, and interface board.

4.2.1 DOOR SENSORS

The door sensors, which are described in section 4.1.4 were tested directly using a digital multimeter, and a power supply. The input voltage to the switching circuit was +5V and the required output needed to be nearly +5V on both the Digital Input 1 and Digital Input 2 depending on the position of each respective switch.

The test was performed and the necessary output voltage was present for all of the switching combinations.

4.2.2 WEIGHT SCALE

Various tests were performed to insure the output voltage was stable and readable for the interface board. One subject was asked to stand on the weight scale various amount of times to make sure the output voltage of the voltage divider was consistent with weight of the person. This was chosen due to the stranded wire hanging off the pin stopping the pin from moving due to the rough edges of the aluminum pads. This problem was fixed by sanding the rough edges of the pads to make a smoother path for the stranded wire to move through. Within the interface board program, an average function was placed to take the average of the voltage being sent to the interface board from the voltage divider circuit.

Since wires were placed on the pad, these wires were contacting straight on the pads. As a person would stand on the scale, the movement would break the contact between the wire and the pad. As illustrated on figure 21 these solid core wires were routed over the edge of the weight scale. The movement of the scale would raise the edge of the weight scale, creating a break in the contact.

26

Page 27: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Figure 23: Weight scale contact diagram

This issue was resolved by heavily taping the wire to the edge of the board. This way as the edge would rise and fall, so would the wire in the same fashion, guaranteeing contact between the resistor and the aluminum pad. The testing for this problem was monitored by making a test subject stand on the weight scale multiple times. Aluminum duct tapes were used to hold the wire tightly in place and move along simultaneously with the edge of the weight scale.

4.2.3 INTERFACE BOARD

The Interface Board was programmed using GP3 ActiveX DLLs over a serial protocol with a baud rate of 57600. The Interface Board was powered by a 9V battery. The maximum voltage readout for the A/D input pins for the board is 5V. A specific IO control was created to work with the given DLLs. Some of the standard control commands that were used are IO.a2d, IO.led, and IO.portopen among others. The a2d control is designed to read the 10-bit input. However, the voltage data, which was only 3-bits, needed to be extracted from this 10-bit data received. When it seemed that the 3-bit voltage data was being extracted correctly in theory, it was time to test the program.

In order to actually test the Interface Board functions, an MS Access database was created with two tables - an SecureAccessInformation table with RFID identifiers, Firstname, Lastname, and corresponding weight data; and a Voltage Lookup table with Voltage data and Minbound and Maxbound weights corresponding to each voltage. The program was then designed to extract the voltage data from the A/D input pin, compare it against the voltages in the Voltage Lookup table, pull up the maxbound and minbound weights corresponding to that, and then match it against the RFID identifier of that particular weight in the SecureAccessInformation table.

Since the program and the Interface Board were being tested on a home PC, a voltage source was not readily available for testing purposes. The program was then run with no voltage attached to any of the A/D input pins. The program would not respond at first. The problem was found to be with the handshaking protocol of the ActiveX control. The control was then modified to turn all handshaking off for the serial port, since the board was compatible for operation under such conditions. When the program was tested again, with no voltages being present at the pins, the direct a2d readout was random every time. The program was further debugged for possible errors and run again with the same results.

27

Page 28: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Testing on campus with a direct voltage source was delayed since administrative rights to a machine were required in order to run the program with all its ActiveX components. A voltage source was obtained and the program was tested to find that a constant bit input was being read by the program for a constant voltage. With some amount of testing and by stepping through the program while running it, the bit data conversion was successfully achieved and the raw voltage being read at the pins was obtained. The following conversion formula was the final result:

rawVolt=( bitdata1024.0¿¿)∗(5)

The Interface Board was then found to successfully read voltages with an error percentage of less than ±1%.

Table 7: Interface Board testing data

4.2.4 RFID/GENERAL SYSTEM

The RFID PC interface code and the Interface Board code were integrated to create the final code. The two basic codes needed a variety of timer and loop manipulations in order to create the final state machine. The final MS Access database was also created. There were some timing issues between the A/D port readouts for the door sensors and the weight machine. That issue was resolved by testing and modifying and re-testing the program. The final code checks for the RFID tag and pulls the name and weight data corresponding to that particular RFID number. A voice command then instructs the person to open door1. It then checks for the door1 sensor. There’s a period of 10 seconds given to the person to switch on the door switch to signal that the door is opened after scanning the RFID tag. The next voice instruction is for door1 to be closed. There’s a further 10 seconds given to switch off the door switch to signal that door1 has been closed and the person is standing on the weight scale. If the weight scale does read any weight, it is assumed that the person has not entered and the program goes back to the RFID scanning mode. If however, there is a weight detected and both door1 and door2 are found to be closed, the weight is scanned and checked in the database against the scanned RFID number. If a match is found, the voice command requests the person to switch on the door2 switch signaling an open door2. Finally, once the weight scale is reading a zero voltage, the person is asked to switch off the door2 switch signaling that door2 is closed and the person has logged as having entered the facility. A period of 10 seconds is given for each of the door2 on and off functions.

Now, when a tag is scanned at the RFID inside the facility, the program first checks to see if that tag has been saved in the memory as a tag that had been authorized entry previously. If the tag fails to check out, an alarm is sounded. If however, it checks out, then the same process as initial entry authorization is conducted. The only difference in the entry out code is that the two doors are switched in this case. It is important to note that the RFID inside the facility is a separate RFID unit different from the RFID unit outside door1. However, because of budget constraints we are using the same RFID to showcase the proof of concept behind the Entrance Security System. It is also

28

Page 29: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

important to note that all databases and program control is accessible to the system administrator and security personnel in order to modify user data or enter new user data, as well as to turn off alarms. The program is equipped with exception handling to check for various error sequences, so that the alarm may be sounded for complete security.

5 CLOSURE MATERIAL

This section contains the following subsections:

5.1 Closing summary5.2 Lessons learned5.3 Completed tasks5.4 Final budget5.5 Project team information5.6 References5.7 Appendix

5.1 CLOSING SUMMARY

The Senior Design Lab in the Department of Electrical and Computer Engineering at Iowa State University has incurred a number of security breaches. A request was made to design a system which would solve the issues of providing only authorized access and prevent multiple entries. The team designed a compartment that consisted of two security doors in conjunction with an RFID security system and a weight scale. The project’s budget was limited to $250 of equipment and the projected total cost including labor was $13,331. The design and the implementation of the system were completed by December 2007. The end project deliverables included the completed prototype and the necessary documentation. The new security system prototype proves that the design can thus provide an efficient, cost effective, robust, and highly secure solution for the issues of preventing multiple entries and allowing authorized access only.

5.2 LESSONS LEARNED

This section contains the lessons which have been learned from the project. This project has helped everyone work as a team where the task was divided equally and accomplished on time. Each of the group members has been contributing their personal efforts towards the success of this project. However, the team still had problems within the group where the meeting time did not seem fit everyone due to class conflicts.

The team consisted of five members majoring in Electrical Engineering, and this project called for linking software and hardware applications. Since no one in the group had prior knowledge in any computer engineering classes, it was a vast challenge for the team to learn how to link the two worlds together. On top of that, some mechanical issues aroused when extracting signals from analog weight scale.

The team members feel they gained a good amount of knowledge from the project including the Visual basic programming language, development in the Visual Studio environment, and knowledge

29

Page 30: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

of working with RFID readers and tags. The team also learned that communication with the end client is extremely important.

The team also learned about thoroughly researching about a part before purchasing it, especially since the budget is very low. Some of the research would include, full specification sheet available for the user including schematic, compatibility with the system being installed, and other alternatives.

5.3 COMPLETED TASKS

The following is a breakdown of all tasks with their respective completion status.

Task 1: Project Definition Completed

This task included statement of the problem, requirements, and the specification made by the client.

Task 2: Technical Considerations Completed

This task contained a list of technologies picked by the team that could be used in product design. It includes extensive research of each technology considered and the components needed to implement it. The team will selected the best technology that was feasible to approach the prototype design.

Task 3: End-Product Design Completed

This task consisted of the design process for the system once a feasible technology was chosen. The end result was a well-designed concept that met the client’s requirement.

Task 4: End-Product Implementation Completed

This task consisted of taking the concept design and implementing it.

Task 5: End-Product Testing Completed

This task consists of testing the implemented design to ensure the prototype functions properly, and meets the client’s need.

Task 6: End-Product Documentation Completed

Since documentation occurs throughout the entire project, this task was to ensure that all documentation was reviewed and logically assembled near the completion of the project.

Task 7: End-Product Demonstration Completed

The task was to demonstrate the end product to the Industrial Review Board, the client, and the advisor.

30

Page 31: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Task 8: Project Reporting Completed

This task involved creating a detailed report of the entire process, from problem definition to presentation.

5.4 EARNED VALUE ANALYSIS

Total expected and actual weekly hours per team member:

Table 8: Team member hoursTeam Members WK 1 WK 2 WK 3 WK 4 WK 5 WK 6 WK 7 WK 8 WK 9 WK 10 WK 11 WK 12 WK 13 WK 14 ActualTotal HRs Cost for labor ($) Estimated Total Hrs Cost for labor($) Money Saved ($)Nahiyan Ali 2 5 2 3 2 3 9 9 6 9 10 10 10 12 92 920 106 1060 140Vaibhav Kumar 2 5 2 3 2 3 6 20 6 10 6 10 10 12 97 970 106 1060 90Tao Zeng 2 5 2 2 2 2 4 9 6 9 6 10 10 12 81 810 106 1060 250Shrabantee Chatergee 0 0 0 0 0 0 1 0 0 9 8 10 10 22 60 600 123 1230 630Alex Wiegel 2 3 2 2 6 2 6 6 5 6 6 10 10 20 86 860 104 1040 180

Total 416 4160 545 5450 1290

Various Tasks complete/assigned during senior design 2nd semester:

Table 9: 2nd semester task list

Total Hours contribution per team member per task:

Table 10: Actual hours per taskMembers Task 4 Task 5 Task 6 Task 7 Task 8 Total

Nahiyan Ali 35 45 6 1 5 92Vaibhav Kumar 52 42 1 1 1 97Tao Zeng 20 30 20 1 10 81Shrabantee Chatergee 25 30 2 1 2 60Alex Weigel 10 10 60 1 5 86

Total 416Earned($) 4160

Table 11: Estimated hours per task

31

Page 32: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Members Task 4 Task 5 Task 6 Task 7 Task 8 TotalNahiyan Ali 50 40 8 1 7 106Vaibhav Kumar 50 51 2 1 2 106Tao Zeng 50 30 10 1 15 106Shrabantee Chatergee 40 40 30 1 12 123Alex Weigel 11 11 60 1 21 104

Total 545Earned($) 5450

Table 12: Budgeted cost of workTasks Task Description % Complete Budgeted cost of work Task 4 End-Product Prototype Implementation 94 1334.8Task 5 End-Product Testing 92 1444.4Task 6 End-Product Documentation 96 854.4Task 7 End-Product Demonstration 95 47.5Task 8 Project Reporting 95 218.5

Cost performance index: budgeted cost for work performed ($2800) / actual cost of work performed ($4160)

3899.6/4160 = 0.94; 94 %

Schedule performance: budgeted cost of work performed ($2800) / budgeted cost of work scheduled ($5450)

3899.6/5450 = 0.72; 72 %

Table 13: Materials budgetPlanned Cost for Material Cost Actual Cost for Materials

RFID tags 20 RFID unit 70Resistors 0.05 Resistors 1

Capacitors 0.05 Slide Switches 4OPAMP 0.2 USB Cable 2

Slide switch 1.99 Interface board 50USB cable 30 PCB 5

Interface Board 90 Enclosures 5Circuit Board 5 Aluminum Tape 16

Enclosures 10 Weight Scale 45Transformer 15 V 1 A 13.63 Wire 5

Connecto 2.5 mm Jack 1.83Weight Sclae 159

Misc Connectors 10Total $ 341.75 Total $ 203

Total saving = $ 138

32

Page 33: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.5 PROJECT TEAM INFORMATION

The section includes the contact information for each person that is involved in this project.

5.5.1 CLIENT INFORMATION

Dr. Gregory Smith Iowa State UniversityDepartment of Electrical and Computer Engineering, Senior DesignAddress: 2215 Coover Hall, Ames, IA 50011Website: www.ece.iastate.edu

5.5.2 FACULTY ADVISOR INFORMATION

Mina Mani341 DurhamAmes, IA 50011Phone: 515-294-3918 Fax: [email protected]

5.5.3 CONSULTANT INFORMATION

Management ConsultantJoe MathiasPhone: 515-450-23722424 Knapp St., Story City, [email protected]

Mechanical Engineering ConsultantKyle Drees1106 Friley Stange, Ames, IA 50014Ames, IA 50011Phone: [email protected]

5.5.4 STUDENT TEAM INFORMATION

Ali Nahiyan3322 Frederiksen CourtAmes, IA 50010Phone (cell): [email protected]

Chatterjee Shrabantee

33

Page 34: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

4533 Steinbeck St, #3Ames, IA 50014Phone (cell): [email protected]

Kumar Vaibhav5356 Wallace NielsenAmes, IA 50012Phone (cell): [email protected]

Weigel Alex 1208 Cyclone Ave. Ames, IA 50014Phone (cell): [email protected]

Zeng Tao 4810 Mortensen Rd. #311Ames, IA 50014Phone (cell): [email protected]

5.6 REFERENCES

AWC. “GP-3 PC I/O Board Kit.” AWC, Nov. 2007. 13 Nov. 2007 <http://www.awce.com/gp3.htm?src=gaws>.

Boon Edam Tomsed Inc. “Tour Lock.” Boon Edam Tomsed Inc, Dec. 2007. 1 Dec. 2007<http://www.boonedam.nl/inc/securityaccess/tourlock.asp>

Eastern Door Service. “Security Revolving Doors.” Eastern Door Service, Dec. 2007. 1 Dec. 2007. <http://www.4automaticdoors.com/security_revolving_doors.htm>

Phidgets inc. “RFID Reader.” Phidgets inc, Nov. 2007. 13 Nov. 2007< http://www.phidgets.com/documentation/Phidgets/1023.pdf>.

Radioshack. "SPST Heavy-Duty Switch." RadioShack. Mar. 2007. 28 Mar. 2007 <http://www.radioshack.com/product/index.jsp?productId=2062488&cp=&sr=1&origkw=sliding+switch&kw=sliding+switch&parentPage=search>.

34

Page 35: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7 APPENDIX

35

Page 36: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7.1 USER MANUAL

USER MANUAL: ENTRANCE OPERATION

1) Scan RFID

2) If welcomed with appropriate name, open door 1 (activate switch 1), enter compartment, and close door 1 (deactivate switch 1). (If not welcomed, or not welcomed with appropriate name, then do not enter. Contact authorities if problems persist.)

3) Wait for instructions to open next door. When system grants authorization, open door 2 (activate switch 2), enter room, and close door 2 (deactivate switch 2)

(Note: It is important to follow the system’s instructions exactly, because although there are time delays built into the system, an alarm may sound if instructions are not followed.)

36

ThenDeactivate

FirstActivate

ThenDeactivate

FirstActivate

Door Controls

Door Controls

Page 37: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

37

Page 38: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

USER MANUAL: EXIT OPERATION

1) Scan RFID

2) If welcomed with appropriate name, open door 2 (activate switch 2), enter compartment, and close door 2 (deactivate switch 2). (If not welcomed, or not welcomed with appropriate name, then do not enter. Contact authorities if problems persist.)

3) Wait for instructions to open next door. When system grants authorization, open door 1 (activate switch 1), enter room, and close door 1 (deactivate switch 1)

(Note: It is important to follow the system’s instructions exactly, because although there are time delays built into the system, an alarm may sound if instructions are not followed.)

38

FirstActivate

ThenDeactivate

FirstActivate

ThenDeactivate

Door Controls

Door Controls

Page 39: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7.2 SYSTEM ADMINISTRATOR MANUAL

SYSTEM ADMINISTRATOR MANUAL

HARDWARE SETUP

The diagram above shows the proper assembly of the security system. Note that 5V is being drawn from the RFID scanner to power the weight scale. The rest of the power for the system comes from the 9V battery.

SOFTWARE SETUP

Open the Entrance Security System Dec07-07 folder and click to install from the setup files in the Phidget folder and the GP3 folder. Then open the Control Panel folder. Double click on rfid_simple.sln in order to open the program. Once the project is up and running. Go to the Solution Explorer window and right click the project and select ‘Add Reference’. Go to the COM tab and add AWCGP3, AWCGP3DLL, Microsoft Speech Object Library, and Phidget Library 2.1. Then go to the NET tab and add Phidget21.NET and System.Data. To view the objects that you have added, select the View menu and choose Object Browser. Now go under the Debug menu and select the Run command to run the program.

SYSTEM ENVIRONMENT

The computer that is running the program should be a secure PC in order to prevent tampering of the program or any parts of the system connected to it. The computer should be equipped with one serial port (RS-232) for connecting the interface board and one USB port to connect the RFID. The PC should have a .NET framework 2.0 or above installed and should also have Microsoft Access. All system components should be operated at room temperature conditions.

39

USB from computer

RS-232 from computer

+

9V

Door 1

Door 2

1 2 3 4 5 6 7 8 9 10 11

Weight Scale

InterfaceBoard

RFID

1.4kΩ

Page 40: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

ADDING, CHANGING, DELETING USERS

40

The database management section of the control panel contains all the tools necessary to add, change, and delete users.

Page 41: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

DEALING WITH ALARMS

41

After an alarm has been triggered, the system administrator must disable the alarm by clicking the “Disable Alarm” button. Each alarm incident is logged in a text file which can be viewed or modified by the system administrator.

Page 42: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7.3 SOFTWARE CODE

'A reference to the PhidgetNET.dll must be added to new projects in VB.Net'From the "Project" menu select "Add Reference"'From the "Add Reference" window select the "Browse" tab'Browse to the directory you installed the Phidgets library to'The default is "C:\Program Files\Phidgets"'Select "PhidgetsNET.dll" and click "OK"'To view objects that have been added, select the "View" menu'Select "Object Browser"'Then expand the PhidgetsNET.dll item

Imports SystemImports System.DataImports System.Data.SqlClientImports SpeechLibImports System.MediaImports System.Windows.Forms.FormImports System.DiagnosticsPublic Class Panel '*******Declarations for all glbal variables******* Public State1 As Boolean Public State2 As Boolean Dim WithEvents RFID1 As Phidgets.RFID Public count As Integer Public reader_tag As String Public voice As New SpVoice Public count2 As Integer Private Player As New SoundPlayer Public State1Rfid As String Public State2Rfid As String Dim File As System.IO.File Dim Write As System.IO.StreamWriter

Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'*******Main form component that calls the RFID scan function*******

State1Rfid = "" State2Rfid = "" State1 = False State2 = False count = 0 count2 = 0 Me.ProfileTableAdapter.Fill(Me.auth_profile.profile) RFID1 = New Phidgets.RFID() RFID1.open()

Timer7.Enabled = True 'Checks two see that neither of the doors are open when the system is idle txtStatus.Text = "Not Connected" lbl_time.Text = DateTime.Now IO.CommPort = 1 IO.portopen = True

'Log file output Write = System.IO.File.CreateText("C:\Documents and Settings\SDTN316\Desktop\Entrance_System_Log.txt")

End Sub Private Sub RFID1_Attach(ByVal sender As Object, ByVal e As Phidgets.Events.AttachEventArgs) Handles RFID1.Attach

'*******RFID connection******* txtStatus.Text = "Connected" txt_serial.Text = RFID1.SerialNumber txt_name.Text = "Phidgets RFID" RFID1.Antenna = True RFID1.outputs(0) = True CheckBox3.Checked = True CheckBox2.Checked = False

End Sub Private Sub RFID1_Detach(ByVal sender As Object, ByVal e As Phidgets.Events.DetachEventArgs) Handles RFID1.Detach Me.Close()

42

Page 43: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

End Sub Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If RFID1.Attached = True Then RFID1.close() End If End Sub Private Sub RFID1_Error(ByVal sender As Object, ByVal e As Phidgets.Events.ErrorEventArgs) Handles RFID1.Error MessageBox.Show(e.Description) Me.Close() End Sub Private Sub RFID1_RFIDTag(ByVal sender As Object, ByVal e As Phidgets.Events.TagEventArgs) Handles RFID1.Tag

'*******RFID scan code******* reader_tag = e.Tag txt_tag.Text = reader_tag RFID1.LED = True Timer7.Enabled = False ReadProfileFromDatabase(reader_tag) If State1 = True And txt_dname.Text = State1Rfid Then If CheckBox1.Checked = True Then alarm() Exit Sub End If Else If State2 = True And txt_dname.Text = State2Rfid Then alarm() End If End If If CheckBox1.Checked = False And CheckBox4.Checked = False Then voice.Speak("Please Choose Entrance or Exit Sequence") Reset() Exit Sub End If If (String.Compare(txt_dname.Text, "Unauthorized Access", False)) Then

RFID1.Antenna = False State1Rfid = txt_dname.Text If (String.Compare(State1Rfid, "", False)) Then State2Rfid = txt_dname.Text End If

If CheckBox1.Checked = True Then RFID1.Antenna = False Timer2.Enabled = True 'Initiate door1open since entering voice.Speak("Welcome" + " " + txt_dname.Text) ElseIf CheckBox4.Checked = True Then RFID1.Antenna = False Timer6.Enabled = True 'Initiate door2open since exiting voice.Speak("Please exit." + " " + txt_dname.Text) End If Else voice.Speak("Unauthorized Access") End If

'Write to log file Write.WriteLine("0,101,102,25", "Date", "Time", "Name") Write.WriteLine("0,10:dd MMMM0,10:hh:mm tt1,25:C", Now(), txt_dname.Text) Write.Close()

End Sub Private Sub RFID1_RFIDTagLost(ByVal sender As Object, ByVal e As Phidgets.Events.TagEventArgs) Handles RFID1.TagLost End Sub

Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged RFID1.LED = CheckBox2.CheckState End Sub Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged RFID1.Antenna = CheckBox3.CheckState End Sub

43

Page 44: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Private Sub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click Dim auth_form As New Authentification auth_form.Show() auth_form.txt_variable.Text = "Add" RFID1.close()

End Sub

Private Sub btn_delete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_delete.Click Dim auth_form As New Authentification auth_form.Show() auth_form.txt_variable.Text = "Delete" End Sub

Private Sub btn_modify_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_modify.Click Dim auth_form As New Authentification auth_form.Show() auth_form.txt_variable.Text = "Modify" End Sub

Private Sub btn_view_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_view.Click Dim auth_form As New Authentification auth_form.Show() auth_form.txt_variable.Text = "View" End Sub

Private Sub ReadProfileFromDatabase(ByVal reader_tag As String)

'*******Reads from database after RFID scan, in order to dispaly the name and weight information of the person******* For Each row As DataRow In auth_profile.Tables("profile").Rows Dim db_RFID As String db_RFID = row("RFID").ToString() If (db_RFID = reader_tag) Then txt_dname.Text = row("Full_Name").ToString txt_dweight.Text = row("Weight").ToString End If Next

If txt_dname.Text = "" Then txt_dname.Text = "Unauthorized Access" End If End Sub

Private Sub Door1closestatus()

'*******Door1 close code******* Dim Door1volt As New Single Dim nonsig2 As New Integer Door1volt = 0

For K As Integer = 1 To 20 Door1volt = Door1volt + IO.a2d(1) Next Timer5.Enabled = False Door1volt = Door1volt / 20 If (Door1volt > 600) Then If (count = 3) Then alarm() count = 0 alarm() Exit Sub End If Timer5.Enabled = True count = count + 1 voice.Speak("Please Close The Door Behind You") nonsig2 = IO.count(0, 1000) ElseIf (Door1volt < 600) Then If CheckBox4.Checked = True Then Weightcheck2() ElseIf CheckBox1.Checked = True Then count = 0 Timer3.Enabled = True End If End If

44

Page 45: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

End Sub

Private Sub Door1openstatus()

'*******Door1 open code******* Dim delay As New Integer Dim status As New Integer

count2 = count2 + 1 delay = IO.count(0, 500) status = IO.a2d(1) If status > 800 Then Timer5.Enabled = True count2 = 0 Exit Sub End If If count2 = 2 And CheckBox4.Checked = True Then voice.Speak("Please leave the compartment") End If If count2 = 6 And CheckBox4.Checked = True Then voice.Speak("Please leave the compartment") End If If count2 = 8 Then If CheckBox1.Checked = True Then voice.Speak("No Entry Made. System Reset For New User") ElseIf CheckBox4.Checked = True Then alarm() Exit Sub End If End If Door1openstatus() End Sub Private Sub Weightcheck()

'*******Actual weight check code to identify the RFID tag with the weight of the person standing on the sensor******* Dim Weightvolt As New Single Dim Weight_rawVolt As New Single Dim Weight_convertedvolt As New Single Dim nonsig As New Integer Weightvolt = 0 nonsig = IO.count(0, 3000) For K As Integer = 1 To 20 Weightvolt = Weightvolt + IO.a2d(0) Next Weightvolt = Weightvolt / 20 Weight_rawVolt = (Weightvolt / 1023.0#) * 5 'Converts the binary data from the interface board to raw voltage data Weight_convertedvolt = Convert.ToSingle(Format(Weight_rawVolt, "0.000"))

For Each row As DataRow In auth_profile.Tables("profile").Rows Dim db_RFID As String Dim db_minbound As Single Dim db_maxbound As Single db_RFID = row("RFID").ToString() If (db_RFID = reader_tag) Then db_minbound = row("Minbound") db_maxbound = row("Maxbound") If (Weight_convertedvolt < db_maxbound And Weight_convertedvolt > db_minbound) Then If CheckBox1.Checked = True Then voice.Speak("Access Granted. Please Enter The Room") Timer6.Enabled = True ElseIf CheckBox4.Checked = True Then Timer2.Enabled = True End If Else alarm()

End If End If

Next End Sub Private Sub Weightcheck2()

45

Page 46: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

'*******Code to check that someone is on the weight sensor******* Dim Weightvolt As New Single If (IO.a2d(0) < 1015) Then alarm()

Else If CheckBox1.Checked = True Then voice.Speak("System Ready For Next Entry") If State1 = True Then State2 = True End If Reset() ElseIf CheckBox4.Checked = True Then voice.Speak("Have a good day" + " " + txt_dname.Text) If txt_dname.Text = State1Rfid Then State1 = False ElseIf txt_dname.Text = State2Rfid Then State2 = False End If Reset() End If

End If End Sub

Private Sub Reset()

'*******Reset code for system restoring to normal after successful entry or exit******* My.Computer.Audio.Stop() Me.BackgroundImage = New System.Drawing.Bitmap("C:\Documents and Settings\SDTN316\Desktop\Senior Design\Control Panel\rfid-simple\normal.jpg") count2 = 0 count = 0 lbl_ua2.Visible = False btn_da.Visible = False txt_dname.Text = "" txt_tag.Text = "" picture1.Visible = False voice.Speak("System Returning To Normal.") RFID1.Antenna = True CheckBox1.Checked = False CheckBox4.Checked = False RFID1.LED = False Timer7.Enabled = True txt_dweight.Text = "" End Sub Private Sub btn_da_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_da.Click My.Computer.Audio.Stop() Me.BackgroundImage = New System.Drawing.Bitmap("C:\Documents and Settings\SDTN316\Desktop\Senior Design\Control Panel\rfid-simple\normal.jpg") lbl_ua2.Visible = False btn_da.Visible = False txt_dname.Text = "" txt_tag.Text = "" picture1.Visible = False voice.Speak("System Returning To Normal.") RFID1.Antenna = True State1Rfid = False State2Rfid = False State1 = False State2 = False txt_dweight.Text = "" End Sub Private Sub Door2openstatus()

'*******Door2 open code******* Dim delay As New Integer Dim status As New Integer

count2 = count2 + 1 delay = IO.count(0, 500) status = IO.a2d(2)

If status > 800 Then Timer4.Enabled = True count2 = 0

46

Page 47: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

Exit Sub End If

If count2 = 10 Then If CheckBox1.Checked = True Then voice.Speak("No Exit Made.") alarm() Exit Sub End If End If

If count2 = 5 Then If CheckBox4.Checked = True Then voice.Speak("Please enter the holding area") End If End If If count2 = 10 Then If CheckBox4.Checked = True Then voice.Speak("No exit made") alarm() Exit Sub End If End If Door2openstatus() End Sub Private Sub Door2closestatus()

'*******Door2 close code******* Dim Door2volt As New Single Dim nonsig2 As New Integer Door2volt = 0

For K As Integer = 1 To 20 Door2volt = Door2volt + IO.a2d(2) Next Timer4.Enabled = False Door2volt = Door2volt / 20 If (Door2volt > 800) Then If (count = 3) Then alarm() count = 0 Exit Sub End If Timer4.Enabled = True count = count + 1 voice.Speak("Please Close The Door Behind You") nonsig2 = IO.count(0, 1000) ElseIf (Door2volt < 800) Then count = 0 nonsig2 = IO.count(0, 2000) If CheckBox1.Checked = True Then Weightcheck2() State1 = True Exit Sub End If

If CheckBox4.Checked = True Then Timer3.Enabled = True Exit Sub End If

End If Door2closestatus() End Sub Private Sub alarm()

'*******Alarm code******* voice.Speak("Access Denied") My.Computer.Audio.Play("C:\Documents and Settings\SDTN316\Desktop\Senior Design\Control Panel\rfid-simple\1.wav", AudioPlayMode.BackgroundLoop) Me.BackgroundImage = New System.Drawing.Bitmap("C:\Documents and Settings\SDTN316\Desktop\Senior Design\Control Panel\rfid-simple\alarmstate.jpg") lbl_ua2.Visible = True picture1.Visible = True btn_da.Visible = True RFID1.LED = False

47

Page 48: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

CheckBox1.Checked = False CheckBox4.Checked = False Timer7.Enabled = True

End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'*******Current date and time display on top right corner******* lbl_time.Text = DateTime.Now End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

'*******Initiates door1open code******* Timer2.Enabled = False Door1openstatus() End Sub Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick

'*******Initiates weight check code******* voice.Speak("Please Wait") Timer3.Enabled = False Weightcheck() End Sub Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick

'*******Initiates door2close code******* Timer4.Enabled = False Door2closestatus() End Sub Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick

'*******Initiates door1close code******* Timer5.Enabled = False Door1closestatus() End Sub

Private Sub Timer6_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer6.Tick

'*******Initiates door2open code******* Timer6.Enabled = False Door2openstatus() End Sub Private Sub btn_tst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_tst.Click

'*******Button on the top and left most corner for manual resets(very small button)******* Reset() End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

'*******Checkbox for Entrance sequence*******

End Sub

Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

'*******Checkbox for Exit sequence*******

End Sub

Private Sub Timer7_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer7.Tick

'*******Timer to check that neither of the doors are open when the system is idle******* If IO.a2d(1) > 800 Or IO.a2d(2) > 800 Then alarm() End If End SubEnd Class

48

Page 49: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7.4 WEIGHT SCALE SCHEMATIC

Weight scale contact diagram

Illustration of the analog weight scale set up, and signal extraction to determine the weight

Basic resistor divide/attenuator schematic

49

Page 50: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7.5 SWITCH SCHEMATIC

50

1.4 kΩ +5 V

Door 2

Door 1

Digital Input 1

Digital Input 2

Page 51: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

5.7.6 INTERFACE BOARD ALTERNATIVES

Model Interface

Inputs Outputs Price Pros Cons Comment

PhidgetInterfaceKit 8/8/8

http://www.phidgets.com/products.php?product_id=1013

USB 8 Analog8 Digital

8 Digital $90 * Good reputation* Operational experience* Abundance of ports* Includes analog* Abundance of documentation, examples, libraries for several different languages

* Expensive USB cable included

USBIO24 Digital I/O Module MKIII

http://www.hobbyengineering.com/SectionIN.html#CatINUSB

USB 24 shared I/O Digital

24 shared I/O Digital

$79 * Fair amount of documentation for several different languages

* Availability* Lack of analog

Currently out of stock

GP-3 PC I/O Board Kit

http://www.awce.com/gp3.htm?src=gaws

RS-232

5 Analog8 shared I/O Digital1 PWM1 Counter

8 shared I/O DigitalLED128 byte onboard EEPROM

$50 * Abundance of ports* Abundance of documentation, examples, and libraries* Different libraries offer many different programming options* Heavily Researched* Very easy to program* Extra features provide design flexibility and upgrade capability

* The less expensive board will require assembly.

Cable not included

USB I2C/IO P.C.B. (Rev. B)

http://www.devasys.com/usbi2cio.htm

USB 20 shared I/O Digital

20 shared I/O Digital16kb onboard EEPROM

$80 * Lack of analog* Not user friendly* Design intended for a different purpose

Velleman K8055

http://www.velleman.be/be/en/product/view/?id=351346

http://www.elexp.com/tst_k805.htm

http://store.qkits.com/moreinfo.cfm/VM110

USB 2 Analog5 Digital

2 Analog8 Digital

Unassembled $45Assembled$72$70

* Well known company* Decent documentation* Abundance of ports* Includes analog* Multiple vendor options

* The documentation that is available is not very standardized and is a little difficult to work with.* Not quite as user friendly as other options* The limited number of analog ports poses and increased risk. This is because problems may be encountered with the digital inputs.

51

Page 52: 1Introductory Material - ECpE Senior Design | General Infoseniord.ece.iastate.edu/.../dec0707/Final_Report.docx · Web viewThe leading systems currently in place usually involve security

52